DB update problem...

From: Date: Sat, 13 Sep 2003 15:26:00 +0000
Subject: DB update problem...
Groups: php.db 
Request: Send a blank email to php-db+get-30491@lists.php.net to get a copy of this message
HI gang! I am trying to do a mysql update. I wrote a small bash file that works fine at the command line. But I would like to have it ran by PHP whenever I start the DB. What I am trying to do is have PHP check if a new update file is there (AUD.txt) if it is run the "euro-update.program". But I'm getting either nothing or errors. see below.... ####################### Here is the piece of code that is making this error: <?php $db = mysql_connect("XXX", "YYYYYY", "ZZZZZ"); mysql_select_db("WartHog",$db); if (file_exists("/var/lib/mysql/WartHog/AUD.txt")){ exec(/var/lib/mysql/WartHog/euro-update.program) or die ('didnt work #1') ; } else { echo('File not there'); } ?> ############################# Running the code as is I get this error: Warning: exec() [function.exec]: Cannot execute a blank command in /home/hatridge/public_html/Database/currency.php on line 22 ##################### When I use " " or ' ' around the program name I get only "didn't work #1". Any ideas? Thanks! JIM -- Jim Hatridge Linux User #88484 ------------------------------------------------------ BayerWulf Linux System # 129656 The Recycled Beowulf Project Looking for throw-away or obsolete computers and parts to recycle into a Linux super computer Viel Feind -- Viel Ehr' Anti-US Propaganda stamp collecton http://www.fuzzybunnymilitia.org/~hatridge/collection

« previous php.db (#30491) next »