Asked  7 Months ago    Answers:  5   Viewed   32 times

I have an XML document that has around 48,000 children (~50MB). I run an INSERT MYSQL query that makes new entries for each one of these children. The problem is that it takes a lot of time due to its size. After it is executed I receive this

Fatal error: Maximum execution time of 60 seconds exceeded in /path/test.php on line 18

How do I set the Maximum execution time to be unlimited?




You can make it by setting set_time_limit in you php code (set to 0 for no limit)


Or modifying the value of max_execution_time directly in your php.ini

; Resource Limits ;

; Maximum execution time of each script, in seconds
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 120  

Or changing it with ini_set()

ini_set('max_execution_time', 120); //120 seconds

but note that for this 3rd option :


You can not change this setting with ini_set() when running in safe mode. The only workaround is to turn off safe mode or by changing the time limit in the php.ini.


Wednesday, March 31, 2021
answered 7 Months ago

you can't print the result from mysqli_query, it is mysqli_resource and for dumping the error you need to change mysql_error() to mysqli_error()

$username = "bob";
$db = mysqli_connect("localhost", "username", "password", "user_data");
$sql1 = "select id from user_information where username='$username'";
$result = mysqli_query($db, $sql1) or die(mysqli_error());
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { 
    echo $row['id'].'<br>'; 
Saturday, May 29, 2021
answered 5 Months ago

I have the same error, please go to


Look for : $cfg['ExecTimeLimit'] = 600;

You can change '600' to any higher value, like '6000'.

Maximum execution time in seconds is (0 for no limit).

This will fix your error.

Wednesday, June 2, 2021
answered 5 Months ago

yo need create the user "pma" in mysql or change this lines(user and password for mysql):

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma'; 
$cfg['Servers'][$i]['controlpass'] = '';

Linux: /etc/phpmyadmin/

Tuesday, July 13, 2021
answered 4 Months ago

You can try to use mysql console.

  1. Run cmd command
  2. Type c: or d: on command prompt. This will be based on your WAMP server installations.
  3. Assuming you have installed wamp on D: drive.
  4. D:>cd wamp
  5. D:wamp>cd bin
  6. D:wampbin>cd mysql
  7. D:wampbinmysql>cd mysql15.1.36
  8. D:wampbinmysqlmysql15.1.36>cd bin
  9. D:wampbinmysqlmysql15.1.36bin>mysql.exe -u root
  10. use database
  11. 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.

Thursday, September 23, 2021
answered 1 Month ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :