Re: [PHP4BETA] $array[$i] doesn't contain any values!
| From: | Andi Gutmans | Date: | Tue, 01 Jun 1999 19:02:55 +0000 |
| Subject: | Re: [PHP4BETA] $array[$i] doesn't contain any values! | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-1232@lists.php.net to get a copy of this message | ||
exec() wasn't properly using API functions and was using low-level PHP 3.0 data structures. Zeev fixed it now (update your php4 cvs).
Thanks for the bug report!
Andi
At 14:45 01/06/99 +0200, Davor Cengija wrote:
--- Andi Gutmans <andi@zend.com> ICQ: 1568297i have a script which calls ls -a1------------------------pwdin the directory where the script resides and in for loop gives me the content of the direcho '<h2>Links</h2> ';exec ("/bin/ls -a1pwd", $content, $error);if ($error) { echo "error: $error<br>"; }for ($i=0; $i<count($content); $i++) { $a = $content[1]; echo $i." ".$a.'<br>'; };------------------------eny other combination of echo $content[$i] doesn't work as well. echo $content[1] has no values either.this causes the server to die------------------------------- echo 'filling the array';for ($j=0; $j<10; $j++) { $polje[$j] = $j; echo 'j='.$j.'<br>polje[j]='.$polje[$j]'.<br>'; echo 'velièina polja' . count($polje) . '<br>'; }echo 'now display the array $polje';for ($j=0; $j<count($polje); $j++) {echo 'j='.$j.'<br>polje[j]='.$polje[$j]'.<br>'; echo 'size: ' . count($polje) . '<br>'; }--------------------------------- [Tue Jun 1 14:32:49 1999] [notice] child pid 8584 exit signal Segmentation fault (11), possible coredump in /opt2/davor/php4/apachei would run httpd through gdb but somehow i dont have the man page and don't know how to do it. explanation, please?apache 1.3.6i dont have to mention the scripts above works just fine with php3.0.5 and apache 1.3.3i have also problems with php4 compiled as a stand-alone binary in parsing a big txt file. php3 binary parses taht 50000 lines long file for about 220sec. php4 fails on ereg() call but i didnt have time to experiment with it. expect the report tomorrow.p.s. if there are any typos in the scripts, they do not exists in the real version, con i typed the scripts into this message, not copy/paste.--vDavor Cengija davor@linuxfan.com ==================================== "Please allow 30 days for delivery." -- PHP 4 Beta