InMotion Hosting Support Center

How may I increase my PHP memory limit? php.ini having no effect

Category: Cpanel

2012-10-25 12:21 pm EST

Hits: 4,704

I need to increase my php memory limit from 256M to 512M to fix file upload error in Moodle:

'Allowed memory size of 268435456 bytes exhausted (tried to allocate 421170864 bytes)'

However, increasing the amount in my php.ini in public_html is having no effect. It still says 256M for PHP info in both Moodle and Cpanel. It seems the solution might be similar to this person's:

Can someone help me out? Thank you!

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by User


42,973 Points
2012-10-25 2:36 pm EST
Hello RJmoser,

Apologies, I thought this answwer was posted earlier. I am unable to check your files since you're on a VPS. If you can please make sure to add the following line in your .HTACCESS file:

#Set recursive php.ini:

suPHP_ConfigPath /home/username/pathtophpini
Replace this in all associated .htaccess files - make sure you replace in the information for the path specified above.

This is needed in order to apply your PHP.INI file changes to all the directories under the top level php.ini file.

Try this first please and then let us know if he issue continues.

If you have any further questions, please contact technical support or leave a comment at the bottom of the page.


Arnel C.

You must login before you can post a comment about this answer.

Like this Question?

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Need more Help?

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!