message "Error 500 Internal Server Error"

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Chris!
-


Joined: 08 Nov 2007
Posts: 5

PostPosted: Sun Dec 11, 2011 2:47 pm    Post subject: message "Error 500 Internal Server Error" Reply with quote

Hello

When I run the below displayed script, I get this message "Error 500 Internal Server Error" after having acquired around max 149 files.

I used this defense in December 2010 where it worked perfectly and I got about 2 x 5000 files.

Anyone have ideas about what is wrong?

I use:
Windows XP Pro with SP2.
Abyss Web Server X1 ver. 2.7
PHP 5.3.8. (from the Abyss)
MySql ver. 5.0.19

In php.ini:
"max_execution_time = 30", gives about 15 downloaded files
"max_execution_time = 300" gives about 149 downloaded files
"max_execution_time = 3000" provides approximately 149 downloaded files
"max_execution_time = 30000", gives about 149 downloaded files

This is my php script:
Code:

<?PHP
/*
Flemming, d. 3. September 2010
*/

$opg = "B"; // R=Result og B=Balance

IF ($opg == "R")
{
   $link_L = "http://moneycentral.msn.com/investor/invsub/results/statemnt.aspx?Symbol=";
   $link_R = "&lstStatement=Income&stmtView=Qtr";
}
IF ($opg == "B")
{
   $link_L = "http://moneycentral.msn.com/investor/invsub/results/statemnt.aspx?Symbol=";
   $link_R = "&lstStatement=Balance&stmtView=Qtr";
}

@mysql_connect("localhost", "root", "") or die(mysql_error());
//@mysql_select_db("_invest") or die(mysql_error());
@mysql_select_db("finviz") or die(mysql_error());

$query = @mysql_query("SELECT * FROM ms_symbol");
$rows  = @mysql_num_rows($query);

while($row = @mysql_fetch_assoc($query))
{
   $symb = $row['symbol'];
   echo $symb, "<br/>";
   $link = $link_L.$symb.$link_R;
   $h =  implode("",file($link));

   $filen = 'data/' . $opg . '_' . $symb;
   $fil = fopen($filen, "w"); //Åben filen
   fwrite($fil, $h);
   fclose($fil); //Luk filen
}

echo "Antal record = ", $rows;
?>
Back to top View user's profile Send private message Send e-mail
jxxaxxy
-


Joined: 11 Nov 2010
Posts: 27

PostPosted: Mon Dec 12, 2011 11:48 pm    Post subject: Reply with quote

Well for one your mysql database files are really outdated. You are running 5.0.19 and current version for 5.0 version is 5.0.92. It could help out your problem.

But Abyss does seem to have its own time out timer.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group