I have a program used to read a xml file and then update a mysql database with info from the xml file. Below is some of the program.
If the xml file is small say less than 100k it works fine if the xml file is larger than 100k I get the below error message.
Code:
use XML::Simple;
use Data::Dumper;
# create object
$xml = new XML::Simple;
# read XML file
$data = $xml->XMLin($xml_file);
# access <post> array
$update_count = 0;
$dbh = DBI->connect( "dbi:mysql:$db", "$user", "$password" )
or die "Can't connect to $db: $DBI::errstr\n";
foreach $e (@{$data->{post}}) {
$username = $e->{username}; $pagetext = $e->{pagetext}; $dateline = $e->{dateline};
$update_posts = $dbh->prepare( "UPDATE vb_post SET username = '$username' WHERE dateline = $dateline" );
$update_posts->execute();
$update_count++;
}
$dbh->disconnect;
If the xml file is small say less than 100k it works fine if the xml file is larger than 100k I get the below error message.
Code:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@stargateforum.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.