Php – Enable PHP extension within .htaccess

.htaccessPHP

Does anyone know how to enable a PHP extension within the .htaccess file?

Possibly:

(.htaccess file)
php_value extension=php_soap.so

Best Answer

It's exactly the same syntax as Apache's httpd.conf, so it's:

LoadModule php_soap modules/php_soap.so

(for the "modules" bit, I'm assuming you're using the normal modules directory from /etc/httpd. If not, put that directory in it's place.) (Wrong)

It's not a module, as I'd originally thought, but a php extension. Extensions have the following syntax:

extension=soap.so (also wrong)

Apparently it's:

php_extension soap.so

Got that from this thread in a Drupal forum. Ymmv. I'm going home now, since clearly my brain is shot for the day.

Also, make sure you allow for override, or the webserver will ignore your .htaccess file.

Related Topic