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] / 2006-11-

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 ... > >>> > >>>War

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: mysql_connect

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 lo

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 serve

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 '/var

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' (

Re: [PHP] php cli and mysql

2006-11-14 Thread James Tu
Thanks everyone! On Nov 14, 2006, at 3:20 PM, [EMAIL PROTECTED] wrote: You could make a new php.ini for flexibility like Jochem stated. To make things easy, just copy the file over: cp /usr/local/php5/lib/php.ini /etc/php.ini And that should do it. James Tu wrote: Please see below On No

Re: [PHP] php cli and mysql

2006-11-14 Thread [EMAIL PROTECTED]
You could make a new php.ini for flexibility like Jochem stated. To make things easy, just copy the file over: cp /usr/local/php5/lib/php.ini /etc/php.ini And that should do it. James Tu wrote: > Please see below > > On Nov 14, 2006, at 2:24 PM, [EMAIL PROTECTED] wrote: > >> Run this command:

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.i

Re: [PHP] php cli and mysql

2006-11-14 Thread James Tu
Please see below On Nov 14, 2006, at 2:24 PM, [EMAIL PROTECTED] wrote: Run this command: /path/to/cli/php -i|grep MYSQL_SOCKET MYSQL_SOCKET => /var/mysql/mysql.sock What does that show? It sounds like the PHP module for Apache is using a different php.ini file then the CLI version.

Re: [PHP] php cli and mysql

2006-11-14 Thread [EMAIL PROTECTED]
Run this command: /path/to/cli/php -i|grep MYSQL_SOCKET What does that show? It sounds like the PHP module for Apache is using a different php.ini file then the CLI version. It also looks like the CLI versions php.ini is not pointing to the proper path to the mysql.sock. Look under the mysql se

Re: [PHP] php cli and mysql

2006-11-14 Thread James Tu
ok. so the location of mysql.sock is a problem. I found it at /tmp/mysql.sock Why is the CLI looking for it at /var/myslq/mysql.sock? Now the question is... Do I change the mysql settings so that mysql.sock is at /tmp/ mysql.sock? (If I do, will the PHP module with Apache still be ok?) or Do

Re: [PHP] php cli and mysql

2006-11-14 Thread cajbecu
touch /var/mysql/mysql.sock chmod 777 /var/mysql/mysql.sock 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)