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

From: Date: Mon, 27 Nov 2000 10:21:48 +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-39207@lists.php.net to get a copy of this message
ID: 5447 Updated by: sniper Reported By: jasonc@webpipe.net Status: Closed Bug Type: Reproduceable crash Assigned To: Comments: I can not reproduce this with latest CVS. IE sometimes seems to cache error pages so try to refresh the page with <ctrl+shift>+Reload. Reopen if problem still exists with latest snapshot from http://snaps.php.net/ --Jani Previous Comments: --------------------------------------------------------------------------- [2000-09-28 07:33:10] jasonc@webpipe.net OK. This is really weird and I can't figure this out. If the directory is /tmp, /usr, or /usr/local, it works great. If it's something like /usr/bin or /home, it chokes. I originally thought that it might be a permissions thing but that doesn't seem to be it. Another weird thing with this is that IE prints "Cannot find server" for the title even if the script works and a title is specified and prints in the source. Let me know if I can provide any additional info. Jason --------------------------------------------------------------------------- [2000-09-28 07:06:05] jasonc@webpipe.net As of 4.0.2, it still doesn't work. Jason --------------------------------------------------------------------------- [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 (#39207) next »