Kasus
Jika anda menemukan skrip PHP anda error dengan pesan seperti berikut:
Fatal error: Allowed memory size of 1342172 bytes exhausted (tried to allocate 40 bytes) in $SOMEFILE on line $SOMELINE
maka anda bisa memperbaikinya dengan mengubah limit memory yang boleh digunakan oleh PHP.
Solusi
Langkah-langkah mengubah limit memory PHP:
1.Login akun Plesk.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14079494906/original/WOhQcp-IUmwYPzO1Nla5FmI5L5SGY0riSg.png?1614451036)
2.Pilih File Manager.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14079494903/original/Hw5zn4Elt4l7abVgZ-NXJeoUCzIehEt00w.png?1614451035)
3.Pilih httpdocs.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14079494907/original/nSEOLqx7wsWq7R28MyEUO-LcqA6GHXDpsA.png?1614451036)
4.Pilih tanda plus lalu pilih Create File.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14079494905/original/VzX31rE53rv3sYGZmH9euZbTaCpAdN6kjA.png?1614451036)
5.Buat php.ini
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14079494902/original/Mb9iNXsYe0IgXfLUI0tM8AtvqxCj0OKJ_A.png?1614451034)
6. Misal kita masukan memory limit dan post max yang di butuhkan, lalu klik simpan.
memory_limit = 128M
post_max_size = 64M
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14079494903/original/Hw5zn4Elt4l7abVgZ-NXJeoUCzIehEt00w.png?1614451035)
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14079494907/original/nSEOLqx7wsWq7R28MyEUO-LcqA6GHXDpsA.png?1614451036)
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14079494905/original/VzX31rE53rv3sYGZmH9euZbTaCpAdN6kjA.png?1614451036)
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14079494902/original/Mb9iNXsYe0IgXfLUI0tM8AtvqxCj0OKJ_A.png?1614451034)
post_max_size = 64M