Page 1 of 1

almost work, theres no effect of my script on my site

Posted: Tue Aug 19, 2008 5:25 pm
by manuel
The last fired date and the next execution date is ok, i didnt have problems with the installation but things that are suposed to happen with my script does not happening (sorry for my english im from india) my script look some like this:

<?php

mysql_connect("localhost","user","password") or die("error conection");

mysql_select_db("database")or die("no database");

$importar = ' LOAD DATA LOCAL INFILE "somefile.csv" REPLACE INTO TABLE estadisticas FIELDS TERMINATED BY "," LINES TERMINATED BY "\n"';
mysql_query($importar) or die(mysql_error());

echo "done";

?>

i dont know if some can help me, i'll be really glad

i forgot

Posted: Tue Aug 19, 2008 5:29 pm
by manuel
the script run ok if i run it manually

Posted: Wed Aug 20, 2008 4:32 pm
by davidgwalker
Hi,

Try adding this to your page:

Code: Select all

mail("you@yourdomain-com",
     "testing phpJobScheduler",
     "just ran",
     "From: you@yourdomain-com\nReply-To: you@yourdomain-com");

It will email you when it runs (change: you@yourdomain-com to your own email address).

You should also check that MySQL is not terminating the script due to an error, try capturing any MySQL errors and email them to yourself too! For how to do it see:
http://uk2.php.net/mysql_error

Hope that helps

Dave.