MySQL/PHP issue.
-
Increase it temporarily to 2048M, or higher, and drop down once the conversion is done. Restart apache/nginx/other web server, or restart php-fpm if it's used instead after each config change.
-
@marcinozga said in MySQL/PHP issue.:
Increase it temporarily to 2048M, or higher, and drop down once the conversion is done. Restart apache/nginx/other web server, or restart php-fpm if it's used instead after each config change.
Has been set at 2048M, restarted apache and rebooted server and still get the same error.
-
@WLS-ITGuy said in MySQL/PHP issue.:
@marcinozga said in MySQL/PHP issue.:
Increase it temporarily to 2048M, or higher, and drop down once the conversion is done. Restart apache/nginx/other web server, or restart php-fpm if it's used instead after each config change.
Has been set at 2048M, restarted apache and rebooted server and still get the same error.
Is this a script that you run from the command line? You may need to edit a different php.ini file (that used to be the case -- I haven't had to do it in a while) to adjust the memory settings for the php cli.
-
Actually, you might have more than one php.ini file. Create info.php file with this content:
<?php phpinfo(); ?>
and visit it in web browser. See what memory limits it shows and where could additional configs be located.
-
@marcinozga said in MySQL/PHP issue.:
Actually, you might have more than one php.ini file. Create info.php file with this content:
<?php phpinfo(); ?>
and visit it in web browser. See what memory limits it shows and where could additional configs be located.
-
So limit is set to 2G, is the conversion script still refusing to run?
-
Yes. If I CD to /var/www/moodle/ and run 'php admin/cli/mysql_compressed_rows.php --list' I get PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 49152 bytes) in var/www/moodle/admin/cli/mysql_compressed_rows.php on line 152
-
Just to be sure.... you aren't out of memory, right?
-
Oh, that's a cli script, I thought you were calling it with browser. Try this:
php -d memory_limit=2048M admin/cli/mysql_compressed_rows.php --list
-
@marcinozga said in MySQL/PHP issue.:
php -d memory_limit=2048M admin/cli/mysql_compressed_rows.php --list
That all worked! And now I am on to the next part of the upgrade!
-
Just to clarify, -d option allows you to override any php settings.
-
@marcinozga said in MySQL/PHP issue.:
Just to clarify, -d option allows you to override any php settings.
OK. So why would php.ini show that it is allowing 2G but not actually allow 2G?
-
php-cli has its config file elsewhere, I'm not sure where. When you check it through web, it's shows what's in php.ini.
-
@marcinozga
Gotcha! Thanks for the help! -
Run
php --ini
and see what it returns.
-
@marcinozga Gives me a list of files pulled from /etc/php5/cli/
-
@WLS-ITGuy line Loaded Configuration File: will give you config location.
See what the memory limit is set there. -
@marcinozga said in MySQL/PHP issue.:
@WLS-ITGuy line Loaded Configuration File: will give you config location.
Yup. Got it. Changed the memory_limit there and was able to run the script without using -d.
-
@WLS-ITGuy said in MySQL/PHP issue.:
Yes. If I CD to /var/www/moodle/ and run 'php admin/cli/mysql_compressed_rows.php --list' I get PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 49152 bytes) in var/www/moodle/admin/cli/mysql_compressed_rows.php on line 152
Run that same php info.php file from the CLI... and search for the php.ini file that way...
php info.php|grep -i "php.ini"
And see what file(s) it spits out.
Edit: Dang... Day late, $1 short.