PDA

View Full Version : how to make Max upload size bigger?


ivytony
07-06-2006, 04:20 PM
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

chatwizrd
07-06-2006, 04:38 PM
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

netstepinc
07-07-2006, 09:31 AM
New DA install.
Found var upload_max_filesize

chatwizrd
07-07-2006, 09:36 AM
Originally posted by netstepinc
New DA install.
Found var upload_max_filesize

no

netstepinc
07-07-2006, 09:41 AM
To clarify.
post_max_size was not in my php.ini file.
Should it be added?

netstepinc
07-07-2006, 10:48 AM
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.

ivytony
07-07-2006, 12:44 PM
finally, I found a command line to import large mysql database in linux.

thanks guys

chatwizrd
07-07-2006, 01:48 PM
Originally posted by ivytony
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

winger
07-20-2006, 05:19 AM
Originally posted by chatwizrd
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.

chatwizrd
07-20-2006, 08:52 AM
Just edit that file.

winger
07-21-2006, 04:50 AM
Originally posted by chatwizrd
Just edit that file.

Ok, done!

And I must restart any service?

Thank you for help.

chatwizrd
07-21-2006, 08:58 AM
Yes restart your apache web server.

pluk
08-11-2006, 06:20 PM
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?

chatwizrd
08-12-2006, 07:36 AM
find / -name php.ini

pluk
08-12-2006, 04:14 PM
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 ~]#

TheBear
01-31-2007, 04:28 PM
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

Marshall
01-31-2007, 06:23 PM
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 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.

TheBear
01-31-2007, 10:00 PM
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

Marshall
01-31-2007, 10:01 PM
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.

TheBear
01-31-2007, 10:06 PM
MArshall,

Fantastic. Thank you very much!

Dale

Barakat
05-08-2008, 07:41 PM
thanks a lot ,,

tsiou
05-09-2008, 09:55 AM
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 ~]#

do a
locate php.ini

it will show something like :
/usr/local/etc/php.ini-dist
/usr/local/etc/php.ini-recommended

do a
cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini