how to increase phpmyadmin import limit

seachen

Verified User
Joined
Feb 3, 2007
Messages
486
i found out that my server phpmyadmin import limit only (Max: 2,048 KiB)

may i know how to increase this to 50mb?
 

frednoob

Verified User
Joined
Feb 15, 2007
Messages
92
change as you need, find it this line


;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = ??M <--- change here ....

correct me if i wrong ...
 

dws

Verified User
Joined
Mar 10, 2007
Messages
9
That it`s a global setting of php. I use to upload bigdump.php to server ftp dump of mysql and restore directly via http.


if you increase file uploads to 50 Mb, this setting will be effective server wide.


correct me if i´m wrong
 

sde

Verified User
Joined
Sep 11, 2004
Messages
215
Location
Temecula, CA
That's correct, modifications in the php.ini file are server wide. You could also put a .htaccess file in your phpmyadmin directory and modify the parameter just for phpmyadmin.

example .htacess
Code:
php_flag upload_max_filesize "50M"
php_flag max_execution_time 300
php_flag memory_limit "64M"
Note, you may want to modify max_execution_time and memory_limit, because along with larger upload files comes longer page processing and memory usage.

If server-side modifications aren't a concern, then just change those fields in php.ini as originally suggested.
 

sde

Verified User
Joined
Sep 11, 2004
Messages
215
Location
Temecula, CA
Interestingly enough, I just stumbled across some info tonight after I posted.

From what i'm reading, php_flag/php_value is specific to mod_php, so if you're using FastCGI, you would need to use htscanner to implement directory level control over php parameters.

Last option would be to add PHP code to the phpmyadmin config file which sets the ini parameter. The code would look something like this:
Code:
ini_set('upload_max_filesize', '50M');
Safe Mode would prevent that override in the PHP code if it were on.
 

PRB

Verified User
Joined
Oct 18, 2008
Messages
162
change as you need, find it this line


;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = ??M <--- change here ....

correct me if i wrong ...
We changed that, yet there are no changes in phpmyadmin. It still says 8,192 KB.

All I did was edit the php.ini file, nothing less, nothing more. phpmyadmin 3.1.2
 

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
You gotta restart the webserver after editing the php.ini
 

PRB

Verified User
Joined
Oct 18, 2008
Messages
162
The entire server? I can't just recompible or restart some services?

Thanks for your answer.
 

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
Type:

/sbin/service httpd restart

or use directadmin to restart the http service
 

PRB

Verified User
Joined
Oct 18, 2008
Messages
162
I get this:
-bash: /sbin/service: No such file or directory

I restarted httpd through DirectAdmin but no effect, it still says 8,192KB... :(
 

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
Make sure you are editing the right php.ini file.

PHP4 configuration file is located here: /usr/local/etc/php4/cgi/php.ini
PHP5 configuration file is located here: /usr/local/etc/php5/cgi/php.ini
PHP6 configuration file is located here: /usr/local/etc/php6/cgi/php.ini

You have debian or freebsd?

Debian:

/etc/init.d/httpd restart

Freebsd:

/usr/local/etc/rc.d/httpd restart
 

PRB

Verified User
Joined
Oct 18, 2008
Messages
162
Make sure you are editing the right php.ini file.

PHP4 configuration file is located here: /usr/local/etc/php4/cgi/php.ini
PHP5 configuration file is located here: /usr/local/etc/php5/cgi/php.ini
PHP6 configuration file is located here: /usr/local/etc/php6/cgi/php.ini

You have debian or freebsd?

Debian:

/etc/init.d/httpd restart

Freebsd:

/usr/local/etc/rc.d/httpd restart
There are no directories inside "/usr/local/etc/" and so I coudnt find the "phpX" .

locate php.ini
/usr/local/installatron/etc/php.ini
/usr/local/lib/php.ini
I use Debian and I used the command you gave me to restart httpd and phpmyadmin still gives me 8MB import limit

Something is wrong?
 

jantsu78

Verified User
Joined
Apr 12, 2009
Messages
8
I have same problem. php.ini file is modified to -->

upload_max_filesize = 40M

Server restarted but it says in phpmyadmin that 8 192 kt

What should i do?

EDIT: Problem solved. Find --> post_max_size
Change it what ever you want.
 
Last edited:

readyman

New member
Joined
Oct 14, 2011
Messages
1
It's actually the post_max_filesize as well

Sorry to bump an old thread, but it's at the top of Google, so I'm pretty sure a lot of people are coming here and getting the incorrect info.

Look for post_max_filesize in your PHP.ini file, then update it to 50M or whatever you need.
Note that you'll have to set other configs like timeouts etc if you are going to be able to upload a file that big.
 

sde

Verified User
Joined
Sep 11, 2004
Messages
215
Location
Temecula, CA
Sorry to bump an old thread, but it's at the top of Google, so I'm pretty sure a lot of people are coming here and getting the incorrect info.

Look for post_max_filesize in your PHP.ini file, then update it to 50M or whatever you need.
Note that you'll have to set other configs like timeouts etc if you are going to be able to upload a file that big.
Funny, the only incorrect info in this thread is what you posted. :D There is no post_max_filesize.

jantsu78 posted the solution you're referring to about 2 1/2 years ago.

jantsu78 said:
EDIT: Problem solved. Find --> post_max_size
Change it what ever you want.
 

smoini

New member
Joined
Oct 28, 2011
Messages
1
post_max_size doesn't appear to be in my config.inc.php file. Do you mean add it?
 
Top