Hi,
I'm new to x10hosting but not into web development (also, i know CpanelX very well). Anyway, to the point.
I'm creating a script for an online game to look up stats, the script creates a PNG image (a map) that can be viewed by everyone.
I tested it on my local server and it worked, but now i uploaded it i'm having a Fatal Error.
I know, this is a memory problem and you will think i need to increase my memory limits (request panel etc...), I already did this and i'm now on PHP level 2 (gives me 42 megs of working space).
The exact point is, the memory the script needed is only maximum 20MB (needs to read 3 files and put them into an image once a day).
I tested how many memory is needed with the following script line and tested multiple times:
Gives:
I increase the memory:
Gives:
What should be the problem? Do i still have not enough memory or is there a serious bug in the script?
Cheers.
(I won't post direct links to prevent abuse at the servers, it's a relatively heavy script)
I'm new to x10hosting but not into web development (also, i know CpanelX very well). Anyway, to the point.
I'm creating a script for an online game to look up stats, the script creates a PNG image (a map) that can be viewed by everyone.
I tested it on my local server and it worked, but now i uploaded it i'm having a Fatal Error.
Code:
[B]Fatal error[/B]: Allowed memory size of 50331648 bytes exhausted (tried to allocate 42 bytes) in [B](...)[/B]
The exact point is, the memory the script needed is only maximum 20MB (needs to read 3 files and put them into an image once a day).
I tested how many memory is needed with the following script line and tested multiple times:
PHP:
ini_set("memory_limit","20M");
Code:
[B]Fatal error[/B]: Allowed memory size of 20971520 bytes exhausted (tried to allocate 35 bytes) in
PHP:
ini_set("memory_limit","32M");
Code:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 45 bytes) in
Cheers.
(I won't post direct links to prevent abuse at the servers, it's a relatively heavy script)