Bila anda mendapati error seperti dibawah ini

FatalErrorException
Allowed memory size of 134217728 bytes exhausted (tried to allocate 16384 bytes)

berarti aplikasi anda butuh memory lebih, konfigurasinya bisa ubah di php.ini
laravel out of memory

Edit file php.ini

Cari file php.ini, untuk mempermudah menemukan file tersebut jalankan perintah berikut ini di terminal

php -i | grep 'php.ini'

contoh output

# CentOS 7
$ php -i | grep 'php.ini'
Configuration File (php.ini) Path => /etc/opt/remi/php71
Loaded Configuration File => /etc/opt/remi/php71/php.ini
# Fedora 27
$ php -i | grep 'php.ini'
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
</div>
 
<pre lang="perl">
# bagian yang perlu diubah
memory_limit = 256M
# bagian ini untuk memperbesar file upload yang diijinkan
post_max_size = 20M
upload_max_filesize = 20M

setelah selesai restart PHP FPM

systemctl restart php-fpm.service
# atau
systemctl restart php71-php-fpm.service

Leave a comment

Your email address will not be published. Required fields are marked *