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
-
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.