Find the answer to your Linux question:
Results 1 to 4 of 4
Hi There, Is it possible to set the php extension_dir directive using an apache .htaccess file?, and if so what's the correct syntax Any help with this would be most ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Location
    NZ
    Posts
    67

    PHP extension_dir & .htaccess ?


    Hi There,

    Is it possible to set the php extension_dir directive using an apache .htaccess file?, and if so what's the correct syntax

    Any help with this would be most appreciated.

    Thanks in adv...


  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    Code:
    php_value <php.ini variable Name> <new value for variable>
    http://www.php.net/manual/en/configuration.changes.php

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Location
    NZ
    Posts
    67
    Hi There,

    I tried the following but had no joy :

    Code:
    php_value extension_dir /path/to/dir
    Not too sure if this can be changed this way as this is PHP_INI_SYSTEM - It states the following at the link you provided.

    php_value name value

    Sets the value of the specified directive. Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives. To clear a previously set value use none as the value.
    If anyone has any idea how/if this can be done that would be great.

    Thanks in adv...


  4. #4
    Just Joined!
    Join Date
    Jan 2005
    Location
    NZ
    Posts
    67
    Just found out that PHP_INI_SYSTEM can only be changed via the php.ini file. Here are a list of the other options if anyone else is interested.


    * PHP_INI_ALL - no restrictions
    * PHP_INI_SYSTEM - only at the configuration file (php.ini or httpd.conf)
    * PHP_INI_PERDIR - allows the value to be set on the per-directory basis, say in .htaccess files
    * PHP_INI_USER - can be changed by the user


    Oh well...may have to get the server admin to add the dir to the php.ini file.

    Thanks anyway...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •