This topic is locked

Picture : Error

8/1/2008 1:00:45 PM
PHPRunner General questions
K
kklh author

When i try to uplooade a picture to the database i get this error
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 7680 bytes) in C:\www\Server_Rooms_pictures\include\commonfunctions.php on line 1040
Can you help me
Thanks.
Kim.

J
Jane 8/4/2008

Kim,
to increase file size edit your php.ini file.

; Maximum allowed size for uploaded files.

upload_max_filesize = 2M

post_max_size = 8M

S
swanside 8/4/2008

Or you might need to change the field in your MySQL database to either a LONGBLOB or LONGTEXT. Either will work.

K
kklh author 8/4/2008

Hi
Thanks for your help but it dosnt work and the size off the images is only approx: 400 kb.

and it is a longblob
Regards

Kim

J
Jane 8/4/2008

Kim,
try to increase value of memory_limit PHP configuration option in php.ini file.
Or add this line into the beginning of generated include\dbcommon.php file:

ini_set("memory_limit","64M");


Insert it just after "<?php" line.

K
kklh author 8/5/2008

Hi Jane
Thanks, it was that.
Regs Kim