I’m running my own PHP config using CGI, based on a tutorial in the wiki.
I’m trying to run a script that reads some data from some log files and does a MySQL INSERT for each line. This is because I’m trying to migrate my visitor history from plaintext logfiles to SQL.
I’ve succeeded to run this script once, but now I can’t run it anymore without it getting killed by a SIGKILL. That is, if I run it through php -f file.php. If I run it in my own cgi-bin/php.cgi, it sort of works but only a couple of the 113K MySQL INSERTs make it through.
Question 1: Are there restrictions that I’m exceeding that cause my script to be sigkilled?
Question 2: Upon executing a script from the commandline, how do I check for MySQL errors preventing INSERT queries to complete? mysql_error() doesn’t seem to work in php in this case.