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/14076376224/original/mFmCTXWXE9ZCJPMTZxYFL_eqRm6sDQ0Dag.png?1609254259)
2.Pilih File Manager.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14076378154/original/7yAdQENygONIxaP8B3jdxtIgCtgNES_crA.png?1609256709)
3.Pilih httpdocs.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14076378186/original/s9uRk2pdwkfkJSHE5Gb-ivK1b_zpwBvf4w.png?1609256758)
4.Pilih tanda plus lalu pilih Create File.
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14076378222/original/y_3sPRkUWjgdO4eRG3Wt1Mg6vvM7SOF_ow.png?1609256813)
5.Buat php.ini
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14076378297/original/IEVXKEFw4vtft6slEg0cy2f9qn82Eiah6A.png?1609256909)
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/14076378367/original/VCml1ufumwGdrSG1IR0M-fXjrd1_mHNDbQ.png?1609257014)
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14076378154/original/7yAdQENygONIxaP8B3jdxtIgCtgNES_crA.png?1609256709)
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14076378186/original/s9uRk2pdwkfkJSHE5Gb-ivK1b_zpwBvf4w.png?1609256758)
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14076378222/original/y_3sPRkUWjgdO4eRG3Wt1Mg6vvM7SOF_ow.png?1609256813)
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14076378297/original/IEVXKEFw4vtft6slEg0cy2f9qn82Eiah6A.png?1609256909)
post_max_size = 64M
![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14076378367/original/VCml1ufumwGdrSG1IR0M-fXjrd1_mHNDbQ.png?1609257014)