I have about 600 record from output query. Then I make a update script with looping foreach
On windows with xampp 1.7.3 (PHP5 and MySQL5) that's run normally and fast. And sucessfully updated.
But when i upload to my host (CentOS server) i see the proccess update data is get long, and then i got 500 Internal Server Error. When the proccess running, i refresh table database, the update data is long time each row. So only about 20 record can updated, and then got 500 internal server error.
For information, on my host application server (PHP4) and database server (MySQL4) is different server.
Proccess update data with looping array :
foreach($kode as $id => $kdid) {
$page->adodb->StartTrans();
$qw->sqlExecute($sql['update_data'],array($tglmasuk[$id],$no_urutan[$id],$kode[$id]), false);
$page->adodb->CompleteTrans();
}
file sql :
$sql['update_data'] = "UPDATE history
SET
tgl_masuk = '%s',
no_urutan = '%s'
WHERE id_history = '%s'"
error log :
[Mon Mar 16 08:47:19 2015] [warn] [client 192.168.1.122] Timeout waiting for output from CGI script /var/www/cgi-bin/php, referer: http://myurlproccessubmit
[Mon Mar 16 08:47:19 2015] [error] [client 192.168.1.122] Premature end of script headers: php, referer: http://myurlproccessubmit
Can someone help me for solve the problem??