PHP 4.0 Bug #5447 Updated: Apache Seg. Fault while using posix_getpwuid()

From: Date: Thu, 28 Sep 2000 11:06:05 +0000
Subject: PHP 4.0 Bug #5447 Updated: Apache Seg. Fault while using posix_getpwuid()
Groups: php.dev 
Request: Send a blank email to php-dev+get-33794@lists.php.net to get a copy of this message
ID: 5447 User Update by: jasonc@webpipe.net Old-Status: Closed Status: Open Bug Type: Reproduceable crash Description: Apache Seg. Fault while using posix_getpwuid() As of 4.0.2, it still doesn't work. Jason Previous Comments: --------------------------------------------------------------------------- [2000-07-08 10:47:27] stas@cvs.php.net Fixed in latest CVS. Please check. --------------------------------------------------------------------------- [2000-07-08 00:51:48] jasonc@webpipe.net The following causes an Apache Seg Fault: <? $dir = "/var/tmp"; exec("ls $dir",$dir_content,$returnVal); if($returnVal == 1) { echo"Unable to process request.<br>"; } ?> <html> <body> <? for($i =0; $i < count($dir_content); $i++) { $file = $dir."/".$dir_content[$i]; echo $file." -- "; $owner_info = posix_getpwuid(fileowner($file)); echo $owner_info["name"]."<br>n"; } ?> </body> </html> PHP Configuration: './configure' '--with-apache=../apache_1.3.12' '--with-config-file-path=/usr/local/apache/conf/' '--enable-track-vars' '--enable-magic-quotes' '--with-cybercash=/usr/local/cybercash/' '--with-gd=/usr/local/gd-1.8.3/' '--with-jpeg-dir=/usr/local/gd-1.8.3/' '--with-ttf=/usr/local/gd-1.8.3/' '--with-imap=/usr/local/imap/' '--with-mysql=/usr/local/mysql/' '--with-pdflib=/usr/local/lib/' '--with-pgsql=/usr/local/pgsql/' '--disable-debug' If you need a copy of php.ini, let me know. If I hardcode a file within the loop like "/tmp/test.txt" it works fine. It has problems when it steps through the array. However, if you comment out the line with the posix_getpwuid() function, everything works fine. Jason --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=5447

« previous php.dev (#33794) next »