473,799 Members | 3,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fatal error: Possible integer overflow in memory allocation

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

Apr 19 '06 #1
3 6045
ch***********@g mail.com wrote:
Any help would be GREATLY appreciated!

How much memory are you allocating to PHP? I use 8MB in production and 16MB
in development.

You may have faulty memory -- run a memory test at memtest.org
--
Carl Vondrick
Web-Enginner
www.CarlSoft.net
To contact me, please use my website.
Apr 19 '06 #2
Carl,

Good call on the memory. I have no idea how much is allocated - how to
I look that up and/or change the allocation?

cheers

chris

Apr 20 '06 #3
Limits are set in php.ini on how much memory a script may use before
php kills it

Apr 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
6496
by: MFA | last post by:
Hi All Thanks to all who replied to my question dated 16/10/2003 with the same subject.. In all replies I got every one is saying that I am using cint() etc. But i am not using any convert method. What I am using.
7
4674
by: Sean | last post by:
Can someone help me see why the following "operator=" overloading doesn't work under g++? and the error message is copied here. I see no reason the compiler complain this. Thanks, $ g++ copyconstructor1.cpp #copyconstructor1.cpp: In function `int main()': #copyconstructor1.cpp:86: no match for `sample& = sample' operator #copyconstructor1.cpp:53: candidates are: sample sample::operator=(sample&) ...
6
1723
by: MLH | last post by:
I have the following procedure in a form module in A97. I have the NewOutRefDate global var declared in a standard module named "Declarations". It is dim'd as Variant. Private Sub Command9_Click() NewOutRefDate = 192 / (24 * 60 * 60) Debug.Print NewOutRefDate End Sub The attempted assignment fails with an overflow error when it
0
1515
by: pillars | last post by:
I have been developing an application in Windows CE.Net using the .Net Compact Framework and C#. Data is saved to a local Sql Server CE database and then transferred wirelessly to a central server. The device has to open a connection every 5 minutes, transfer all records and then disconnect. I have been running tests to verify the capacity of the database, if, for example, the network goes down and transfers cannot be made. I have...
351
13163
by: CBFalconer | last post by:
We often find hidden, and totally unnecessary, assumptions being made in code. The following leans heavily on one particular example, which happens to be in C. However similar things can (and do) occur in any language. These assumptions are generally made because of familiarity with the language. As a non-code example, consider the idea that the faulty code is written by blackguards bent on foulling the language. The term...
13
2486
by: a.zeevi | last post by:
free() multiple allocation error in C ==================================== Hi! I have written a program in C on PC with Windows 2000 in a Visual C environment. I have an error in freeing multiple allocation as follows: 1. I allocated an array of pointer. 2. I Read line by line from a text file. 3. I allocated memory for the read line.
1
2978
by: Kimmo Laine | last post by:
Hi! We've encountered a strange problem concerning memory usage. In the previous install the maximum memory amount per page was limited to 8 MB and it was never reached. Now, after upgrading both hardware and software, running the same scripts that used to be fine with 8 MB hit the roof all the time. The maximum memory allocation was set to 128 MB and still PHP encounters fatal errors with allowed memory size exhausted. Pardon my french,...
4
1442
by: JDHawk | last post by:
Hi, when I compile my c++ program, MS Visual C++ (2003) shows this error: Damage: after Normal Block (#139) at 0xXXXXXXXX In Debug Mode I found out that it is the deallocation with "delete" in the destructor. When hiding the delete, there is no error, but I want to set my data free in the destructor before the object dies. It has something to do with the array that is allocated, cause a deletion of the ponter
30
2696
by: Angel Tsankov | last post by:
Hello! Does the C++ standard define what happens when the size argument of void* operator new(size_t size) cannot represent the total number of bytes to be allocated? For example: struct S { char a; };
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10490
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10260
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10243
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5590
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.