Server Fault Asked by Shahar Galukman on December 1, 2021
I have vagrant box (precise64) utilizing Ubuntu server 12.04.
I have installed manually (no use of LAMP) on the server the following:
Server version: 5.5.31-0ubuntu0.12.04.1 (Ubuntu)
PHP 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli) (built: Mar 11 2013 14:31:48)
Server version: Apache/2.2.22 (Ubuntu)
(was already existing on the box)On the host (my desktop) I’ve set vagrant file and shared folders, installed CakePHP and I’m able to see the main page. (after setting VirtualHost on the server of course).
I’ve connected to the database with no problem.
When I try to use a CLI tool of CakePHP I get the following error:
Error: Database connection "Mysql" is missing, or could not be created
I’ve also created a post regarding this matter on StackOverflow but decided to see if it’s might be a server miss-configuration issue.
I’ve made sure PDO is enabled by the following results:
vagrant@precise64:/etc/php5/conf.d$ php -i | grep PDO
PDO
PDO support => enabled
PDO drivers => mysql
PDO Driver for MySQL => enabled
Since the answer was given to me on SO was to make sure PDO is enabled for the cli.
I’ve tested using vanilla PHP and was able to connect to my database using PDO.
Yet I’m still unable to figure what causing this problem.
Any help would be greatly appreciated.
PDO was enabled on the guest (server) side while I tried to use the CLI on the HOST (Desktop) side. Using the CLI from the guest work with no problem (I guess setting PDO enabled on HOST might do the trick also, not sure of that though)
Answered by Shahar Galukman on December 1, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP