I have a table with 300,000 rows. then when i import it, it will uploaded almost 200,000 rows then phpmyadmin kills the upload with this error:
Fatal error: Maximum execution time of 300 seconds exceeded in C:\xampp\phpMyAdmin\libraries\import\sql.php on line 246
Note: 'on line 246' is not unchanged. sometimes is 130 or 182.
It should be noted that i changed (increased) all the parameter in php.ini file.
something such as:
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
Still i could not upload my huge table .....! In fact, my problem is time limit. What suggestions do you have ?
I could solve my problem with the help of #vohuman.
To get rid of the limitations of import (and even export), you should use command line, Or in the words of #vohuman:
#vohuman: 'Log into mysql shell and source the sql file'
So, to import a .sql file (for windows and xampp), you should do these:
step1: put your .sql file on C drive, then your file address will be: c:\filename.sql
step2: open CMD and type this:
c:\xampp\mysql\bin
step3: then type this line into command line to import your file:
mysql -u {username} -p {databasename} < c:\filename.sql
By default {username} is root.
If you use the password, you should use -p{passwordname} in above line. (between -p and passwordname isn't any space.)
Also you can use any other address. c:\filename.sql is for example.
step4: finally, check your database and uploaded file. (for example use phpmyadmin)
The configuration is ok, but you have to notice that if you are running phpmyadmin with an alias conf file, inside the alias you can set the php variables right to the alias, and will not be affected with the directives that you set in the global php.ini, check the alias (if is the case)
Alias /phpmyadmin "/path/phpmyadmin4.4.6/"
<Directory "/path/phpmyadmin4.4.6/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<IfDefine APACHE24>
Require local
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</IfDefine>
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
Related
I just installed WampServer. It works when I visit my project page but when I try to navigate phpMyAdmin i get this error:
Maximum execution time of 360 seconds exceeded
What is the problem?
A better solution here is to change the config that controls phpMyAdmin and not the php.ini file.
If you change the php.ini file you effect everything in PHP and should you write that infinite loop that we all do from time to time it will take longer to terminate your infinite loop than is sensible.
Note: If you are using the 64bit WAMPServer the base folder name will be wamp64 instead of wamp so please amend the below folder names accordingly.
So change \wamp\alias\phpmyadmin.conf. By default it will look something like this although your version of phpMyAdmin will probably be different:
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"
<Directory "c:/wamp/apps/phpmyadmin4.1.14/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<IfDefine APACHE24>
Require local
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</IfDefine>
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
To extend the maximum time limit for importing a database, change the php_admin_value max_execution_time parameter. You may also need to change the other parameters as larger databases tend to come in larger files and take longer to read as well. Example:
php_admin_value upload_max_filesize 1024M
php_admin_value post_max_size 1024M
php_admin_value max_execution_time 1800
php_admin_value max_input_time 1800
Don't forget to restart Apache after making changes to this file.
In your php/php.ini change max_execution_time = 360 to 99999.
OR
You can add ini_set('max_execution_time', 600); //600 seconds = 10 minutes line on top of your php file.
See, if that works.
What helped me is to edit config.inc.php in phpmyadmin folder and changed:
$cfg['Servers'][$i]['host'] = 'localhost';
to
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Basically change "localhost" to "127.0.0.1", xampp and wampp differently resolve those two.
I just installed WampServer. It works when I visit my project page but when I try to navigate phpMyAdmin i get this error:
Maximum execution time of 360 seconds exceeded
What is the problem?
A better solution here is to change the config that controls phpMyAdmin and not the php.ini file.
If you change the php.ini file you effect everything in PHP and should you write that infinite loop that we all do from time to time it will take longer to terminate your infinite loop than is sensible.
Note: If you are using the 64bit WAMPServer the base folder name will be wamp64 instead of wamp so please amend the below folder names accordingly.
So change \wamp\alias\phpmyadmin.conf. By default it will look something like this although your version of phpMyAdmin will probably be different:
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"
<Directory "c:/wamp/apps/phpmyadmin4.1.14/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<IfDefine APACHE24>
Require local
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</IfDefine>
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
To extend the maximum time limit for importing a database, change the php_admin_value max_execution_time parameter. You may also need to change the other parameters as larger databases tend to come in larger files and take longer to read as well. Example:
php_admin_value upload_max_filesize 1024M
php_admin_value post_max_size 1024M
php_admin_value max_execution_time 1800
php_admin_value max_input_time 1800
Don't forget to restart Apache after making changes to this file.
In your php/php.ini change max_execution_time = 360 to 99999.
OR
You can add ini_set('max_execution_time', 600); //600 seconds = 10 minutes line on top of your php file.
See, if that works.
What helped me is to edit config.inc.php in phpmyadmin folder and changed:
$cfg['Servers'][$i]['host'] = 'localhost';
to
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Basically change "localhost" to "127.0.0.1", xampp and wampp differently resolve those two.
I want to import a big sql file to mysql database locally .
I try to import it with command line but i execute the command and i waited more than two hours without any results for an 170 Mo sql file .
I tried also to change php.ini but wampserver don't start .
memory_limit = 900M
post_max_size = 500M
upload_max_filesize = 500M
How can i import my file please ?
With the following command
mysql -u username -p password dbname < dump.sql
you do not have to modify your php.ini, you are not using PHP.
You can use this command to display what is going:
mysql -u username -p password dbname --verbose < dump.sql
Your file is big, it can take a while to load on your local database, it depends of your own computer and for example if the datas loaded have a lot of indexes.
Wampserver controls the limits applied to phpMyAdmin from the alias definition for phpMyAdmin
So edit \wamp\alias\phpmyadmin.conf it should look like this initially in WAMPserver 2.5
Alias /phpmyadmin "d:/wamp/apps/phpmyadmin4.1.14/"
# to give access to phpmyadmin from outside
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#
<Directory "d:/wamp/apps/phpmyadmin4.1.14/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<IfDefine APACHE24>
Require local
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</IfDefine>
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
So amend these parameter to increase the limits
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
Alternatively you can use the mysql console launched from the wampmanager menus like so :-
left click wampmanager -> MySQL -> MySQL console
If you have not chnaged the MySQL root password, just hit enter when asked for the password, alternatively is you have chnaged the root password enter the actual password at the prompt.
Then enter this command at he mysql> prompt to run you restore of you backup file
source C:/path/to/your/backup.sql
This has not limits on execution time or file size.
I just installed WampServer. It works when I visit my project page but when I try to navigate phpMyAdmin i get this error:
Maximum execution time of 360 seconds exceeded
What is the problem?
A better solution here is to change the config that controls phpMyAdmin and not the php.ini file.
If you change the php.ini file you effect everything in PHP and should you write that infinite loop that we all do from time to time it will take longer to terminate your infinite loop than is sensible.
Note: If you are using the 64bit WAMPServer the base folder name will be wamp64 instead of wamp so please amend the below folder names accordingly.
So change \wamp\alias\phpmyadmin.conf. By default it will look something like this although your version of phpMyAdmin will probably be different:
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"
<Directory "c:/wamp/apps/phpmyadmin4.1.14/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<IfDefine APACHE24>
Require local
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</IfDefine>
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
To extend the maximum time limit for importing a database, change the php_admin_value max_execution_time parameter. You may also need to change the other parameters as larger databases tend to come in larger files and take longer to read as well. Example:
php_admin_value upload_max_filesize 1024M
php_admin_value post_max_size 1024M
php_admin_value max_execution_time 1800
php_admin_value max_input_time 1800
Don't forget to restart Apache after making changes to this file.
In your php/php.ini change max_execution_time = 360 to 99999.
OR
You can add ini_set('max_execution_time', 600); //600 seconds = 10 minutes line on top of your php file.
See, if that works.
What helped me is to edit config.inc.php in phpmyadmin folder and changed:
$cfg['Servers'][$i]['host'] = 'localhost';
to
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Basically change "localhost" to "127.0.0.1", xampp and wampp differently resolve those two.
Im trying to backup a wordpress website from host and move it back on my local host and keep it as a sample for rebuilding. If have any workaround or maybe other methods I`m all ears
I backedup my website and database also, but when I`m trying to "Import" my sql database I always get the fallowing error Fatal error:
Maximum execution time of 360 seconds exceeded in
C:\wamp\apps\phpmyadmin4.1.14\libraries\import.lib.php on line 345
The database is kind of big 203MB and I archived it aiesecbu_achieve.sql.zip 55.8 MB
I can say that I`ve already tried this: Fatal error: Maximum execution exceeded
and modifying my php.ini
post_max_size = 400M
upload_max_filesize = 250M
memory_limit = 128M
I have uploaded my database for you to test it if you want(maybe it`s something wrong with it) and a screenshot
https://www.dropbox.com/s/cx9wava7sptf4km/mysql.jpg?dl=0
You can try to use mysql console.
Run cmd command
Type c: or d: on command prompt. This will be based on your WAMP server installations.
Assuming you have installed wamp on D: drive.
D:\>cd wamp
D:\wamp>cd bin
D:\wamp\bin>cd mysql
D:\wamp\bin\mysql>cd mysql15.1.36
D:\wamp\bin\mysql\mysql15.1.36>cd bin
D:\wamp\bin\mysql\mysql15.1.36\bin>mysql.exe -u root
use database
source source.sql
Bassicaly you login into mysql, use database determines which database you want to use, source /source/to/source.sql determines which sql you want to run. Pretty easy and efficient.
As you have phpMyAdmin4.1.14 installed I assume you are using WAMPServer 2.5
In WAMPServer 2.5 the PHP resources used by phpMyAdmin are controlled from the phpMyAdmin alias config file. It was changed for exactly these situations, so you dont have to change the php.ini to add a ridiculously large values to parameters that effect your whole PHP environment.
So to increase the relevant paameters you would do this :-
Edit \wamp\alias\phpmyadmin.conf which should look like this by default
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"
# to give access to phpmyadmin from outside
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#
<Directory "c:/wamp/apps/phpmyadmin4.1.14/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<IfDefine APACHE24>
Require local
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</IfDefine>
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
Now change the parameters here, so they only effect what happens when you are running phpMyAdmin.
These are the parameters you should amend
php_admin_value upload_max_filesize 500M <-- and probably this
php_admin_value post_max_size 128M
php_admin_value max_execution_time 620 <-- this for a start
php_admin_value max_input_time 360
But basically try a modification and see if it works, if not depending on the error amend the relevant parameter.
Dont forget to restart Apache after each change you make to this file
Oh and dont forget to undo the changes you made to php.ini
For the latest version of wamp server:
Wampserver 2.5.17 32bits
Apache 2.4.17/2.2.31
PHP 5.6.14/7.0.0rc5/5.5.30/5.4.45/5.3.29
MySQL 5.6.27/5.7.9/5.5.46/5.1.73/5.0.83
PhPMyAdmin 4.5.0
MysqlDumper 1.24.4 (W7 Pro 64bits)
try this out:
In wamp\alias\phpmyadmin.conf file, just before the last statement </Directory> add four statements to obtain:
php_admin_value upload_max_filesize 512M
php_admin_value post_max_size 512M
php_admin_value max_execution_time 900
php_admin_value max_input_time 900
</Directory>