SAbboushi
asked on
PHPINIDIR ignored in W7 Apache (WampServer)
I want Apache to load my php.ini file from a folder on my d: drive.
C:\wamp\bin\apache\Apache2 .2.21\conf \httpd.con f
Restarting all services with the WampServer system tray icon displays a Green "W" with the above PHPIniDir statement. But http://localhost/?phpinfo=1 shows:
Tried other options, but didn't work either:
Same with:
How can I get Apache to use d:\documents\Application Data\PHP\php.ini?
Thanks-
Sam
W7 64, IE9
C:\wamp\bin\apache\Apache2
...
ServerRoot "c:/wamp/bin/apache/apache2.2.21"
PHPIniDir "d:\documents\Application Data\PHP\"
...
Restarting all services with the WampServer system tray icon displays a Green "W" with the above PHPIniDir statement. But http://localhost/?phpinfo=1 shows:
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File: C:\wamp\bin\apache\Apache2.2.21\bin\ php.ini
Tried other options, but didn't work either:
PHPIniDir "d:\documents\Application Data\PHP"
(no final "\") results in an orange "W" and http://localhost/?phpinfo=1 shows "Internet Explorer cannot display the webpage"Same with:
PHPIniDir "d:/documents/Application Data/PHP/"
andPHPIniDir "d:/documents/Application Data/PHP"
How can I get Apache to use d:\documents\Application Data\PHP\php.ini?
Thanks-
Sam
W7 64, IE9
ASKER
Thanks for your response--
>>you might not be able to set permissions to allow it.
Permissions are the same for both folders
>>Another issue is that the path has a space in it
Good idea - but eliminating the space had no effect
>>I am wondering why you want to do this when it works fine where it is originally located.
Backup/restore and system partition imaging
>>you might not be able to set permissions to allow it.
Permissions are the same for both folders
>>Another issue is that the path has a space in it
Good idea - but eliminating the space had no effect
>>I am wondering why you want to do this when it works fine where it is originally located.
Backup/restore and system partition imaging
Try creating a new folder like D:\wampdata and put it there. See if Apache will find it there.
ASKER
Copied the bin folder containing the php.ini from the original location and changed php.ini to:
PHPIniDir "d:\bin\"
Restarted services. No effect...
I went through this same problem with IIS and it took over a year before I figured out I also had to make a change to an internal environment variable for php-cgi.exe...
Hoping to figure this out a little sooner this time!
PHPIniDir "d:\bin\"
Restarted services. No effect...
I went through this same problem with IIS and it took over a year before I figured out I also had to make a change to an internal environment variable for php-cgi.exe...
Hoping to figure this out a little sooner this time!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
k thanks for your help.
with regards-
Sam
with regards-
Sam
ASKER
Success!!
Create a System Environment variable "PHPRC" with the value "D:\Documents\Application Data\PHP", restart all services, and phpinfo() shows:
This didn't work with IIS so I didn't bother to try it until now on Apache...
Create a System Environment variable "PHPRC" with the value "D:\Documents\Application Data\PHP", restart all services, and phpinfo() shows:
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File: D:\Documents\Application Data\PHP\php.ini
This didn't work with IIS so I didn't bother to try it until now on Apache...
Good for you.
I am wondering why you want to do this when it works fine where it is originally located.