#19552 [Bgs]: path is always where php was compiled

From: Date: Wed, 25 Sep 2002 04:45:11 +0000
Subject: #19552 [Bgs]: path is always where php was compiled
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-20260@lists.php.net to get a copy of this message
ID: 19552 User updated by: sproctor@ccs.neu.edu Reported By: sproctor@ccs.neu.edu Status: Bogus Bug Type: Apache2 related Operating System: linux PHP Version: 4.2.3 New Comment: I had the same problems in php4-200209240900. when was the problem fixed? I can try it again if you think it's fixed now. Also, when will the next stable version be released? Thanks again, Sean Previous Comments: ------------------------------------------------------------------------ [2002-09-24 17:32:27] edink@php.net There was a bug with virtual directory support in 4.2.3 used with multithreaded web servers. It's been fixed in both STABLE and HEAD branches. You should not rely on environment for CWD in a multithreaded server, since all threads share the same. The directory you're getting is probably the one you were in when starting Apache2. Use getcwd() instead. ------------------------------------------------------------------------ [2002-09-24 16:18:31] sproctor@ccs.neu.edu it causes php scripts to not run. the problem isn't that $_ENV['PWD'] is wrong, it's that php looks in the wrong place for files to include. if I "include 'foo.php';" it will look for it in /home/sproctor/php-xxx instead of from the location of the file. The CGI version works fine, the apache1 version works fine, the apache2 version fails. It's not too big of a deal for me thought because we have the CGI version working. Perhaps it's a bug in apache2, either way PHP seems rather unusable as an apache2 module right now. Thanks for the help, Sean ------------------------------------------------------------------------ [2002-09-24 15:56:13] jmoore@php.net This might be for one of two reasons, this was the dir you started apache from, or it might be a bug in apache2. I cannot see how this bug comes from PHP. The variables' and the values for them are taken directly from the server or environment variables provided to PHP. Bogusify. - James ------------------------------------------------------------------------ [2002-09-24 15:27:12] sproctor@ccs.neu.edu I tried the latest version. now $_ENV['PWD'] is just /home/sproctor/php4-200209240900. I imagine it's an apache2 issue because that's the only weird thing I'm doing. apache2 works fine on our server for everything else. I'll try building it as a CGI and see if that works. ------------------------------------------------------------------------ [2002-09-23 05:27:48] sander@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/19552 -- Edit this bug report at http://bugs.php.net/?id=19552&edit=1

« previous php.bugs (#20260) next »