Switching a PHP extension on or off in Select PHP Version

In cPanel, open Select PHP Version (the Software section), pick the PHP version, open the Extensions tab and tick or untick the extension’s box. That is all, and it takes a minute. What catches people out comes after: every PHP version has its own list of enabled extensions.

Step by step

1 In cPanel, under Software, open Select PHP Version.
2 At the top, check which version you are editing. If your site runs on another version, your changes do not touch it.
3 Open the Extensions tab and look for the extension by name. Tick the box to switch it on; untick to switch it off.
4 Open the page again to confirm the box is still ticked.
5 Check on the site: a page containing <?php phpinfo(); shows a section named after the extension if it really is loaded. Delete that file afterwards.

It exists, but it ships switched off

Many extensions are on the server and ship switched off, so an account does not load what it never uses. That is the case for pgsql and pdo_pgsql (PostgreSQL), imagick, redis, memcached, apcu and opcache. The selector’s list is what you can switch on; phpinfo only shows what is loaded right now. So an extension missing from phpinfo may be one tick away.

What for Extension to look for
Talking to PostgreSQL from PHP pgsql and pdo_pgsql. PostgreSQL exists on the account; the module only needs switching on.
Handling images (resize, convert) gd is the basic one; imagick for more. See switching Imagick on.
Text in several languages mbstring (and intl for formatted dates and currencies).
Zip files, XML or SOAP zip, xml/dom, soap.

Two things tend to get in the way. First: the extension is not in the list for that PHP version. Not every extension exists for every version, especially the older ones. Try another version or, if you really need that one, think about a VPS, where you install whatever you like. Second: the application asks for a loader for encoded code. Those loaders are in the list too (look for ioncube_loader or sourceguardian) and are switched on the same way.

The redis extension switches on, but it brings no server. The box only gives PHP the ability to talk to a Redis. On this shared hosting there is no Redis or Memcached server listening for your account to use; object caching is done on a VPS, where you install whatever service you want. WordPress page caching is a different thing, and that one exists.
Switching off an extension the site needs causes an error. The typical symptom is “Call to undefined function”. If it starts right after you touched this screen, tick the box again and read the extension that is missing.
Enable only what the site asks for. Every enabled extension is loaded on every request. If you do not know what one does, leave it as it is.

Cannot find the extension in the list, or it does not show as loaded after you ticked it? Tell us which one and the PHP version.

Open a support ticket

SEE ALSO

“Call to undefined function”: the extension that is missing

Viewing and adjusting your PHP configuration

Switching Imagick on in PHP

Which PHP version should your site use

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from $5.36/mo (3-year plan, with coupon)

See plans
  • 0 Users Found This Useful
Was this answer helpful?