Hello, welcome to wallpaperama. today we want to bring up and issue with the wallpaper script. we have been receiving many reports on an error you might be getting. the errors says:

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 6400 bytes) in wallpaper.php on line 139

Original message:
hi, i downloaded your wallpaper script. everything was working fine until today, i was uploading a wallpaper and all of the sudden i started to get this error message that said: Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 6400 bytes) in wallpaper.php on line 139

i have never seen it before so i was wondering if you can help me?

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 6400 bytes) in wallpaper.php on line 139


as you can see from our last user who reported this issue, its abvoious there is a problem. no worries we will try to help you here at wallpaper.

1. why are you getting this error - You are getting this error because the size of the file is greater than the HTTP (apache) server allows.

you can find out what your limit is, the default is 16M, to find out, just run a phpinfo file and look for the memory_limit settings.

2. Ok, now that you know what the problem is, how do you resolve it.

you have two options:

option 1 - you can increase the memory_limit in your php.ini file. you can usually find this file in your linux server under /etc/php.ini

option 2- if your website is on a shared hosting (meaning you dont have a dedicated server) - you will have to contact your hosting company, they are the only ones who can change this.

since i have option 1, i will edit my php.ini file: this is how mine looked like:

php.ini
;;;;;;;;;;;;;;;;;;;
; 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 = 16M ; Maximum amount of memory a script may consume


are you can see, mine is se to 16M i will increase it to 128 since i have plenty of memory on my server

once you have saved the changes, restart your http server, since i have linux/apache, i will send this command:

SHELL COMMAND:
/etc/init.d/httpd restart



thats it, you should not have any more problems when uploading your wallpaper images.