• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2233
  • Last Modified:

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
0
Kosmok
Asked:
Kosmok
  • 2
1 Solution
 
heskyttbergCommented:
Hi!

This can only be done with certain values.
An extension must be loaded when php starts and in this case this is when Apache starts.
And the linse should not be .dll in a RedHat environment.

So if you want thoose extension you have to talk the server owner into activating them.

Regards
/Hasse
0
 
niggCommented:
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");

?>
0
 
heskyttbergCommented:
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
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now