The php.ini file located inside windows folder ( or inside php folder ) can be edited to change the extension directory location. The location of php.ini file also can be collected from php info display. Inside the php.ini file there is a line saying like this.
; Directory in which the loadable extensions (modules) reside.
extension_dir = "c:\php_new\ext"
Change the above line to point to correct extension directory path. After showing the path inside php.ini file below the above line there will be all dlls listing and any dll can be added or removed by commenting or removing the comment before it. Here is some listing examples.
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
extension=php_msql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
You can see three .dlls are in use. The comments lines are removed. This is the way we add or remove extensions for PHP.
<?Php
if (extension_loaded('gd')) {
echo "<br>GD support is loaded ";
}else{
echo "<br>GD support is NOT loaded ";
}
?>
Note that these all are in window platform.
Vaijanath | 18-07-2014 |
What about Linux systems? I'm using LAMP. Working on linux mint os and apache web server. How to enable gd support in Lamp? |