Home   Help Login Register  
Welcome, Guest. Please login or register.

Login with username, password and session length

Search
Pages: [1]
Print
Topic: How can I inrease PHP memory limit?  (Read 1243 times)
0 Members and 1 Guest are viewing this topic.
« on: July 28, 2009, 12:08:06 AM »
Jay
Newbie

View Profile
*
Posts: 44



I am receiving following error while running sitemap on my vbulletin forum. Can anyone tell me how can I increase this limit?

"Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 8653727 bytes)"

Logged
« Reply #1 on: July 31, 2009, 10:54:31 PM »
Janak
Administrator
Full Member

View Profile
*****
Posts: 119



you can increase the default memory limit to run your PHP application. You can increase it from .htaccess file and also from php.ini file.

How to change from .htaccess file?

.htaccess is a hidden file (dot file) of Linux. You will find it inside every domain’s public_html folder. You can create it if you do not find it any how. You just need to enter below line of code in this file:

php_value memory_limit 256MB

How to change it from php.ini file?

Php.ini is a default configuration file for PHP. In linux environment you will find this file in /usr/local/lib/. You will find “memory_limit” directive inside “Resource Limit” section. Just modify this value to the limit you wish to set and save exising php.ini file. In vi editor Press Esc -> colon (Smiley -> wq to save the file.

You will need to restart your apache server in order to make the changes effective. You can restart it by executing following command through SSH:

apachectl -k restart

Simply check phpinfo.php file and make sure the changes are reflected properly.

Thanks!
Logged

Pages: [1]
Print
Jump to:  

� 2006 VPS forum, VPS hosting forums, VPS discussions, VPS web hosting solutions, issues, providers, virtual web hosting questions, VPS hosting
Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Forum style designed by PixelSlot
| Sitemap - XML Sitemap