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 » Jobeet erroring out on Day 3 "doctrine:insert-sql"
Jobeet erroring out on Day 3 "doctrine:insert-sql" [message #101701] Mon, 28 June 2010 10:36 Go to next message
cwheat503  is currently offline cwheat503
Messages: 16
Registered: June 2010
Junior Member
Hello,

First let me say this is my first attempt at an MVC framework so is most likely a noob issue, but please help.

I am running MAMP on Snow leapord, PHP 5.2.13. Anyway I have followed the tutorial so far to day 3 (http://www.symfony-project.org/jobeet/1_4/Doctrine/en/03) and all the way to "$ php symfony help doctrine:insert-sql" when I run this command I get:

My-names-MacBook-Pro:jobeet chris$ php symfony doctrine:insert-sql
>> doctrine  creating tables

Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock) in /Applications/MAMP/htdocs/www/jobeet/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 470

                                                                          
  PDO Connection Error: SQLSTATE[HY000] [2002] No such file or directory  


my databases.yml file looks like this:
all:
  doctrine:
    class: sfDoctrineDatabase
    param:
      dsn: 'mysql:host=localhost;dbname=jobeet'
      username: testjobeet
      password: tester


I have tried the connection information with a basic php file like so, and it connects no problem, so the issue is not with the username/password.
<?PHP
$dbhost = "localhost";
$dbusername = "testjobeet";
$dbpasswd = "tester";
$database_name = 'jobeet';
$connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")or die ("Could not connect to mysql");
$db = mysql_select_db("$database_name", $connection)or die("Could not connect to the database table.");
print "$connection <hr />$db";
?>

Any ideas?

Re: Jobeet erroring out on Day 3 "doctrine:insert-sql" [message #101703 is a reply to message #101701 ] Mon, 28 June 2010 11:07 Go to previous message
cwheat503  is currently offline cwheat503
Messages: 16
Registered: June 2010
Junior Member
ok this is SOLVED.

Found this http://www.metaltoad.com/blog/getting-command-line-access-ph p-and-mysql-running-mamp-osx to be quite helpful especially this command:

sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
Previous Topic:Problems concerning model main
Next Topic:Issues with: Uncaught exception 'InvalidArgumentException' with message 'The plugin "sfGuardPlu
Goto Forum:
  

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