This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » Installation and setup » Unable to open PDO connection on Snow Leopard
Unable to open PDO connection on Snow Leopard [message #85559] Sun, 20 September 2009 18:36 Go to next message
gianluca78  is currently offline gianluca78
Messages: 121
Registered: January 2009
Location: Palermo, Italy
Senior Member
Hello! This morning, I updated my OS to Snow Leopard.

After some problem with mysql and PHP, the server works correctly.

But... symfony doesn't work anymore.

This is the error message:

Quote:


Unable to open PDO connection [wrapped: SQLSTATE[HY000] [2002] No such file or directory]



I'm working with symfony 1.2.8 and PHP 5.3.0 (but I have installed the 5.2.11 package!). This is the result of a php -m:

Quote:


[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
hash
iconv
json
ldap
libxml
mbstring
mcrypt
mysql
mysqli
mysqlnd
odbc
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
SQLite
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
zlib



Obviously, before the update symfony worked fine. So, I don't think is a database.yml configuration problem. In any case, here you are the database.yml:

Quote:


dev:
propel:
param:
classname: DebugPDO

test:
propel:
param:
classname: DebugPDO

all:
propel:
class: sfPropelDatabase
param:
classname: PropelPDO
dsn: mysql:dbname=myname;host=localhost
username: root
password: mypsw
encoding: utf8
persistent: true
pooling: true




Hope someone can help me.
Gianluca
Re: Unable to open PDO connection on Snow Leopard [message #85561 is a reply to message #85559 ] Sun, 20 September 2009 18:51 Go to previous messageGo to next message
gianluca78  is currently offline gianluca78
Messages: 121
Registered: January 2009
Location: Palermo, Italy
Senior Member
Resolved!

The problem was the path to the pdo_mysql.default_socket in the php.ini.

It was wrong.

Bye bye

Re: Unable to open PDO connection on Snow Leopard [message #91466 is a reply to message #85561 ] Thu, 14 January 2010 16:35 Go to previous messageGo to next message
astead  is currently offline astead
Messages: 1
Registered: January 2010
Junior Member
Can you possibly share the location you used in your ini file?
Re: Unable to open PDO connection on Snow Leopard [message #91471 is a reply to message #91466 ] Thu, 14 January 2010 17:07 Go to previous messageGo to next message
gianluca78  is currently offline gianluca78
Messages: 121
Registered: January 2009
Location: Palermo, Italy
Senior Member
Sure!

pdo_mysql.default_socket=/opt/local/var/run/mysql5/mysqld.so ck

Please pay attention that (at least in my case) the mysql server didn't start more automatically and I have to start it using the terminal.

I hope this could help
Gianluca
Re: Unable to open PDO connection on Snow Leopard [message #91586 is a reply to message #85559 ] Sat, 16 January 2010 13:33 Go to previous message
luksiem  is currently offline luksiem
Messages: 1
Registered: January 2010
Junior Member
I had the same problem and had to change pdo_mysql.default_socket line in php.ini file too.

I used 'find' command and the path to mysql socket was: /private/tmp/mysql.sock
Previous Topic:"Unable to load dynamic library './/Users/.../sf_sandbox/APC-3.1.3p1/apc.so' - (null) ...
Next Topic:Problem with the ProjectConfiguration.class.php
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software