|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-07-08 10:47 UTC] stas at cvs dot php dot net
[2000-09-28 07:06 UTC] jasonc at webpipe dot net
[2000-09-28 07:33 UTC] jasonc at webpipe dot net
[2000-11-27 05:21 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 24 10:00:02 2025 UTC |
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