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

Category: Cpanel

rjmoser
Asked:
2012-10-25 12:21 pm EST

Hits: 2,462
Hello,

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:

http://www.inmotionhosting.com/support/community-support/cpanel/how-can-i-increase-php-memory-limit

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

0

Arn
Staff
15,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.

Regards,

Arnel C.

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

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

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: support@InMotionHosting.com
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!