Welcome Guest, Not a member yet? Register   Sign In
memory size problem
#1

[eluser]SammyO[/eluser]
Since a few hours my CodeIgniter website errors the following error:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 261900 bytes) in /home/sammy/public_html/mediaLab/system/core/Loader.php on line 5

All I tried to do, was POST a filled array with a form.

I've done some research, but this error doesn't seem to be anything I can find on the internet.

I've increased the memory_limit and the max post value in php.ini, didn't change anything.
I've reduced my code to only some HTML on the homepage, didn't change anything.
I've tried to echo memory_get_usage(), didn't change anything and didn't get an output (just the same error).
I've restarted Apache, didn't change anything.

I have absolutely no clue where to look and fix this. I hope anyone can help me!
#2

[eluser]craig.hoog[/eluser]
This sounds like a different issue altogether.
Can you make a new file in the base directory of your site called phpinfo.php and simply put this as contents:

Code:
<?php
phpinfo();
?>

Then load up that page in your browser, search the resulting contents for the Max memory and see what it says there. It almost sounds like something in your CI install is consuming so much memory that there is an issue. I'm concerned that you might have adjusted the PHP.ini file and not allocated enough memory, sot he original issue may no longer be the issue that you have now.
#3

[eluser]SammyO[/eluser]
Hi there,

Thanks for your reply and sorry for my long radio silence.

I tried out your tip, but it doesn't work. I can't get anything else in my browser then the error. I tried creating a phpinfo.php page, but I can't see it's contents.

What to do?
#4

[eluser]InsiteFX[/eluser]
Code:
<?php ini_set('memory_limit', '64M'); ?>

1) If you have access to your PHP.ini file, change the line in PHP.ini
If your line shows 32M try 64M:
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)

2) Raise these if they are to low. NOTE: both of these have to be the same value!
upload_max_filesize = 10M
post_max_size = 10M

3) .htaccess:

php_value max_input_time 10800
php_value max_execution_time 10800
php_value upload_max_filesize 110M
php_value post_max_size 120M





Theme © iAndrew 2016 - Forum software by © MyBB