473,385 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Allowed memory size of 8388608 bytes exhausted

Hi,

I'm using TikiWiki and was using its file upload feature, trying to
upload a 2MB file. I get this error:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 1677706 bytes) in
/var/html/www/tiki/lib/filegals/filegallib.php on line 30

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 40 bytes) in Unknown on line 0

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 134 bytes) in Unknown on line 0

My settings are:

PHP Version 4.2.2
Apache/2.0.40 (Red Hat Linux)
memory_limit 8M
post_max_size 8M
upload_max_filesize 5M
upload_tmp_dir no value
(the machine has 512 MB RAM)

No one else is using this server, and that was the only thing I was
trying to do (i.e. upload a 2MB file).
Jul 16 '05 #1
3 12334

"Paul" <Pa******@telus.com> wrote in message
news:87**************************@posting.google.c om...
Hi,

I'm using TikiWiki and was using its file upload feature, trying to
upload a 2MB file. I get this error:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 1677706 bytes) in
/var/html/www/tiki/lib/filegals/filegallib.php on line 30

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 40 bytes) in Unknown on line 0

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 134 bytes) in Unknown on line 0

My settings are:

PHP Version 4.2.2
Apache/2.0.40 (Red Hat Linux)
memory_limit 8M
post_max_size 8M
upload_max_filesize 5M
upload_tmp_dir no value
(the machine has 512 MB RAM)

No one else is using this server, and that was the only thing I was
trying to do (i.e. upload a 2MB file).


I don't know if I can help - but someone might if you supply some code
around line 30 in your script
/var/html/www/tiki/lib/filegals/filegallib.php on line 30

Perhaps your script is caught in some loop and is eating resources...
Jul 16 '05 #2
In article <6L***********************@news2.calgary.shaw.ca >,
Randell D. <yo**************************@yahoo.com> wrote:

"Paul" <Pa******@telus.com> wrote in message
news:87**************************@posting.google. com...
Hi,

I'm using TikiWiki and was using its file upload feature, trying to
upload a 2MB file. I get this error:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 1677706 bytes) in
/var/html/www/tiki/lib/filegals/filegallib.php on line 30
I don't know if I can help - but someone might if you supply some code
around line 30 in your script
/var/html/www/tiki/lib/filegals/filegallib.php on line 30

Perhaps your script is caught in some loop and is eating resources...


I was getting this error recently (yesterday) when attempting to write an
empty string to a file using fwrite. The loop the write was in would
not terminate and the file being written to would keep growing.

Billy
Jul 16 '05 #3
Yes!! Changing the call to use md5_file seemed to do the trick.

Thanks very much!

Paul
-----
MeerKat <li****************@blueyonder.co.uk> wrote in message news:<UN*****************@news-binary.blueyonder.co.uk>...
Paul wrote:
As suggested, here's some code snippet:

25 function insert_file($galleryId,$name,$description,$filenam e, $data,
$size,$type ,$user,$path)
26 {
27 global $fgal_use_db, $fgal_use_dir;
28 $name = addslashes(strip_tags($name));
29 if ($fgal_use_db == 'n') {
30 $checksum = md5(implode('',file($fgal_use_dir.$path)));
31 } else {
32 $checksum = md5($data);
33 }

Line 30 seems harmless enough ... just 2 calls to standard PHP
functions...


on line 30, would:
$checksum = md5_file($fgal_use_dir.$path);
do a better job? And similar for 32:
$checksum = md5_file($data);

Just a thought...
Ideas anyone?

Paul
--------
Bi**********@thrillseeker.net wrote in message news:<7t***********@kudzu.thrillseeker.net>...
In article <6L***********************@news2.calgary.shaw.ca >,
Randell D. <yo**************************@yahoo.com> wrote:

"Paul" <Pa******@telus.com> wrote in message
news:87**************************@posting.googl e.com...

>Hi,
>
>I'm using TikiWiki and was using its file upload feature, trying to
>upload a 2MB file. I get this error:
>
>Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
>allocate 1677706 bytes) in
>/var/html/www/tiki/lib/filegals/filegallib.php on line 30

I don't know if I can help - but someone might if you supply some code
around line 30 in your script
/var/html/www/tiki/lib/filegals/filegallib.php on line 30

Perhaps your script is caught in some loop and is eating resources...

I was getting this error recently (yesterday) when attempting to write an
empty string to a file using fwrite. The loop the write was in would
not terminate and the file being written to would keep growing.

Billy

Jul 17 '05 #4

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

Similar topics

2
by: Phil Powell | last post by:
Actually the client is saying it sometimes happens and sometimes doesn't happen, and when they refresh their screen it clears itself (I assume the memory clears). Here is line 1135: $result =...
0
by: Joe | last post by:
Hi, Now I am using Red Hat Linux 8.0 + squirrelmail as mail server. One day, I got the following warning: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35...
22
by: xixi | last post by:
hi, we are using db2 udb v8.1 for windows, i have changed the buffer pool size to accommadate better performance, say size 200000, if i have multiple connection to the same database from...
3
by: f.amann | last post by:
hi there! i save images in a mysql db and i wrote a script called getimage.php to display them. in my getimage.php i want to resize my images to display them as thumbnails but there always...
0
by: prabhjeet | last post by:
I have DB2 v9 trial version installed on Windows 2003 Server with 1GB RAM. I am able to connect remotely through an ODBC data source to the database, but when I try to connect to that data source...
1
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...
3
by: spereira | last post by:
I am running XAMPP for Mac OS X 0.6.1 ! And since it did not have PDF libarires I downloaded ezpdf from the...
7
by: Jim Carlock | last post by:
I'm filling a really large array. Is there a way to get by this error message without editing the php.ini? The array needs to get built once, then looped through to fill a data- base, and it will...
5
by: kumarmdb2 | last post by:
Hi guys, For last few days we are getting out of private memory error. We have a development environment. We tried to figure out the problem but we believe that it might be related to the OS...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...

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.