PHP extensions
Available extensions and modules
Clever Cloud PHP with Apache applications enables the following extensions by default:
amqp, bcmath, bz2, calendar, ctype, curl, dba, exif, fileinfo, filter, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, json, ldap, libsodium, mbstring, mcrypt, memcached, memcache, mongodb, mysql, mysqli, opcache, pcntl, pcre, pdo-mysql, pdo-odbc, pdo-pgsql, pdo-sqlite, pgsql, phar, posix, pspell, readline, redis, session, shmop, sockets, sodium, solr, ssh2, ssl, tidy, tokenizer, unixodbc, xml, xmlrpc, xsl, zip, zlib.
You can also enable the following extensions on demand:
apcu, blackfire, elastic_apm_agent, event, excimer, geos, gnupg, grpc, ioncube, imap, mailparse, maxminddb, mongo, newrelic, oauth, opentelemetry, pcs, PDFlib, pdo_sqlsrv, protobuf, pspell, rdkafka, scoutapm, sqlsrv, sqreen, tideways, uopz, uploadprogress, xdebug, xmlrpc, yaml
Note
Only some extensions support PHP 8.5 for now: amqp, apcu, blackfire, event, excimer, gnupg, grpc, imagick, imap, mailparse, maxminddb, memcached, oauth, opentelemetry, pdo_sqlsrv, protobuf, pspell, rdkafka, redis, sqlsrv, ssh2, tideways, uploadprogress, yaml, zip. More extensions will be added as they are released.
You can check extensions and versions by viewing the phpinfo() for:
If you have a request about extensions, contact Clever Cloud Support.
Enable specific extensions
Some extensions need to be enabled explicitly. To do so, set the corresponding environment variable:
APCu: set
ENABLE_APCUtotrue.APCu is an in-memory key-value store for PHP. Keys are of type string and values can be any PHP variables.
Elastic APM Agent: set
ENABLE_ELASTIC_APM_AGENTtotrue(default ifELASTIC_APM_SERVER_URLis defined).Elastic APM agent is Elastic’s APM agent extension for PHP. The PHP agent enables you to trace the execution of operations in your application, sending performance metrics and errors to the Elastic APM server. Warning: This extension is available starting PHP 7.2.
Event: set
ENABLE_EVENTtotrue.Event is an extension to schedule I/O, time and signal based events.
Excimer: set
ENABLE_EXCIMERtotrue.Excimer is an extension that provides a low-overhead interrupting timer and sampling profiler.
GEOS: set
ENABLE_GEOStotrue.GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
GnuPG: set
ENABLE_GNUPGtotrue.GnuPG is an extension that provides methods to interact with GNU Privacy Guard (OpenPGP implementation).
gRPC: set
ENABLE_GRPCtotrue.gRPC is an extension for the high performance, open source, general RPC framework layered over HTTP/2.
IonCube: set
ENABLE_IONCUBEtotrue.IonCube is a tool to obfuscate PHP code. It’s often used by paying Prestashop and WordPress plugins.
IMAP (only for PHP 8.4+): set
ENABLE_IMAPtotrue.IMAP is an extension to operate with the IMAP protocol, as well as the NNTP, POP3, and local mailbox access methods.
Mailparse: set
ENABLE_MAILPARSEtotrue.Mailparse is an extension for parsing and working with email messages. It can deal with RFC 822 and RFC 2045 (MIME) compliant messages.
MaxMind DB: set
ENABLE_MAXMINDDBtotrue.Extension for reading MaxMind DB files. MaxMind DB is a binary file format that stores data indexed by IP address subnets (IPv4 or IPv6).
Mongo: set
ENABLE_MONGOtotrue.MongoDB is a NoSQL Database. This extension allows to use it from PHP. Warning: this extension is now superseded by the
mongodbextension. It is provided for backward compatibility.NewRelic: set
ENABLE_NEWRELICtotrue.Newrelic Agent for PHP. Newrelic is a software analytics tool.
OAuth: set
ENABLE_OAUTHtotrue.OAuth consumer extension. OAuth is an authorization protocol built on top of HTTP.
OpenTelemetry: set
ENABLE_OPENTELEMETRYtotrue.OpenTelemetry is an extension to facilitate the generation, export, collection of telemetry data such as traces, metrics, and logs.
PCS: set
ENABLE_PCStotrue.PCS provides a fast and easy way to mix C and PHP code in your PHP extension.
PDFlib: set
ENABLE_PDFlibtotrue.PDFlib is a commercial library for generating PDF files. It provides a PHP extension to create and manipulate PDF documents.
Protobuf: set
ENABLE_PROTOBUFtotrue.Protobuf is an extension for the language-neutral, platform-neutral extensible mechanism for serializing structured data.
Pspell: set
ENABLE_PSPELLtotrue.Pspell is an extension to check the spelling of words and offer suggestions.
Rdkafka: set
ENABLE_RDKAFKAtotrue.PHP-rdkafka is a thin librdkafka binding providing a working PHP 5 / PHP 7 Kafka client.
Scout APM: set
ENABLE_SCOUTAPMtotrue.The Scout APM extension to provide additional capabilities to application monitoring over just using the base PHP userland library.
SQL Server: set
ENABLE_SQLSRVorENABLE_PDO_SQLSRVtotrue.These extensions enable drivers that rely on the Microsoft ODBC Driver to handle the low-level communication with SQL Server. The
SQLSRVextension provides a procedural interface while thePDO_SQLSRVextension implements PDO for accessing data in all editions of SQL Server 2012 and later (including Azure SQL DB).Sqreen: The Sqreen agent is started automatically after adding the environment variables (
SQREEN_API_APP_NAMEandSQREEN_API_TOKEN).Tideways: set
ENABLE_TIDEWAYStotrue.Tideways is an extension that provides profiling and monitoring capabilities for PHP applications.
Uopz: set
ENABLE_UOPZtotrue.The uopz extension is focused on providing utilities to aid with unit testing PHP code.
Uploadprogress: set
ENABLE_UPLOADPROGRESStotrue.The uploadprogress extension is used to track the progress of a file download.
XDebug: set
ENABLE_XDEBUGtotrue.XDebug is a debugger and profiler tool for PHP.
XML RPC: set
ENABLE_XMLRPCtotrue.XML-RPC is an extension for server and client bindings
YAML: set
ENABLE_YAMLtotrue.YAML is an extension providing a YAML-1.1 parser and emitter
Disable extensions
You can use DISABLE_<extension_name>=true in your environment variables to disable an extension.
Did this documentation help you ?