php memory limit

php memory limit

by santosh chauhan -
Number of replies: 6
Hi,

I am getting a warning that php memory limit is too low. how can I increase the memory limit. i am installing moodle on byethost. I can't access php.ini file. how can i change the limit please help me out. screenshot is attached below
Attachment php_error.JPG
Average of ratings: -
In reply to santosh chauhan

Re: php memory limit

by Olumuyiwa Taiwo -
Picture of Plugin developers
You can edit or create the .htaccess file in your Moodle web root and put the following line:

php_value memory_limit 48M

If that doesn't work (you may get a server error), edit your Moodle config.php file and put this somewhere near the top

ini_set('memory_limit', '48M');
In reply to Olumuyiwa Taiwo

Re: php memory limit

by santosh chauhan -

Thanks Sir for the response.

I did same as you told but none of them worked for me. I tried with both the setting but still php memory limit is showing 24M.

I ignored this warning and continued with the settings but I get stucked at database installation. It was showing the upgrade plugin error like

  • Setting up plugin tables

No warnings - Scroll to the continue button

enrol/authorize plugin needs upgrading

Well after looking around the forum posting i resovled the plugin problem somehow with the help of following forum posting

http://moodle.org/mod/forum/discuss.php?d=151490#p697557

But now I am facing another promblem (Can't login with any account) as posted on the above forum. I am installing moodle on byethost.com. Please help me in this issue.

In reply to santosh chauhan

Re: php memory limit

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Memory limits range over different levels and if you fix one, then the next up the food chain can come into play. However, if you are using ByteHost, then you better talk to them, they may not appreciate someone grabbing more accessible memory without any discussion. They may have disabled overrides from .htaccess files.

 

In reply to Colin Fraser

Re: php memory limit

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Thinking about it a bit more, the memory limits in php are set to limit the amount of resources that can be used by a script, and there is a maximum of 128m then. Create a file that contains the text

<?php

phpinfo()

?>

and place that anywhere in your website. Open it in your browser and that should provide you will all the details you need about your hosts php setup. The only other limits are the file sizes, upload and download.

In reply to santosh chauhan

Re: php memory limit

by darren laderas -

Hi santosh chauhan!, Im also installing moodle on byethost.com, and also facing a problem like yours, It is said that "the PHP memory limit is set quite low you may run into problems later." Did ever you ever change it into a higher capacity?