6

I went into WHM and changed the settings for the php.ini

memory_limit=256M

Then clicked save. Do I need to reboot the server for a change like this? What is the best way to verify that my memory limit really is set to 256MB now?

Thanks!

PioneerMan
  • 303
  • 4
  • 12
  • 1
    What does ` – VolkerK Mar 01 '16 at 01:41
  • @VolkerK, the Server API said "CGI/FastCGI", which, as far as I know, would require a reboot in this case. However, when I checked memory_limit like you suggested, it shows 256MB, which is the amount that I wanted. So somehow changing it in WHM allowed the server to take higher amount of RAM without needing a reboot?? – PioneerMan Mar 01 '16 at 04:02
  • WIthout a reboot? Certainly. There's really no need to reboot the whole server, as said before _at the outmost_ the httpd needs to be restarted. Maybe cpanel did just that. It would also be sufficient if the fcgi process manager just signaled down the php instances and then restarted them. And then there's also the option of php-FPM, running php as an external cgi server, iirc php monitors changes to the php.ini in that case - could be wrong though. Damn it, Jim, I'm a developer, not an admin ;-) – VolkerK Mar 01 '16 at 04:20
  • You need to restart the FastCGI process (or wait until it expires). This is not related to Apache. (Whatever, that information is vital to the question and shouldn't be scattered in comments.) – Álvaro González Mar 10 '16 at 11:41

3 Answers3

1

If you have cpanel installed in your sever. than location of file is

root@ping#  vim /usr/local/cpanel/3rdparty/php/54/etc/php.ini

find the keyword memory_limit

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M

Increase this limit to 256M and save the file. This will fix it for you.

just saving the file will restore the settigs.

imvikasmunjal
  • 183
  • 1
  • 11
0

No need to restart server as when you made changes from WHM it automatically restart the required services which needs to be restart.

I would be able to help you specificly if you can tell me exactly why you want to increase your memory_limit?

imvikasmunjal
  • 183
  • 1
  • 11
  • I am trying to implement a javascript / PHP spell checker. I was getting strange results and the developer said I should set the memory size to 256MB for PHP. – PioneerMan Mar 09 '16 at 01:08
0

Restart apache after the change >> sudo apachectl restart