Search code examples
phpphpmyadmintimeout

phpMyAdmin timeout not respecting PHP.ini max_execution_time


Trying to import a 150MB .sql.zip file into WAMP phpMyAdmin using this method (saving the import file in c:/wamp/sql, and editing C:\wamp\apps\phpmyadmin5.0.2\config.inc.php to include $cfg['UploadDir'] = 'C:\wamp\sql'; at the end, then an option to import the file save to C:\wamp\sql during the import process.

However, I keep receiving a timeout error in phpMyAdmin, with advice to rerun the import selecting the same file, but on the 2nd run I always receive SQL errors.

So, I've set max_execution_time = 4500 in Wamp's PHP.ini (4500 seconds equals 75 minutes) and restarted Apache and MySQL.

However, the same timeout error occurs when using the same import process. The timeout error occurs after about 5 minutes.

Why is the timeout error occurring within 5 minutes and not within the time set by PHP.ini max_execution_time = 4500 ?

Edit

phpinfo says localhost has:

memory_limit    200M
post_max_size   200M
upload_max_filesize 200M
max_execution_time  4500

I continue to receive the message that a timeout has occurred and to rerun the import again with the same file, but on the 2nd run, I receive an error:

Error Static analysis:

2 errors were found during analysis.

Unexpected beginning of statement. (near "RT" at position 0)
Unrecognized statement type. (near "INTO" at position 3)

SQL query: Copy

RT INTO `cache_menu` 

It looks like the SQL INSERT command is being cut by the process.

How can I safely split the SQL into smaller chunks?


Solution

  • I am unsure if this is an adequate solution for someone encountering the same problem but my workaround was to split the large SQL file into smaller files using SQL Dump File Splitter