php.ini file upload change - server wide?

tomp66

Member
May 18, 2007
7
0
151
London UK
need to change the allowed php upload file size (from 2mb default to 30Mb) - which php.ini file should i change or more than one? seems theres a few on our box!

[email protected] [~]# locate php.ini
/home/installd/buildapache/php-4.4.6/php.ini-dist
/home/installd/buildapache/php-4.4.6/php.ini-recommended
/scripts/php.ini
/usr/lib/php.ini
/usr/local/cpanel/3rdparty/etc/php.ini
/usr/local/cpanel/3rdparty/lib/php.ini
/usr/local/lib/php.ini
/usr/local/lib/php.ini.new
/var/cpanel/version/php.ini-2

would i be wrong to reckon its the cpanel one that will do the trick /usr/local/cpanel/3rdparty/lib/php.ini i think? - any further ideas?

cheers

tom
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
need to change the allowed php upload file size (from 2mb default to 30Mb) - which php.ini file should i change or more than one? seems theres a few on our box!
If you are on cPanel 11, all you have to do to change this is to login to WHM, go to "Service Configuration" then click on "PHP Configuration Editor"

The bottom entry, just change from 2M to 30M then click save.
 

neonix

Well-Known Member
Oct 21, 2004
124
2
168
Upload this phpinfo script to your server and view the output through your browser.

This page is going to verify the availability of PHP on your server, and provide you with a lot of information about the PHP itself and the server it's running on. Here's the code:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>

Go ahead and create a file containing this code -- the file name should end with a .php suffix -- upload it to your server and view it in your web browser just like you would any other web page and look for Configuration File (php.ini) Path,
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
ah alas no

WHM 10.8.0 cPanel 10.9.0-R10737
Fedora i686 - WHM X v3.1.0

is our config

:-(

what next?

ta

tom
Manually edit /usr/local/lib/php.ini

Note that /usr/local/cpanel/3rdparty/etc/php.ini is used for the cPanel/WHM interface itself. The /usr/local/lib/php.ini file is used for Apache.
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
To answer your question, you need to edit the PHP.INI file shown in the phpinfo() screen
for your PHP installation.

The default location for the PHP.INI file is /usr/local/lib but your server could be using
a different location especially if you are using SuPHP or PhpSuExec.

Create a file with the following:
Code:
<?php phpinfo(); ?>
Save the file and view it with your web browser ...

On that screen, the full path to your PHP.INI file will be shown and that is the PHP.INI
file that you would need to edit for your changes to be effective.

If you are not using SuPHP, remember to restart your web server service after making
any changes to the PHP.INI file or your changes won't take effect.