Search code examples
phpmysqlzend-frameworkpdozend-db

Can't seem to connect to a database with Zend Framework using the ip address of the database


I am using Zend Framework and am trying to connect to a database by it's IP address.. I keep getting the following error

Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'syntax error, unexpected '=' in C:\xampp\htdocs\App\application/configs/application.ini on line 27 ' in C:\xampp\php\zf\library\Zend\Config\Ini.php:182 (I removed the full stack trace)

I traced the error to the application.ini

resources.db.adapter = PDO_MYSQL
resources.db.params.host = 192.168.1.34
resources.db.params.username = xxxx
resources.db.params.password = xxxx
resources.db.params.dbname = xxxx

(Username,password and database where changed to protect the innocent)

It is a Development DB I am trying to connect to that is on my network but is not on the localhost.

How can I connect to this database?


Solution

  • Have you tried quoting the IP?