.htaccess tutorial

htaccess Elite


Using SetEnv to instruct php to use custom php.ini

The use of these awesome and useful mod_env directives and mod_setenvif directives setenvif

Using SetEnv to instruct php to use custom php.ini

New postby produke » 27 Sep 2006 07:17

In many installations of php, when run, php looks for the php.ini file in several different places. One of those places that we can change is the PHPRC server environment variable.

Code: Select all
SetEnv PHPRC /wwwroot/inc


That will tell php to look for php.ini in that directory
User avatar
produke
 
Posts: 242
Joined: 25 Sep 2006 04:48

Re: Using SetEnv to instruct php to use custom php.ini

New postby Reiem » 19 Aug 2008 01:47

Hello All,

I was hoping you could help me with a problem.

I use 1and1 I have both Managed & Shared packages but i can not get

Code: Select all
SetEnv PHPRC /wwwroot/inc


to work. I have been searching the net until I am blue in the face but can't figure it out.

I have a script that uses ioncube and unless I place the php.ini file I created in all directories that have encrypted files, the script fails. There are a lot of directories and I'm afraid I'm going to miss one.

I have changed the path to the directory containing my php.ini file and I have tried it with an without quotes.

What I have found is that I think it may be that it's using php as CGI but I'm not sure.

Any help would be appreciated.

Thanks.
Reiem
 
Posts: 1
Joined: 19 Aug 2008 01:40


Return to SetEnvIf, SetEnv, PassEnv, UnsetEnv