DB update problem...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux