Raising the upload limit in phpmyadmin for CPanel

Firs you need to find the phpmyadmin php.ini file. Use this command to find all php.ini files:

find /usr -name php.ini

Then find the path to the php.ini file that is listed in the “phpmyadmin” folder.

Mine was


Next find these two section and change the limit how you want:

upload_max_filesize = 150M
post_max_size = 150M

I wouldn’t go above 200

Than restart cpanel from the command line:

service cpanel restart

How to increase upload limit for PhpMyAdmin on a Cpanel server

By default, PhpMyAdmin in a Cpanel server imposes an upload limit of 50MB. So importing a SQL file larger than 50MB may time out.

Cpanel PhpMyAdmin uses the php.ini file /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini. To increase upload limit, change values of upload_max_filesize and post_max_size in this php.ini file. Typically, you may set value of post_max_size to twice the value of upload_max_filesize. For example, to import SQL files up to 250MB size, set upload_max_filesize to 250MB and post_max_size to 500MB. You may also want to change values of max_execution_time and memory_limit.

Typical values may be:

upload_max_filesize = 250MB
post_max_size = 500MB
memory_limit = 512MB
max_execution_time = 3600

Mod_cband the new Mod_Bandwidth

CPanel has added mod_bandwidth into the easy apache so you can just run this to limit bandwidth on an account:

/scripts/setbwlimit --domain=your-main-domain.com --limit=8000000

I am leaving the old post just for reference below:

I spent hours trying to get mod_bandwidth to work simply because I have used it for years. But now with Apache 2.0 times have changed and there is a better option for Linux and it’s free. The new mod to regulate bandwidth and more is called Mod_cband I’m not sure what cband means but I can guess channel bandwidth.

Here is how to get it set up with Cantos 5.3 easily.

I wanted to host for my brother the latest WoW patch, but at a hefty 450 MB, I didn’t want to blow all my bandwidth on it either. I am setting a limit for the download at 2.5 TB of bandwidth, and limiting it to 5mbs at 10 connections a second. My hardware is RHEL 4 running on a P4 with Plesk 8. In the guide to follow, you’ll see a few steps that wouldn’t be needed on a non-plesk system. To setup bandwidth limiting for the host, we need to be able to compile a new apache module against our system, and then install and configure it.

Step 1: The prereqs

First I needed to setup a yum repository for FC4. This can be accomplished by issuing an RPM command:

rpm -ivh http://rpm.livna.org/livna-release-4.rpm

Now that you can access the RPM packages, we need to install http-devel using yum:

yum install httpd-devel

If all went well, we can now extract, compile, and install mod_cband for apache:

cd /tmp
wget http://cband.linux.pl/download/mod-cband-
tar xzvf mod-cband-
cd mod-cband-
make install

If all went well, restart apache with the new module (you can check httpd.conf to make sure the module is going to be loaded):

/etc/init.d/httpd restart

Step 2: Configuration

Here’s where the Plesk part gets annoying. We can’t just edit our vhosts file, because plesk writes over it all the time. Instead, we edit a /home/httpd/vhosts/*/subdomains/*/conf/vhost.conf file. Mine looks like this:

CBandScoreboard /var/www/scoreboard
CBandPeriod 4W
CBandDefaultExceededCode 509
CBandLimit 2500G
CBandSpeed 5000 5 10
CBandRemoteSpeed 1600 3 1
<Location /cband-status>
SetHandler cband-status
<Location /cband-status-me>
SetHandler cband-status-me

What does this mean? (1) Use /var/www/scoreboard to log usage and limits (2) Reset the limit count every 4 weeks (3) Throw a 509 error when the limits are exceeded (4) Allow 2.5TB per period (5) Allow 5mbs with 5 requests a second and 10 connections at a time oeverall (6) Allow 1.6mbs with 3 requests a second and 1 connections at a time per client (7) Allow us to access a page at /cband-status to view the status.

You’ll also need to issue commands to make the scoreboard directory, and to allow apache to own it:

mkdir /var/www/scoreboard
chown apache:apache /var/www/scoreboard

Finally, Plesk requires you to inform it of your work:

/usr/local/psa/admin/sbin/websrvmng -u –vhost-name=yourdomain.com

If you restart Apache now, everything should work!

/etc/init.d/httpd restart

Step 3: An Example

You can take a peek at my status page right now if you’d like. It looks a bit like this:

A quick note, I simply just added:

CBandPeriod 4W
CBandLimit 10000G
CBandSpeed 12000 40 80
CBandRemoteSpeed 6400 12 4

Now this set the limit to about 12 megs (MPS) a second which is a lot, but this customer is paying $250 a month to cover it. Most websites should max at about 5 MPS. I left out the other options because I didn’t need them and it’s less load on the server without them.