Categories: Website

Increase memory for PHP using .htaccess

If you see the following error on a PHP script, you can easily fix it by increasing the allowed memory to your PHP script.

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 113 bytes) in

To do that, simply add the line below to a .htaccess file in your public_html folder

php_value memory_limit 256M

You can then verify this using a test PHP file which should have the code below. The Local Value column will reflect the increased value that you set.

< ?php phpinfo(); ?>

Admin

Recent Posts

Enable Outgoing SMTP Server Authentication

All our servers need you to enable outgoing SMTP server authentication to be able to…

4 years ago

Plesk Tutorials – How to configure DNS for a domain in Plesk

Learn how to configure and check your DNS settings in Plesk. After you registered your…

5 years ago

cPanel Tutorials – Force HTTPS Redirect

This video demonstrates how to use the Force HTTPS Redirect feature. This feature allows you…

5 years ago

cPanel Tutorials – MultiPHP Manager

Use cPanel's MultiPHP Manager to manage your domains' PHP version. Being able to manage the…

5 years ago

Email account setup in Outlook 2016

This tutorial will help you to configure Microsoft Outlook 2016 for an email account. Step…

5 years ago

Message Queueing

Generally emails are directly delivered to the destination server. However, if the delivery attempt to…

5 years ago