When I start the zend framework project from the browser, everything is fine, it connects to the database.
When I run the project from the command line, it cannot connect to the database and it gives an error:
Fatal error: throw a "PDOException" exception with the message 'SQLSTATE [HY000] [2002] There is no such file or directory' in /usr/local/zend/share/ZendFramework/library/Zend/Db/Adapter/Pdo/Abstract.php: 129
I used the Zend Framework Action Execution from the command line ( stack overflow
This is my application.ini db part file
phpSettings.mysql.default_socket=/usr/local/zend/mysql/tmp/mysql.sock resources.db.adapter = "PDO_MYSQL" resources.db.params.host = "localhost" resources.db.params.port = 3306 resources.db.params.username = "root" resources.db.params.password = "root" resources.db.params.dbname = "iteam" resources.db.isDefaultTableAdapter = true resources.db.params.charset = "utf8"
command-line php zend-framework zend-db
hhs Dec 07 '11 at 11:25 2011-12-07 11:25
source share