Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1475
  • Last Modified:

Fatal error: Allowed memory size of 33554432 bytes exhausted ?

Hi,
I have a PHP script that allows the upload and conversion of photos to jpeg and works fine on one server but not on another.

I have VPS hosting and wanted to know if there is a setting I can change via cPanel/WHM


Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3168 bytes) in /home/mywebsite/public_html/admin/add_upd_item.php on line 111

$tempFile = $_FILES['image1']['tmp_name'];      
line 111---> $image = imagecreatefromjpeg($tempFile);

Thanks

Andrew
0
sabecs
Asked:
sabecs
  • 2
1 Solution
 
Paul SDesktop Support Manager / Network AdministratorCommented:
I had the same problem. There is a memory limit that you exceed. Only upload smaller images or get more memory resources allocated to your account.
0
 
Paul SDesktop Support Manager / Network AdministratorCommented:
PHP imagecreatefromjpeg fails due to memory limit.
http://www.paulscomputerservice.net/articles/article.php?ID=63
0
 
GaryCommented:
You could just add into that upload page as the first line
ini_set('memory_limit', '64M');

Or increase as necessary
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now