php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #29694 SetEnv PHPRC in httpd.conf has no effect
Submitted: 2004-08-16 04:44 UTC Modified: 2004-09-28 13:59 UTC
Votes:6
Avg. Score:4.0 ± 1.2
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:3 (60.0%)
From: mvl22 at mailinator dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.0.1 OS: Windows XP
Private report: No CVE-ID: None
 [2004-08-16 04:44 UTC] mvl22 at mailinator dot com
Description:
------------
http://www.php.net/manual/en/install.windows.apache1.php
states

"
# specify the directory where php.ini is
SetEnv PHPRC C:/php
"

My httpd.conf has
SetEnv PHPRC "C:/program files/php"
in it and, after reboot, phpinfo () gives:

Configuration File (php.ini) Path  C:\WINDOWS
but
PHPRC  C:/program files/php
is shown (which is correct).

php.ini does exist at C:/program files/php/php.ini

Using c:/progra~1/php with or without a trailing slash does not change the situation.

PHP5.0.1 is otherwise working fine.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-03 18:29 UTC] ipa at beta dot lt
I have same problem in same configuration, and can add that it doesn't see php.ini file in apache directory. Only "C:/windows" (default), or path set in registry key "HKLM\Software\PHP\IniFilePath" works for me.
 [2004-09-10 19:24 UTC] bgleason at mwgl dot org
Same here... It kept trying to set the directory to c:\php5 for me even though I specified d:\php...

windows 2003 server running apache 1.3.31. If you need any other information just shoot me an email...
 [2004-09-26 12:35 UTC] astervick at infinito dot it
PHP 5.0.2
W2000 with all the patches about security
Apache 1.3

Php.ini is not read where I tell Apache with setenv PHPRC..
in httpd.conf

I put it in c:\WINNT and php.ini is read and it's ok

Thanks to people who wrote about this before me!
Ciao
 [2004-09-27 01:44 UTC] rasmus@php.net
PHP checks the real environment, not the Apache environment for PHPRC.  Changing this to a documentation problem.
 [2004-09-27 09:57 UTC] vrana@php.net
Result of a test under Windows XP:

Apache 2.0.50 - PHP 5: SetEnv PHPRC works
Apache 1.3.27 - PHP 5: SetEnv PHPRC works
Apache 1.3.27 - PHP 4: SetEnv PHPRC doesn't work
Apache 2.0.50 - PHP 4: SetEnv PHPRC doesn't work

Strange, it's different from what other people say.
 [2004-09-27 20:14 UTC] ipa at beta dot lt
Tried 5.0.2 + Apache 1.3.27 (instead of 5.0.1) 

1. putting php.ini into apache dir started working
2. adding PHPRC into environment works (Rasmus was right)
 [2004-09-28 13:59 UTC] aidan@php.net
With Apache/1.3.31 (Win32) PHP/5.0.2 setting PHPRC did not work. Setting the system enviroment variable did work.

I'm not sure what you did vrana, but I think if it doesn't work in all cases it's best to pretend it doesn't exist!

I've changed the documentation to reflect these new steps.

Thanks for the bug report and help making our documentation better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 29 05:01:29 2024 UTC