Uploading file too large

Und alles was mit phpMyAdmin seine Verwandtschaft findet hat hier seinen Platz.

Uploading file too large

Postby doKer » 19. December 2019 03:07

You probably tried to upload a file that is too large

As I see the quote above during importing a test.sql, I did googling and found that I have to change php.ini.

So I changed the php.ini like the following.
before:
post_max_size = 8M
upload_max_filesize = 2M
max_file_uploads = 20
max_execution_time = 30
memory_limit = 128M

after:
post_max_size = 750M
upload_max_filesize = 750M
max_file_uploads = 200
max_execution_time = 300
memory_limit = 1000M


I did shutdown and restart the computer.
but it still says the quote below
You probably tried to upload a file that is too large


As I look closely after I did select import. the following is not changed although I've changed like the before/after quote above in php.ini.
Browse your computer:[browse] (Max: 2,048KiB)


How can I make "import" work?
How can I change (Max:2,048KiB) the quote above?
doKer
 
Posts: 1
Joined: 12. December 2019 03:56
XAMPP version: 5
Operating System: xubuntu

Re: Uploading file too large

Postby nemesis » 21. December 2019 04:43

Ubuntu 18.04 | SMP P3 1.4 GHz | 6 GByte RegECC | 74 GByte Seagate 15k5 system | 3Ware 9550SXU-4LP with 4x 500 GByte Seagate ES2 Raid 10 data | StoreCase DE400 | PX-230A | Intel Pro/1000MT Dual PCI-X
User avatar
nemesis
AF Moderator
 
Posts: 1044
Joined: 29. December 2002 13:14
Location: Ingolstadt
XAMPP version: depends
Operating System: Linux, BSD, Win, iOS, Android

Re: Uploading file too large

Postby townsbg » 20. April 2020 06:22

I am also experiencing this issue. I changed the size in php.ini but the limit still shows 2 mb. Why?
townsbg
 
Posts: 16
Joined: 21. January 2015 07:26
Operating System: WIndows 2003

Re: Uploading file too large

Postby Nobbie » 20. April 2020 16:04

That was hardcoded in superold phpmyadmin.
Nobbie
 
Posts: 11731
Joined: 09. March 2008 13:04

Re: Uploading file too large

Postby Altrea » 20. April 2020 16:42

What is the local and global value of the settings memory_limit, post_max_size and upload_max_filesize in PHPinfo?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10392
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Uploading file too large

Postby townsbg » 20. April 2020 19:00

Currently I'm back to the default.
memory_limit=128M
post_max_size=8M
upload_max_filesize=2M

However I tried changing the max to 512 and when that didn't work I changed all 3. I also tried both the development and production files. If I need to update how do I do so?
townsbg
 
Posts: 16
Joined: 21. January 2015 07:26
Operating System: WIndows 2003

Re: Uploading file too large

Postby townsbg » 20. April 2020 19:23

As per the following instructions I tried the command line:

Nobbie wrote:Try to import your SQL file via mysql interpreter instead of phpmyadmin, thats by far more stable.

In a terminal run mysql approx. like this:

Code: Select all
c:/xampp/bin/mysql -u username -ppassword databasename <exportfile.sql


Be carefully, as you can see, there is a space between "-u" and username, but there is NO space between "-p" and password - thats weird, but correct! If your exportfile.sql (replace with the real file name) already applies a database (you would find a "USE database;" somewhere in the top, you might omit the databasename in the command. There MUST NOT be a space between "<" and the exportfile.sql.

That command will run by far faster than phpmyadmin and its by far more stable. If you use Xampps default setup and apply "root" as Username and leave out the -p Option with passwort (as Password is empty on default installation).


As follows:
Code: Select all
C:\xampp>c:/xampp/mysql/bin/mysql.exe -u <Username> -p<Password> mywiki <Wiki_Database.sql


And I received the following error:
ERROR 2006 (HY000) at line 527: MySQL server has gone away


Is that because of the 2mb limit? Did I get the syntax right?
townsbg
 
Posts: 16
Joined: 21. January 2015 07:26
Operating System: WIndows 2003

Re: Uploading file too large

Postby Altrea » 20. April 2020 19:33

townsbg wrote:I also tried both the development and production files. If I need to update how do I do so?

None of them, these are only templates. That's why I asked what's the values in phpinfo and not what you are thinking you have configured.
The only valid php configuration file by default is named php.ini and even in this file are commented lines that don't change anything if you put in your new values there.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10392
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Uploading file too large

Postby townsbg » 20. April 2020 20:17

Now things are worse. As per this I tried to adjust innodb_lock_wait_timeout & innodb_log_file_size in my.ini. Now I'm getting a blue banner that says "This app can't run on your PC. To find a version for your PC, check with the software publisher." The command prompt line also returns access is denied. Issue persists after restoring the my.ini file from a backup and rebooting the computer. Everything else seems to be working.

I'm running 2012 r2. This is a recovery from a 2008 r2 server.

How do I get the database imported? If I need to update xampp how do I do so?
townsbg
 
Posts: 16
Joined: 21. January 2015 07:26
Operating System: WIndows 2003

Re: Uploading file too large

Postby Altrea » 20. April 2020 20:21

In your position I would restore the last backup I would have made before changing anything that essential.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10392
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Uploading file too large

Postby townsbg » 20. April 2020 21:28

I restored the entire folder and tried an import from the command line. I'm not getting that blue banner anymore nor the access is denied error but I still got the server has gone away error. Do I need to update xampp? If so how?
townsbg
 
Posts: 16
Joined: 21. January 2015 07:26
Operating System: WIndows 2003

Re: Uploading file too large

Postby Altrea » 21. April 2020 06:47

townsbg wrote:As follows:
Code: Select all
C:\xampp>c:/xampp/mysql/bin/mysql.exe -u <Username> -p<Password> mywiki <Wiki_Database.sql


And I received the following error:
ERROR 2006 (HY000) at line 527: MySQL server has gone away


Is that because of the 2mb limit? Did I get the syntax right?

I hope you did repcale <Username> and <Password> with your true credentials, and did not enclose them in the <> brackets...

That is not because of the 2MB limit. The 2MB limit is a limitation of the php configuration. phpmyadmin is written in php so it is affected by php configirations.
The MySQL CLI is only affected by mysql configurations. There are of course still limitations that can produce such behavior.

In your case it can be true that your import contains very very huge sql statements that exceeded the limit for max_allowed_packet. So it might help to increase this limit for the server in your my.ini file and for the client as command parameter --max_allowed_packet. Maximum value for this parameter is 1G which means 1 Gigabyte.

So for your mysql statement it should be append to
Code: Select all
c:/xampp/mysql/bin/mysql.exe --max_allowed_packet=1G -u <Username> -p<Password> mywiki <Wiki_Database.sql

But don't forget to change this value for the server component in the \xampp\mysql\bin\my.ini file in the [mysqld] section too and restart your mysql server after that.

townsbg wrote:Do I need to update xampp? If so how?

How should we answer that? We have no information about your current environment, not even which XAMPP version you are using. We don't know your import file, or your current configuration.
In general: only update if you have a specific issue you already know that an update will solve that or if you have no other options.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10392
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Uploading file too large

Postby townsbg » 21. April 2020 19:32

That is where I put my actual username and password, without the brackets. I tried the root ID, a global admin, and the admin for the actual database.

But don't forget to change this value for the server component in the \xampp\mysql\bin\my.ini file in the [mysqld] section too and restart your mysql server after that.


What do you mean? The last time I tried to edit the my.ini file I (apparently) corrupted my install. Anyway I tried your derivative and it didn't work. I still got the mysql server has gone away error.

How should we answer that? We have no information about your current environment, not even which XAMPP version you are using. We don't know your import file, or your current configuration.
In general: only update if you have a specific issue you already know that an update will solve that or if you have no other options.


Version 5.6.30-1. The import file is only 17.8 mb. I'm not sure how to answer your other questions. Other than setting up a site and changing the passwords I haven't changed a lot from the defaults.
townsbg
 
Posts: 16
Joined: 21. January 2015 07:26
Operating System: WIndows 2003

Re: Uploading file too large

Postby townsbg » 21. April 2020 20:39

I changed max_allowed_packet to 512m and I was able to import the database without any errors. After re-configuring the site it seems to be working. Now I should be able to do the same to the other sites and decomm my old server. Before I head down that path should I update and if so how? Also is that a good size for the max allowed or should it be higher/lower?

Here's: the results of the command:
Code: Select all
C:\xampp>c:/xampp/mysql/bin/mysql.exe -u <username> -p<password> mywiki <Wiki_Database.sql

C:\xampp>
townsbg
 
Posts: 16
Joined: 21. January 2015 07:26
Operating System: WIndows 2003

Re: Uploading file too large

Postby townsbg » 21. April 2020 21:40

Also I see in the php.ini file that the time zone is set for germany. That would explain why the times are always wrong. How do I set it for CST?
townsbg
 
Posts: 16
Joined: 21. January 2015 07:26
Operating System: WIndows 2003

Next

Return to phpMyAdmin

Who is online

Users browsing this forum: No registered users and 2 guests