ID:               24420
 User updated by:  S dot Bennett at lancaster dot ac dot uk
 Reported By:      S dot Bennett at lancaster dot ac dot uk
-Status:           No Feedback
+Status:           Open
 Bug Type:         Directory function related
 Operating System: Linux
 PHP Version:      4.3.2
 New Comment:

Tested this against the latest snapshot (200308190730, which describes
itself as 4.3.3RC5-dev) it's still behaving as I described.


Previous Comments:
------------------------------------------------------------------------

[2003-08-18 19:43:27] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



------------------------------------------------------------------------

[2003-08-14 00:36:06] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



------------------------------------------------------------------------

[2003-08-03 19:17:22] aredridel at nbtsc dot org

I think I'm experiencing this or a related bug:

I've a page that most of the time works fine, but about 10% of the
time, the require() statement at the top doesn't find the file, which
is in the same directory as the script and referenced with a simple
relative path -- require('filename.inc')

------------------------------------------------------------------------

[2003-06-30 13:44:17] S dot Bennett at lancaster dot ac dot uk

Description:
------------
The current working directory seems to set to random values  under
certain circumstances. e.g. getcwd() returns inconsistent values (as
shown in the sample code) and attempts to reference files by relative
paths work intermittently or not at all (which is how I discovered this
bug..). 

Other variations on this code (eg calling getcwd() from an ob_start()
callback) appear to give similar results.

The code works fine from the command line (ie produces the expected
result).

I've configured PHP with the following, and still been able to
reproduce the result:
./configure --prefix=/usr/local/packages/php-4.3.2
--with-apxs=/usr/local/packages/apache-1.3.27/bin/apxs

I've also reproduced this problem on a Solaris box, also running Apache
1.3.27.



Reproduce code:
---------------
<?PHP
print "current time is '".strftime("%D %T")."'<br>\n";
print "(in main) cwd is '".getcwd()."'<br>\n";
register_shutdown_function("atexit");

function atexit()
{
    print "(in callback) cwd is '".getcwd()."'<br>\n";
}
?>


Expected result:
----------------
Something like:
current time is '06/30/03 18:39:24'
(in main) cwd is '/home/steveb/public_html/callbacktest'
(in callback) cwd is '/home/steveb/public_html/callbacktest'

Actual result:
--------------
actual results vary, here's two. All I did in between them was press
'reload'...

output 1:
---------
current time is '06/30/03 18:59:24'
(in main) cwd is '/home/steveb/public_html/callbacktest'
(in callback) cwd is '/home/www/vhosts/nutter.spoo.org/htdocs'

output 2:
---------
current time is '06/30/03 18:59:34'
(in main) cwd is '/home/steveb/public_html/callbacktest'
(in callback) cwd is '/home/steveb/public_html'

The values returned by getcwd() appear to be related to previous pages
that have been served by apache (not necessarily ones that have been
processed by PHP).



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24420&edit=1

Reply via email to