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:
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
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:
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
@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
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
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
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
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
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
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/
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
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...
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'
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'
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
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
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
18 matches
Mail list logo