how to make Max upload size bigger?

ivytony

Verified User
Joined
Jun 5, 2006
Messages
12
Hi,

I have a VPS that currently allow uploading 2MB max sql file to MySQL. Because I'm trying to import a 40MB-sql file into my database, I am wondering how to make MySQL Max upload size bigger?

thanks
 
You need to edit php.ini then restart apache webserver.

The file is located in /usr/local/lib/php.ini

Edit variables:

memory_limit
post_max_size
 
Php Info says
post_max_size 8M
But when I am in phpMyAdmin and go to Import > (Max: 2,048KB)
...I had to chop up my big DB into little pieces to load it.
 
finally, I found a command line to import large mysql database in linux.

thanks guys
 
ivytony said:
finally, I found a command line to import large mysql database in linux.

thanks guys

Well we were telling you how to fix the php so you could do that.

Its easy to do via the shell with:

mysql -u username -p < /path/to/file.sql
 
chatwizrd said:
You need to edit php.ini then restart apache webserver.

The file is located in /usr/local/lib/php.ini

Edit variables:

memory_limit
post_max_size

Hi,

in /usr/local/lib/php.ini I just found a "Symbolic link" php.ini file.

any other folder that I can look for php.ini?

tks.
 
Last edited:
I have the same problem. I just can't see any PHP.INI file. Need to increase that variable in MySQL. Should it be in mySQL or PHP? Which is causing trouble to stop uploading a big file?
 
Funny, nothing found! :(

[root@da1 ~]# find / -name php.ini
[root@da1 ~]#

[root@da1 ~]# php --version
PHP 4.4.2 (cli) (built: Jan 26 2006 13:52:30)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
[root@da1 ~]#
 
Hi,

Is there any way to increase the upload_max_filesize on a domain by domain basis? Or is this a global limit?

Thanks

Dale
 
If you want to use it on a domain by domain basis just go to that users httpd.conf in /usr/local/directadmin/data/users/*username*/httpd.conf and scroll down to the domain virtualhost and add
Code:
php_admin_value upload_max_filesize *size*M
inside of the <Directory> tag, you should see some other php_admin stuff in it, just add it under those.
 
Hi Marshall,

Thank you very much for the information. Will this override the global setting in the php.ini? In other words, can I just change a couple of domains to a higher limit and leave the default of 2 meg in php.ini for all other domains?

Thanks

Dale
 
It will override the global setting but only for that domain in the VirtualHost. All other domains will still have the 2M setting so yes you can use this to set only a few domains to a higher setting.
 
Back
Top