#19741 [NEW]: Path no longer works in unlink, pdf_open_file
| From: | scott at meikohou dot com | Date: | Thu, 03 Oct 2002 19:48:06 +0000 |
| Subject: | #19741 [NEW]: Path no longer works in unlink, pdf_open_file | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-21409@lists.php.net to get a copy of this message | ||
From: scott@meikohou.com
Operating system: linux 2.4.18
PHP version: 4.2.3
PHP Bug Type: Apache2 related
Bug description: Path no longer works in unlink, pdf_open_file
In old apache
1.3.26/php.4.0.6
if (file_exists("somefile.pdf")) unlink("somefile.pdf");
pdf_open_file($pdf, "somefile.pdf");
would check the current directory.
ie .. it will do these actions whereever documentroot happens to be.
now it does not do this anymore in Apache/2.0.42 (Unix) mod_ssl/2.0.42
OpenSSL/0.9.6b PHP/4.2.3
in apache 2.0.42
getcwd() returns the current working directory <documentroot>
however if i do chdir (documentroot)
the first command
if (file_exists("somefile.pdf")) unlink("somefile.pdf");
will work
but the 2nd
pdf_open_file($pdf, "somefile.pdf");
will not.
the workaround seems to be to work is to include the whole path
pdf_open_file($pdf, "$documentroot/somefile.pdf");
which appears to work .. is this a bug or a feature?
--
Edit bug report at http://bugs.php.net/?id=19741&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19741&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19741&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19741&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19741&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19741&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19741&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19741&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19741&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19741&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19741&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19741&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=19741&r=dst