Web Hosting Forum | Lunarpages

Author Topic: Using CPanel to increase php.ini file size  (Read 1298 times)

Offline kypsah

  • Galactic Royalty
  • *****
  • Posts: 219
    • http://www.kypsah.com
Using CPanel to increase php.ini file size
« on: July 20, 2016, 07:24:38 PM »
Is there a way to increase the file size of the php.ini file within CPanel?  Upon trying to upload a zipped file (Gravity Forms), I received the following error message "The uploaded file exceeds the upload_max_filesize directive in php.ini".  I know nothing of php but can follow step-by-step instructions :)  Any help is much appreciated!  Thank you!
Eyes are the windows of the soul, but through the heart, the mouth speaks.

Jessie :)

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6208
Re: Using CPanel to increase php.ini file size
« Reply #1 on: July 21, 2016, 06:01:32 AM »
Assuming you're on a Linux/Apache server (not Windows)

1. Create a PHP script (xxxxx.php) with some unguessable name, containing the line
Code: [Select]
<?php phpinfo(); ?>(Note: either erase this script when you're done with it, or never reveal the name in public -- it can be used by a hacker to discover internal settings that may help them to hack your site. Nor should you ever post its output in public.)

2. Run your xxxxx.php and note the value of appropriate entries, such as upload_max_filesize.

3. Create a file /home/<your account name>/public_html/php.ini (if it doesn't already exist). Add this line to it:
Code: [Select]
upload_max_filesize = 50M(or whatever size is necessary and allowed by the system). Note: do not give out your <your account name> in public -- it can be used by someone sharing your server to mess around in your files!

4. In /home/<your account name>/public_html/.htaccess, add the line
Code: [Select]
suPHP_ConfigPath  /home/<your account name>/public_html
5. Run xxxxx.php again to confirm that the appropriate entries (here, just upload_max_filesize have been updated.
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

Offline kypsah

  • Galactic Royalty
  • *****
  • Posts: 219
    • http://www.kypsah.com
Re: Using CPanel to increase php.ini file size
« Reply #2 on: July 21, 2016, 06:25:02 AM »
Thank you, Mr. Phil!  I really appreciate the help.
Eyes are the windows of the soul, but through the heart, the mouth speaks.

Jessie :)

Offline kypsah

  • Galactic Royalty
  • *****
  • Posts: 219
    • http://www.kypsah.com
Re: Using CPanel to increase php.ini file size
« Reply #3 on: July 21, 2016, 01:43:43 PM »
Worked like a charm!  Thank you again!
Eyes are the windows of the soul, but through the heart, the mouth speaks.

Jessie :)

 

Share |