forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: Chefkochx on January 28, 2004, 12:37:21 am

Title: Fatal Error
Post by: Chefkochx on January 28, 2004, 12:37:21 am
Hi
When I want to upload a picture directly, this error is shown to me.

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 6400 bytes) in /usr/export/www/vhosts/funnetwork/hosting/netfriends/include/picmgmt.inc.php on line 176


I don't know what this means.
My Batch-upload isn't working, too. It says that the files are uploaded correctly and then... no files are in any direktory.
Crazy: before 2 days it worked perfectly.
Sometimes only one or two pics are shown, but never more.
Oh, my maximum file size is 500 kb :-)

please help me

Chefkoch
Title: Fatal Error
Post by: hyperion on January 28, 2004, 02:44:30 am
The memory error is due to improper php.ini configuration for the high resolution photos you are trying to upload. (Note: It's not the size of the file, it's the number of pixels that determine memory use in GD.)  You must give the process memory limit more than 8MB.

This could cause the batch problem, or you could be FTPing to the userpics directory.  Another consideration is a timeout due to a large number of files.
Title: Fatal Error
Post by: Chefkochx on January 28, 2004, 11:59:29 pm
thx
I will test it and post if I solved my problem
Title: Fatal Error
Post by: Chefkochx on January 29, 2004, 10:22:07 am
Hi
I have tested it and it doesn't work because I don`t know where I can edit this memory size.

Besides... which programm is better GD or Image Magic?
Title: Fatal Error
Post by: hyperion on January 29, 2004, 06:51:36 pm
Look for this block in your php.ini file (assuming you are the server admin -- only he/she can do this)

Code: [Select]
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60        ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)


Image Magic is better.
Title: where is...
Post by: bad on April 16, 2004, 01:44:54 am
Got the same problem. Can't find php.ini hehe. Where is it located?
Title: Fatal Error
Post by: hyperion on April 16, 2004, 02:31:20 am
Depends on your OS.  For example, in Windows, it is in the C:\WINDOWS directory. Refer to your PHP documentation and installation procedures.
Title: What if...
Post by: bad on April 16, 2004, 09:21:18 am
I have my page hosted by b-one.net. Do they have to change the php.ini if i get the error. I found the php.ini in the windows folder and it says:

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60        ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)

What should i change it to if i want to upload pictures that are bigger?
Title: Fatal Error
Post by: hyperion on April 16, 2004, 10:18:23 am
That depends on the picture resolution.  Anywhere from 9M to 16M works for most applications.
Title: But how...
Post by: bad on April 16, 2004, 12:08:47 pm
But how does it help to change the php.ini if it's on my computer and not where i have coppermine installed? Coppermine is hosted by a webhotel that i pay for. Do they need to change the php.ini on the server then?
Title: Fatal Error
Post by: Joachim Müller on April 16, 2004, 03:51:08 pm
sure, like hyperion already said: only the server admin can change the (relevant) php.ini - the file on your pc is probably only garbage, unless you run a webserver on your pc as well.
Your webhost has to change it for you, but may be reluctant to do so, since you're probably sharing your webspace with many other websites, changing the overall server config isn't something your server admin will do lightheartedly.
To put it in more general terms: only upload pics with reduced size (resize them on your client before uploading) - this will result in quicker uploads, less webspace consumption and smoother batch-adding.

GauGau
Title: Re: Fatal Error
Post by: zelal on May 31, 2009, 11:07:02 am
Hi
When I want to upload a picture directly, this error is shown to me.

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 6400 bytes) in /usr/export/www/vhosts/funnetwork/hosting/netfriends/include/picmgmt.inc.php on line 176


I don't know what this means.
My Batch-upload isn't working, too. It says that the files are uploaded correctly and then... no files are in any direktory.
Crazy: before 2 days it worked perfectly.
Sometimes only one or two pics are shown, but never more.
Oh, my maximum file size is 500 kb :-)

please help me

Chefkoch

Don't know whether this will work.

Open your Notepad and type:

php_value memory_limit 256M

Save it with filename .htaccess (actually no filename, but with an extension "htaccess"). You may have to enter .htacess with surrounding the double-quote i.e. ".htacess" in the filename box and choose All Files in the file type box when saving with Notepad.

Then upload the .htaccess file to your coppermine root directory.

Alternatively, if you do not want to create own one, you can download my attached .htaccess file and upload it to your coppermine root directory.

Hope this will solve your memory related problem.

Regards.

Zelal
Title: Re: Fatal Error
Post by: phill104 on May 31, 2009, 11:55:41 am
I'm sure you are trying to help but this thread is 5years old and for an unsupported version.

Locking.