G'day,
Got a bizzare issue with PHP 5.0.2/Apache constantly generating
variations of the following error:
"Fatal error: Possible integer overflow in memory allocation"
At first I traced it through to any line using the $_SERVER[] command
and so replaced it with $HTTP_SERVER_VA RS[].
This worked fine, however now I seem to get the issue whenever I use a
"preg_match " command.
Is there some greater global variable/configuration item that I need to
sort out to stop this from happening or is it something else?
For example, trying to implement a VERY basic PHP image gallery script,
the following function errors on the "if (preg_match" line - as have
several other scripts.
function GetFileList($di rname="."){
global $config;
$list = array();
if ($handle = opendir($dirnam e)) {
while (false !== ($file = readdir($handle ))) {
if (preg_match("/\.(jpeg|gif|png )$/i",$file)) {
$list[] = $file;
}
}
closedir($handl e);
}
sort($list);
return $list;
}#-#GetFileList()
Any help would be GREATLY appreciated!
Thanks in advance
Chris
Got a bizzare issue with PHP 5.0.2/Apache constantly generating
variations of the following error:
"Fatal error: Possible integer overflow in memory allocation"
At first I traced it through to any line using the $_SERVER[] command
and so replaced it with $HTTP_SERVER_VA RS[].
This worked fine, however now I seem to get the issue whenever I use a
"preg_match " command.
Is there some greater global variable/configuration item that I need to
sort out to stop this from happening or is it something else?
For example, trying to implement a VERY basic PHP image gallery script,
the following function errors on the "if (preg_match" line - as have
several other scripts.
function GetFileList($di rname="."){
global $config;
$list = array();
if ($handle = opendir($dirnam e)) {
while (false !== ($file = readdir($handle ))) {
if (preg_match("/\.(jpeg|gif|png )$/i",$file)) {
$list[] = $file;
}
}
closedir($handl e);
}
sort($list);
return $list;
}#-#GetFileList()
Any help would be GREATLY appreciated!
Thanks in advance
Chris
Comment