Ask a Question related to PHP Bugs, Design and Development.
-
derick@php.net #1
#40661 [NEW]: cwd is reset when shutdown handler runs
From: [email]derick@php.net[/email]
Operating system: Linux
PHP version: 4CVS-2007-02-27 (CVS)
PHP Bug Type: *Directory/Filesystem functions
Bug description: cwd is reset when shutdown handler runs
Description:
------------
When this script is run with the Apache1 sapi the second CWD is reset to
/.
This is an issue for both php 4.4.4 and php 5.2.1rc3.
Reproduce code:
---------------
<?php
echo "CWD = ", getcwd(), "\n";
function handler()
{
echo "CWD = ", getcwd(), "\n";
echo dirname( __FILE__ ), "\n";
}
register_shutdown_function( 'handler' );
?>
--
Edit bug report at [url]http://bugs.php.net/?id=40661&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40661&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40661&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40661&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40661&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40661&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40661&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40661&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40661&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40661&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40661&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40661&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40661&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40661&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40661&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40661&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40661&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40661&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40661&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40661&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40661&r=mysqlcfg[/url]
derick@php.net Guest
-
Anyone runs tdiary 1.5.6?
Hi! I'm trying to setup some simple Ruby blogger to enable me upload RSS feeds to the server. Having some problems with blogtari, I am trying... -
DataGrid's UpdateCommand event handler and CancelCommand handler problem
I am having the same problem: the wrong event handler is being fired when column headings and page changes are clicked. I am using the datagrid... -
PhotoShop 7 no more runs
I am working on Win-XP family edition. Yesterday the XP-system makes an "upgrate what's new" (I don't know what it fixed), and now I cannot run... -
Fast signal handler switching & thread-specific handler.
jek_bask@ngs.ru (Evgeny Baskakov) writes: This is quite likely to crash on at least some pthread implementations (especially if sigaltstack was... -
CPU runs without L2 cache?
i've a 43p-360 with two power3 200mhz processors. when i do a "lsdev -Ccprocessor" i get "proc0" and "proc2" as answer. when i do a "lsdev... -
tony2001@php.net #2
#40661 [Opn->Bgs]: cwd is reset when shutdown handler runs
ID: 40661
Updated by: [email]tony2001@php.net[/email]
Reported By: [email]derick@php.net[/email]
-Status: Open
+Status: Bogus
Bug Type: *Directory/Filesystem functions
Operating System: Linux
PHP Version: 4CVS-2007-02-27 (CVS)
New Comment:
See [url]http://bugs.php.net/bug.php?id=36529[/url]
Previous Comments:
------------------------------------------------------------------------
[2007-02-27 14:44:41] [email]derick@php.net[/email]
Description:
------------
When this script is run with the Apache1 sapi the second CWD is reset
to /.
This is an issue for both php 4.4.4 and php 5.2.1rc3.
Reproduce code:
---------------
<?php
echo "CWD = ", getcwd(), "\n";
function handler()
{
echo "CWD = ", getcwd(), "\n";
echo dirname( __FILE__ ), "\n";
}
register_shutdown_function( 'handler' );
?>
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40661&edit=1[/url]
tony2001@php.net Guest
-
derick@php.net #3
#40661 [Bgs->Opn]: cwd is reset when shutdown handler runs
ID: 40661
Updated by: [email]derick@php.net[/email]
Reported By: [email]derick@php.net[/email]
-Status: Bogus
+Status: Open
Bug Type: *Directory/Filesystem functions
Operating System: Linux
PHP Version: 4CVS-2007-02-27 (CVS)
New Comment:
I disagree, there is no reason why PHP can't reset the CWD to the
correct directory when a shutdown handler is run. That is what I would
expect to happen.
Previous Comments:
------------------------------------------------------------------------
[2007-02-27 14:54:34] [email]tony2001@php.net[/email]
See [url]http://bugs.php.net/bug.php?id=36529[/url]
------------------------------------------------------------------------
[2007-02-27 14:44:41] [email]derick@php.net[/email]
Description:
------------
When this script is run with the Apache1 sapi the second CWD is reset
to /.
This is an issue for both php 4.4.4 and php 5.2.1rc3.
Reproduce code:
---------------
<?php
echo "CWD = ", getcwd(), "\n";
function handler()
{
echo "CWD = ", getcwd(), "\n";
echo dirname( __FILE__ ), "\n";
}
register_shutdown_function( 'handler' );
?>
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40661&edit=1[/url]
derick@php.net Guest



Reply With Quote

