Fatal error: Out of memory allocated. Fixed?

Fatal error: Out of memory (allocated 57342713) (tried to allocate 33232415 bytes) in /home/user/public_html/page.php on line xxx

This is because there is and option to edit the cPanel allocated resources for each website you hosted. If you have 10 website in your cpanel and your cpanel can use up to 4GB ram. You can setup this as the website need. So your website will not load longer. If you are hosting in a shared hosting it is good to setup max limit. So to do that you have search MultiPHP INI Editori n the cpanel. 

edit cpanel php.ini. this will resolve this issue. What is here happening is the .htaccess file in your public_html is automatically edited and adding the code RLimitMem max.  you can also change it manually. But the previuos method is more safe.

You can also edit these thing in php.ini

display_errors: This determines whether errors should be printed to the screen as part of the output or if they should be hidden from the user.

max_execution_time: This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 90.

max_input_time: This sets the maximum time in seconds a script is allowed to parse input data, like POST, GET and file uploads.

max_input_vars: This sets the maximum number of input variables allowed per request and can be used to deter denial of service attacks involving hash collisions on the input variable names

memory_limit: This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to -1.

post_max_size: Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size.

session.gc_maxlifetime: This specifies the number of seconds after which data will be seen as "garbage" and potentially cleaned up.

session.save_pathsession: save_path defines the argument which is passed to the save handler. If you choose the default files handler, this is the path where the files are created.

upload_max_filesize: The maximum size of an uploaded file.

zlib.output_compression:  Whether to transparently compress pages. If this option is set to "On" in php.ini or the Apache configuration, pages are compressed if the browser sends an "Accept-Encoding: gzip" or "deflate" header.

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to use cPanel?

cPanel is a world popular hosting control panel. It make easy to manage your hosting account. You...

The WebSocket handshake failed" when using the cPanel Terminal

To fix this, we suggest trying the following links to access cPanel ->...

cPanel License expired issue?

We are using WHM/cPanel control panel in most of the servers. So paying monthly for whm and...

How to Backup your cPanel account from your previous server?

Here we are explaining about how to move your cpanel to our server. This is a very simple...

How to transfer cPanel accounts from another server?

This tutorial will show you how you can create FULL BACKUP and remotely upload this to your new...