PDA

View Full Version : Php Memory Settings


timlau
08-28-2005, 04:23 AM
I've been getting error messages whenever I try to work with large images (8 megapixels).

All the searches in google leads me to one thing - the default PHP memory setting is 8 MB, and I need to increase this. Something to do with PHP.ini

Where would I do so? or Can I do so myself?

thevillageinn
08-28-2005, 04:35 AM
Copy and paste the following into a text file, name it with a .php extension and upload it to your website. When you browse to it in your web browser you'll see what the actual upload settings are for your server, and then you can submit a helpdesk ticket (http://helpdesk.hostpc.com) if you'd like to request they make a change.

<html>
<head>
<title>Test PHP Script</title>
</head>

<body>
<?php

phpinfo();

?>
</body>
</html>

timlau
08-28-2005, 05:40 PM
Thx.

It says :

upload_max_filesize & memory_limit = 32M for Local and Master value

--

the error msg: ( ... = domain stuff)

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 14016 bytes) in .../include/picmgmt.inc.php on line 209

I take it it's not enough.

I uploaded a pic at 100, 90, 80 and 70% of the original size, and got errors on 100% and 90%. 80% of 8 megapixel is still over 6 megapixel... I suppose it's good enough.

thevillageinn
08-28-2005, 09:37 PM
have you tried using Irfanview to open and then save your photo? It handles lots of image types pretty well and can often shrink the filesize even without shrinking the image size / resolution.

Irfanview Webpage (http://www.irfanview.com/)

eugene
08-28-2005, 11:51 PM
Originally posted by timlau@Aug 28 2005, 02:40 PM
Thx.

It says :

upload_max_filesize & memory_limit = 32M for Local and Master value

--

the error msg: ( ... = domain stuff)

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 14016 bytes) in .../include/picmgmt.inc.php on line 209

I take it it's not enough.

I uploaded a pic at 100, 90, 80 and 70% of the original size, and got errors on 100% and 90%. 80% of 8 megapixel is still over 6 megapixel... I suppose it's good enough.
Quoted post

Forgive my ignorance, but are you getting the problems with upload of images, or with some kind of image manipulation? I don't use Coppermine, but I can see there being two different kinds of problems. If you are using the server-side software to do image manipulation, then the problem can be that the app internally requires more space/memory to work with jpegs, perhaps turning them into some larger intermediate form. On the other hand, if the difficulty arises from attempts to simply upload the file and there is no manipulation being performed by the app, then the issue may lie in that code and a memory limit for the temp file.

ozee
08-29-2005, 09:36 AM
woah -- your users are going to hate you having even 6M pix on your website. I'm on dialup and if a pic is more than 1M, I won't go to that site! I don't have enough time. All the pix on my sites are 1024x768 or less.