|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17893 getcwd return value always empty
Submitted: 2002-06-21 05:56 UTC Modified: 2002-06-24 06:38 UTC
From: tom dot fischer at ebuz dot de Assigned:
Status: Closed Package: Directory function related
PHP Version: 4.2.1 OS: FreeBSD-4.5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tom dot fischer at ebuz dot de
New email:
PHP Version: OS:


 [2002-06-21 05:56 UTC] tom dot fischer at ebuz dot de
I upgraded php from 4.0.6 to 4.2.1 and then a customer reported that he have a problem with the getcwd function. The value it returns was always empty. So i downgraded to 4.1.2 and the function works.

$curdir = getcwd();
print "Huhu: $curdir";

My configure line:

./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local --with-pgsql=/usr/local --enable-track-vars --with-openssl=/usr/local/ssl --enable-ftp --enable-sysvsem --enable-sysvshm --enable-sockets --with-mm=/usr/compile/apache/mm-1.1.3 --with-imap --with-gd --with-zlib=/usr --with-jpeg=/usr


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-21 12:24 UTC]
It works fine for me. Can you try a snapshot from to see if it's fixed?
 [2002-06-24 05:27 UTC] tom dot fischer at ebuz dot de
Okay, i tested php4-STABLE-200206240000 from, seems that it is fixed. I install it now on the other server. byacc support seems not working in this release so I installed bison

Making all in Zend
byacc -p zend -v -d ./zend_language_parser.y -o zend_language_parser.c
usage: yacc [-dlrtv] [-b file_prefix] [-o output_filename]
            [-p symbol_prefix] filename
*** Error code 1

Stop in /usr/compile/apache/php4-STABLE-200206240000/Zend.
*** Error code 1

Stop in /usr/compile/apache/php4-STABLE-200206240000.
 [2002-06-24 06:38 UTC]
If getcwd() works -> closed.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 17 05:03:37 2021 UTC