php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12054 getcwd() returns empty string
Submitted: 2001-07-11 10:36 UTC Modified: 2001-07-21 18:54 UTC
From: yoyoque at excite dot com Assigned:
Status: Not a bug Package: Directory function related
PHP Version: 4.0.6 OS: Red Hat Linux 2.2.12-20
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
28 + 43 = ?
Subscribe to this entry?

 
 [2001-07-11 10:36 UTC] yoyoque at excite dot com
Just upgraded to 4.0.6 and getcwd() no longer works.

test script:

#!/usr/bin/php
<?php
$curdir = getcwd();
print ( "Current dir is $curdir\n" );
?>

Old:
X-Powered-By: PHP/4.0.4pl1
Content-type: text/html

Current dir is /usr/local/nstats/stats/bin

New:
Extensions are not supported on this platform.
X-Powered-By: PHP/4.0.6
Content-type: text/html

Current dir is 

Configure info:
./configure \
--enable-track-vars \
--with-xml \
--enable-versioning \
--with-png-dir=/usr/local/png \
--with-zlib-dir=/usr/local/zlib \
--with-jpeg-dir=/usr/local/jpeg \
--with-freetype-dir=/usr/local/freetype \
--with-gd=/usr/local/gd-2.0.1 \
--with-gettext \
--with-socket \
--with-mysql=/usr/local/mysql-3.23.28-gamma-pc-linux-gnu-i686 
\
--with-sybase-ct=/usr/local/freetds \
--with-rrdtool

Versions:
jpeg-6b
freetype-2.0.4
zlib-1.1.3
libpng-1.0.12
gd-2.0.1
rrdtool-1.0.33 (linked to the above gd, png and zlib libs)
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 
release)
Red Hat 6.2
everything statically linked.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-21 18:54 UTC] andy@php.net
I tried your script with RH Linux 7 and this worked fine
with apache and with the shell script you presented.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Sep 25 05:01:23 2020 UTC