php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3379 split function bug
Submitted: 2000-02-01 15:11 UTC Modified: 2000-05-22 09:38 UTC
From: dobromir at antipodes-media dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 3 OS: Intel Solaris 7
Private report: No CVE-ID: None
 [2000-02-01 15:11 UTC] dobromir at antipodes-media dot com
I use a very simple code for directory listing:

<pre>
<?
$list = `ls ?1`;
$array = split(?\n?, $list);
unset( $array[count($array)-1] );
var_dump($array);
?>
</pre>

It worked very well with PHP 3.0.13 and Apache 1.3.9 but when I began to compile my Apache with PHP 4.0 it stopped working and the server log file is full with :

FATAL:  emalloc():  Unable to allocate -134922475 bytes
[Tue Feb  1 21:16:10 2000] [notice] child pid 8676 exit signal Segmentation Fault (11)


If I use explode instead of split the script works as it used to work with PHP 3.0.13.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-01 15:19 UTC] andrei at cvs dot php dot net
Try compiling with --with-system-regex if you are not doing it
already, or without it, if you are.
 [2000-05-22 09:38 UTC] andrei at cvs dot php dot net
No reply from submitter.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 11 09:01:32 2024 UTC