Results 1 to 4 of 4
  1. #1

    Allow custom php.ini

    I would like to know how to allow customers to use their own php.ini file. I have had hosts in the past that allowed you to use a custom php.ini file so long as you put it in every directory that you would need to use it.

    I was just trying to figure out how this is done as I am new to all of this and trying to learn.

    Thanks for any help you can give me.

  2. #2

    * Custom php.ini

    The settings are different based on how you configured your php to execute.

    When you run php as apache module

    Your .htaccess must contain
    AllowOverride Options OR AllowOverride All
    AddHandler application/x-httpd-php .php .htm

    And the root .htaccess must contain the
    SetEnv PHPRC /path/
    where path contains the container of php.ini file

    When you run php as cgi or fastcgi the settings differ.


  3. #3
    Join Date
    May 2008
    In case of PHP as CGI, if there is a php.ini in the directory from which the scripts are being called for in the browser, the directives from the local php.ini will take precedence over the global php.ini configuration file settings.

    How is PHP configured in the server ?

  4. #4
    thanks for the info.... it pointed me in the right direction to getting things setup the way I needed.

Posting Permissions

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