After the upgrade of Snow Leopard, on the command line I started to receive the message:
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function.
This morning I needed to work through generating a couple of tasks for our application. Trying to fire up a task generated the following error:
Unable to open PDO connection [wrapped: SQLSTATE[HY000] [2002] No such file or directory]
My solution was I needed to downgrade my local install to PHP 5.2. I'm all for running the latest and greatest PHP, but now is not the time. I work on a Macbook with MAMP installed. Understanding I am approaching this from an Ubuntu perspective and there might be a better way to accomplish the following. Remember attempt at your own risk....
- The php executable is location at /usr/bin
- I copied the php executable to make sure I could jump back to PHP 5.3, I ran "sudo mv php php5.3", renaming php to php5.3 in the directory.
- Then I want to create a symlink to the MAMP php version "sudo ln -s /Applications/MAMP/bin/php5/bin/php php", creating a symlink php which points to the MAMP installed version.
Now running Symfony command line commands I'm using the php executable that ships with MAMP. I hope this helps.
Yes! it worked for me! "thank you"
ReplyDeleteHey there,
ReplyDeleteI use XAMPP (comes with PHP 5.3). I got the same strange SQLSTATE error and fixed it by replacing php in /usr/bin with a symlink to XAMPP's PHP binary.
Thx for your help!
This comment has been removed by the author.
ReplyDeleteThank you! This solved my problem in no time!
ReplyDeleteI still get the same error trying to run symfony doctrine:data-load
ReplyDelete... ;/ any sugestions most welcome...
mv: rename php to php5.3: No such file or directory ;///
ReplyDeleteIt worked for me! Thanks!
ReplyDelete