07 Jun, 2008
Fatal error: Allowed memory size of * bytes exhausted in PHP
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 128 bytes) in /home/yoursite/public_html/index.php on line 1051
The above error is caused by not having enough memory to execute the requested page.
You can adjust the memory limit at run time by specifying the following at the very beginning of your php file (eg: index.php)
ini_set('memory_limit','12M');
Or if you have access to php.ini configuration file of your server, you can change the memory_limit variable as follow and restart the web server.
memory_limit = 12M
Technorati Tags: memory limit, apache, php, config
Love what you've just read? Subscribe to our newsletter to receive tips, resources and special offers related to web development & design.
Other similar posts that you might be interested in:
- Enabling gd image library in PHP (Windows)
- Content Encoding Error in Joomla
- How to redirect old pages to new pages using htaccess
- Error logging in PHP
- Creating a Contact Form in jQuery Mobile and PHP
- Removing file extension via .htaccess
- Links Love Series 2: MySQL server fine tuning and administrating
Hello! Welcome to Web development blog! My name is Ei Sabai and on this blog, I write about web development, mobile app development, latest web technologies and the likes. Read more 


Thanks, really helpful