Electric_Sheep8787 Posted October 15, 2022 Posted October 15, 2022 Trying to migrate my site from shared hosting to a dedicated VPS. I've changed the php.ini file so that the memory_limit = 256M, however the installation says it's still set to 32M. The php.ini file is sitting in public_html /phpinfo.php show that the memory_limit is set to 32M local value, but master value is 128M.
Electric_Sheep8787 Posted October 15, 2022 Author Posted October 15, 2022 3 minutes ago, Chris027 said: Have you restarted PHP? I restarted "PHP-FPM service for Apache"
Chris027 Posted October 15, 2022 Posted October 15, 2022 Do you have multiple versions of PHP installed?
Randy Calvert Posted October 15, 2022 Posted October 15, 2022 A couple of notes… are you editing the right php.ini? Check your phpinfo output for what is actually being processed by scripts. Do you have any other INI file being loaded setting memory limits? (such as inside a conf.d folder) Electric_Sheep8787 and Chris027 1 1
Electric_Sheep8787 Posted October 15, 2022 Author Posted October 15, 2022 (edited) 15 minutes ago, Randy Calvert said: A couple of notes… are you editing the right php.ini? Check your phpinfo output for what is actually being processed by scripts. Do you have any other INI file being loaded setting memory limits? (such as inside a conf.d folder) The phpinfo file is saying that the Loaded Configuration File and file path is loading old info from my older address that i'm migrating from, along with it being PHP Version 7.3.11 instead of PHP 8 which i'm running on the VPS. I'm not sure how that's happening. Edited October 15, 2022 by Electric_Sheep8787
Randy Calvert Posted October 15, 2022 Posted October 15, 2022 1 minute ago, Electric_Sheep8787 said: The phpinfo file is saying that the Loaded Configuration File and file path is loading old info from my older address that i'm migrating from, along with it being PHP Version 7.3.11 instead of PHP 8 which i'm running on the VPS. I'm not sure how that's happening. The phpinfo should say something like: In this case, you should be editing /etc/php.ini In addition to that file, there are additional files that are processed inside of the /etc/php.d folder. I'm not sure how your PHP setup would be loading something domain specific for it's master config file, but that's something that would need to be fixed by your host or by your server admin.
Chris027 Posted October 15, 2022 Posted October 15, 2022 5 minutes ago, Electric_Sheep8787 said: The phpinfo file is saying that the Loaded Configuration File and file path is loading old info from my older address that i'm migrating from, along with it being PHP Version 7.3.11 instead of PHP 8 which i'm running on the VPS. I'm not sure how that's happening. Do you have access to the command line?
Randy Calvert Posted October 15, 2022 Posted October 15, 2022 While I would highly recommend getting to the bottom of your PHP setup, there is another option to change the memory limit POTENTIALLY. If your server config allows it, you can try adding the following entry to your .htaccess file: php_value memory_limit 256M If your server allows overrides, this might work.
Electric_Sheep8787 Posted October 15, 2022 Author Posted October 15, 2022 I've managed to get it to work. It was a .user.ini file that needed the memory_limit change and not php.ini
Randy Calvert Posted October 15, 2022 Posted October 15, 2022 That would do it. Glad you got it squared away. Electric_Sheep8787 1
Recommended Posts