Re: I'm prepared to feel like an idiot... But I just simply need the answer :)

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

 




On Aug 1, 2007, at 9:37 AM, Thijs Lensselink wrote:

On Wed, 1 Aug 2007 08:49:34 -0400, Jason Pruim <japruim@xxxxxxxxxx> wrote:
Hi All :)

I have a php script that I am attempting to run from the CLI to
connect to a MySQL database and update a field. but when I run it
with this command: php cronjob.php it prints out the script on screen
but doesn't process it...

Running: php-r"phpinfo();" prints out the standard phpinfo screen..
and I don't think I should have to write it differently to make it
run from the command line right?

HELP! I'm desperate... I would offer to name my first born after
you... But he's already been born :)


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxx





Maybe you can show use some code?

@mysql_connect('localhost', 'user', 'password') or die("Cannot connect to DB!" . mysql_error()); @mysql_select_db('ticklers') or die("Cannot select DB!" . mysql_error ());


$sql="UPDATE tasks SET completed='0'";
mysql_query($sql);

also when looking at the code, I noticed that I didn't have the opening and closing php tags ... Now I do and I'm getting an error :)

cannot connect to DB!Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)qs:/volumes/raider/webserver/ documents/tests/ticklers japruim$


This is only from the commandline... running the script straight in a browser doesn't show any errors... and it works just fine.


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxx

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux