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

2007-08-07 Thread Richard Lynch
On Wed, August 1, 2007 7:49 am, Jason Pruim wrote: 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:

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

2007-08-01 Thread Brad Bonkoski
I would start with suppling the entire path of for php in the cron. The path in the cron environment may be vastly different then the path in your shell environment... so: /path/to/php file.php See how that works for you, of course I am assuming it runs fine from your command line... -B

RE: [PHP] I'm prepared to feel like an idiot... But I just simply need the answer :)

2007-08-01 Thread Bastien Koert
I have had success in running CLI php pages from a bat file fired via a scheduled task. Since the output can be limited I would suggest adding some logging functionality to the page to trap errors and write them to a file that you can use to analyze any issues. bastien To:

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

2007-08-01 Thread Daniel Brown
On 8/1/07, Jason Pruim [EMAIL PROTECTED] wrote: 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

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

2007-08-01 Thread Michael Preslar
@mysql_connect('localhost', 'user', 'password') or die(Cannot connect to DB! . mysql_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$ MySQL is running right? (I

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

2007-08-01 Thread Thijs Lensselink
On Wed, 1 Aug 2007 08:49:34 -0400, Jason Pruim [EMAIL PROTECTED] 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

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

2007-08-01 Thread Jason Pruim
On Aug 1, 2007, at 8:55 AM, Brad Bonkoski wrote: I would start with suppling the entire path of for php in the cron. The path in the cron environment may be vastly different then the path in your shell environment... so: /path/to/php file.php See how that works for you, of course I am

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

2007-08-01 Thread Jason Pruim
On Aug 1, 2007, at 9:37 AM, Thijs Lensselink wrote: On Wed, 1 Aug 2007 08:49:34 -0400, Jason Pruim [EMAIL PROTECTED] 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

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

2007-08-01 Thread Daniel Brown
On 8/1/07, Thijs Lensselink [EMAIL PROTECTED] wrote: On Wed, 1 Aug 2007 08:49:34 -0400, Jason Pruim [EMAIL PROTECTED] 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

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

2007-08-01 Thread Stut
Jason Pruim wrote: 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-rphpinfo(); prints out the

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

2007-08-01 Thread Jason Pruim
On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote: @mysql_connect('localhost', 'user', 'password') or die(Cannot connect to DB! . mysql_error()); .. cannot connect to DB!Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)qs:/volumes/raider/webserver/

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

2007-08-01 Thread Jason Pruim
On Aug 1, 2007, at 9:53 AM, Daniel Brown wrote: On 8/1/07, Jason Pruim [EMAIL PROTECTED] wrote: 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

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

2007-08-01 Thread Jason Pruim
On Aug 1, 2007, at 9:55 AM, Stut wrote: Jason Pruim wrote: 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...

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

2007-08-01 Thread Brad Bonkoski
Brad Bonkoski wrote: Jason Pruim wrote: On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote: @mysql_connect('localhost', 'user', 'password') or die(Cannot connect to DB! . mysql_error()); .. cannot connect to DB!Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'

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

2007-08-01 Thread Brad Bonkoski
Jason Pruim wrote: On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote: @mysql_connect('localhost', 'user', 'password') or die(Cannot connect to DB! . mysql_error()); .. cannot connect to DB!Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'

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

2007-08-01 Thread Daniel Brown
On 8/1/07, Jason Pruim [EMAIL PROTECTED] wrote: On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote: @mysql_connect('localhost', 'user', 'password') or die(Cannot connect to DB! . mysql_error()); .. cannot connect to DB!Can't connect to local MySQL server through socket

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

2007-08-01 Thread Jason Pruim
Okay, Now I got it figured out, it was a problem with php cli not being able to find the mysql.sock file. I didn't realize that there are 2 php.ini files, one for the web and the other for the CLI... I'll look into what needs to be changed in the php.ini file... For right now I took Dan's

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

2007-08-01 Thread Sancar Saran
On Wednesday 01 August 2007 17:46:44 Brad Bonkoski wrote: Hi, Please Check php.ini of cli. They are different. Maybe there where problem in php.ini Regards Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php