Link to home
Start Free TrialLog in
Avatar of Kosmok
Kosmok

asked on

Activating php extensions

Is it possible to activate the php extensions php_curl.dll and php_gd.dll by appending .htaccess or another local file?

I do not have access to /etc/php.ini and cannot uncomment the lines required to activate php extensions I require.

There lines are:
;extension=php_curl.dll
;extension=php_gd.dll

I know it's possible to override values set in /etc/php.ini by adding them to a the local file .htaccess.

eg.
php_value magic_quotes_gpc 0

As far as I understand, the php server needs to be restarted in order for the extensions to be loaded. Maybe somebody out there knows a trick?

Red Hat Linux release 8.0 (Psyche)
Apache Version 1.3.28 (Unix)
PHP Version 4.3.2
ASKER CERTIFIED SOLUTION
Avatar of heskyttberg
heskyttberg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

You can try the following, but I never tested it:

At top of page write:

<?
/* You might set the absolute path where the extension exsists, like /home/user/extension/my_ext.so */
ini_set("extension","php_gd.so");

?>
Avatar of heskyttberg
heskyttberg

Hi!

An extension cannot be loaded in this fashion, since it needs to restart the whole php engine in order to load an extension.
For info on settings to change in this manner see:
http://se.php.net/manual/en/function.ini-set.php

Regards
/Hasse