View Tutorial Metadata Edit Content Revision History Add to Watchlist Add New Tutorial How to enable a PHP extension

Enabling a PHP extension

Enable a PHP extension

For this tutorial you should have PHP installed on your system: How to Install PHP

First Locate your PHP Configuration file(s)

Please note that you can typically only install extensions on systems which you have access. On shared hosting you have to work with whatever extensions are installed on the server, and have to contact customer support to get a new one installed.

Open the php.ini configuration file. In the default PHP installation, there should be a list of commented available extensions, like:

;extension=gd.so

Remove the ";" before the extensions you wish to enable, so that it becomes

extension=gd.so

Extensions are files, and they're located in a directory. To see the available extensions, check out the "extensions_dir" setting.

If you're running a web server, you should restart it. If there are no errors, then your extension should be enabled and work. What you want to do next, is check to see if PHP recognized the extension: Checking if your system has a PHP extension installed .

Only plain text supported.

Optional

Required - will be kept private

Optional

 
 

Rating: (0+, 0-) In: PHP 5