Previously, my site runs on PHP 7.1 on Ubuntu 14.04 LTS and upgraded to Ubuntu 16.04. After upgrade, I can still access my site.
Then I install and switch to PHP 7.2 (I didn't remove PHP 7.1, only disable it). When accessing, it shows laravel error about database connection error. Then I enable mysql
and pdo_mysql
in /etc/php/7.2/cli/php.ini
. After that, my site only return 500 internal server error.
I checked /var/log/apache2/error.log
and it says
[Tue Dec 17 11:12:36.773684 2019] [php7:error] [pid 27730] [client xxx.xxx.xxx.xxx:y] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/project/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 31
The memory_limit
in /etc/php/7.2/cli/php.ini
is already -1
from start.