PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, March 17, 2022

[FIXED] DB connection issue when trying to connect with Zend Framework Abstract.php No Such File Or Directory

 March 17, 2022     mamp, mysql, php, sockets, zend-framework     No comments   

Issue

I am trying to setup a ZF1 application on my local machine using MAMP. I am attempting to run the Ruckusing Database migrations, however it appears that ZF1 cannot connect to my DB.

This is the command I am running and the error I get.

crmpicco-MacBook:confirmation crmpicco$ php vendor/ruckusing/ruckusing-migrations/ruckus.php db:migrate ENV=development
Array
(
    [directory] => webapp
    [type] => mysql
    [host] => localhost
    [port] => 3306
    [database] => crmpicco_confirmation
    [user] => root
    [password] => root
    [socket] => /Applications/MAMP/tmp/mysql/mysql.sock
    [charset] => utf8
)

Abstract.php(144) : SQLSTATE[HY000] [2002] No such file or directory

Where should I look to resolve this issue?


Solution

I found the solution to this.

I was using the standard PHP that comes with OSX by default.

I needed to change the command to use the PHP binary that comes installed with MAMP, e.g.

/Applications/MAMP/bin/php/php5.6.2/bin/php vendor/ruckusing/ruckusing-migrations/ruckus.php db:migrate ENV=development

Hope this helps someone.

Thanks to @tunder ;)



Answered By - crmpicco
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing