How To Change Memory Limit PHP Apache Server
how to change memory limit php apache server
how, to, change, memory, limit, php, apache, server
How To Change Memory Limit PHP Apache Server
Post Description: how to change memory limit php apache server
POST# 690
Posted On: Fri Feb 29, 2008 12:01 pm
webmaster
Topic: How To Change Memory Limit PHP Apache Server
In this tutorial, I will show you how to change the memory limit in php. The default memory is set for 8M, but sometimes webmaster and admins need to change this to make their website faster.

WARNING!!
- Always Make a backup file of php.ini before you start to do anythingn like this. If you dont know what you are doing, these changes could make your website go down. Please Read Disclaimer
http://www.webune.com/forums/viewtopic-p-83.html#83

1. If you dont know what your php settings are. See the post on this link;
http://www.webune.com/forums/how-can-do-i-you-create-make-a-phpinfo-php-file-t22.html

2. If your memory is set to 8M, continue with next step

3. Open your php.ini file. If your server is a Webune Dedicated Server with Redhat, Centos or Fedora, you can run the following command to edit the php.ini file:

     Code:
nano /etc/php.ini

If you don't know where your php.ini file is, go back to step 1, the phpinfo.php file will show you where the pnp.ini file is at.

4.
Find

     Code:
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

Replace With

     Code:
memory_limit = 16M ; Maximum amount of memory a script may consume (8MB)
Basically I changed 8 to 16

5. Save file by hitting Control+x -then you will be asked if you want to save changes, type the letter y for yes

6. Then hit Return at the next prompt.

7. Restart Apache Server with the following command

     Code:
/etc/init.d/httpd restart


8. Do step 1 again, and this time your phpinfo.php file should show 16M instead of 8M

9. DONE


Mon Apr 16, 2007 7:02 am
1
Hiland
Reply #1576
Thanks a lot- this solved my problem
Fri Sep 28, 2007 6:13 am
2
kEpEx
Reply #1577
the path to the file, to restart apache and the config ini of the php, may change depending of the distributiong...

on debian, the path to restart is: /etc/init.d/apache

keflog /
Fri Sep 28, 2007 6:19 am
3
kEpEx
Reply #1578
keflog
keflog
Fri Nov 02, 2007 9:57 am
4
Wrhona
Reply #1579
the phpinfo.php don't show up when i did the command and uploaded..what am i missing?
Sun Nov 18, 2007 6:02 am
5
Mr Woc
Reply #1580
hi there

great tutorial as i am a beginner, dug me out of a great big hole, i cant thank you enough !

woc