Re: [PHP] php cli and mysql

2006-11-15 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-11-14 18:56:01 -0500: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: On 11/14/06, James Tu [EMAIL PROTECTED] wrote: I'm running a php script from the command line (I'm on OS X) and I'm getting ... Warning: mysql_connect(): Can't

Re: [PHP] php cli and mysql

2006-11-15 Thread Frank Arensmeier
FYI - the problem with mysql.sock has been an support issue at apple.com before. http://docs.info.apple.com/article.html?artnum=301457 /frank 15 nov 2006 kl. 11.03 skrev Roman Neuhauser: # [EMAIL PROTECTED] / 2006-11-14 18:56:01 -0500: Roman Neuhauser wrote: # [EMAIL PROTECTED] /

[PHP] php cli and mysql

2006-11-14 Thread James Tu
and the connection and query worked. Do I have to do something special in order for PHP CLI to connect to MySQL? -James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php cli and mysql

2006-11-14 Thread cajbecu
geo_entities); $row = mysql_fetch_array($result); print_r($row); ? I tested the script from a browser and the connection and query worked. Do I have to do something special in order for PHP CLI to connect to MySQL? -James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] php cli and mysql

2006-11-14 Thread James Tu
); mysql_select_db(DB, $connection); $result = mysql_query(SELECT COUNT(*) as num_of_countries from geo_entities); $row = mysql_fetch_array($result); print_r($row); ? I tested the script from a browser and the connection and query worked. Do I have to do something special in order for PHP CLI

Re: [PHP] php cli and mysql

2006-11-14 Thread [EMAIL PROTECTED]
(*) as num_of_countries from geo_entities); $row = mysql_fetch_array($result); print_r($row); ? I tested the script from a browser and the connection and query worked. Do I have to do something special in order for PHP CLI to connect to MySQL? -James -- PHP General Mailing List (http

Re: [PHP] php cli and mysql

2006-11-14 Thread James Tu
something special in order for PHP CLI to connect to MySQL? -James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --PHP General Mailing

Re: [PHP] php cli and mysql

2006-11-14 Thread Jochem Maas
James Tu wrote: Please see below .. you fell foul of the 'there is no php.ini' trap :-) (please repeat in a homer simpson voice) or should I create a symbolic link to the php.ini that Apache is using? use a seperate php.ini - more flexibility That'll tell you where the php.ini file

Re: [PHP] php cli and mysql

2006-11-14 Thread [EMAIL PROTECTED]
= mysql_query(SELECT COUNT(*) as num_of_countries from geo_entities); $row = mysql_fetch_array($result); print_r($row); ? I tested the script from a browser and the connection and query worked. Do I have to do something special in order for PHP CLI to connect to MySQL? -James --PHP

Re: [PHP] php cli and mysql

2006-11-14 Thread James Tu
CLI to connect to MySQL? -James --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --PHP General Mailing List (http://www.php.net

Re: [PHP] php cli and mysql

2006-11-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: On 11/14/06, James Tu [EMAIL PROTECTED] wrote: I'm running a php script from the command line (I'm on OS X) and I'm getting ... Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) touch

Re: [PHP] php cli and mysql

2006-11-14 Thread Tom Ray [Lists]
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: On 11/14/06, James Tu [EMAIL PROTECTED] wrote: I'm running a php script from the command line (I'm on OS X) and I'm getting ... Warning: mysql_connect(): Can't connect to local MySQL server through socket

Re: [PHP] php cli and mysql

2006-11-14 Thread Chris
Tom Ray [Lists] wrote: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: On 11/14/06, James Tu [EMAIL PROTECTED] wrote: I'm running a php script from the command line (I'm on OS X) and I'm getting ... Warning: mysql_connect(): Can't connect to local MySQL server

Re: [PHP] php cli and mysql

2006-11-14 Thread Tom Ray [Lists]
Chris wrote: Tom Ray [Lists] wrote: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: On 11/14/06, James Tu [EMAIL PROTECTED] wrote: I'm running a php script from the command line (I'm on OS X) and I'm getting ... Warning: mysql_connect(): Can't connect to

Re: [PHP] php cli and mysql

2006-11-14 Thread Chris
Tom Ray [Lists] wrote: Chris wrote: Tom Ray [Lists] wrote: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: On 11/14/06, James Tu [EMAIL PROTECTED] wrote: I'm running a php script from the command line (I'm on OS X) and I'm getting ... Warning: