Installing POD driver for Symfony on Ubuntu Server - php

I am new to Symfony and would like to try it, but I can't seem to find out what the deal is with this "POD Driver" is and how to install it. I am running Ubuntu Server 12.04.

I think you mean PDO driver? This a generic layer for database connections and should be already installed with the specific database driver.
for mysql it's installed with the php5-mysql package.

Related

configure pdo_dblib - freetds already installed

I am running a Linux server that already has freetds installed, but is not configured to support dblib. Only sqlite and mysql are currently supported for PDO. MSSQL support is also enabled.
If I want to add support for dblib and enable the PDO Driver for FreeTDS/Sybase DB-lib, do I just need to run this command on the existing install:
./configure --with-pdo-dblib
If so, from which directory would I run the command?
Environment:
PHP Version 5.5.38
CENTOS 6.9
Thank you
If you have configured FreeTDS correctly, you should be able to connect like so:
$pdo = new PDO("dblib:host=mssql;dbname=$dbname", "$dbuser","$dbpwd");
If you can't, this answer gives more explicit instructions: Connect PHP to MSSQL via PDO ODBC
pdo_dblib is typically installed in most Linux distros when you install php-mssql (on CentOS and Ubuntu, for example). If the connect command isn't working, please rewrite your question to include the specific steps you have taken and the error output. Good luck!
Since writing this question, the support team at the company that is hosting this server installed the driver. I don't know exactly what steps they took to do it so I can not post a step by step answer as I would like. Closing this question.

Install Legacy Version of PHP Driver for MongoDB on Amazon Linux

I am attempting to install Learning Locker on an Amazon Linux site on AWS. I have been following the step-by-step directions on this site, which has been helpful till now. Unfortunately now I am stuck.
Learning Locker requires the older version of the Mongo driver (mongo.so) for PHP. I think this is the latest version. However if I try to install the driver using pecl it will either install the new version of the driver (mongodb.so) or if I specific "pecl install mongo" I get an error that this version is depreciated.
At this point I need to:
Uninstall the mongodb.so driver that is installed currently.
Install the legacy mongo.so driver.
I have searched the Internet but I have not found what I need to know how to uninstall the existing driver and install the legacy driver.
Suggestions? Any insight will be appreciated. Thanks!!!
With more research I was able to learn how to install an older driver with pecl.
pecl search mongo
Retrieving data...0%
.Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
mongo 1.6.14 (stable) 1.6.14 MongoDB database driver
mongodb 1.2.8 (stable) 1.2.7 MongoDB driver for PHP
sudo pecl install mongo-1.6.14
This worked and I was able to run Composer to install Learning Locker.
I still need to uninstall mongodb.so but that is a work in progress.

Install PDO_OCI on Zend Server VirtualBox Appliance

I have installed the VM using the instructions here and have successfully setup and Oracle DB and a Joomla! test site.
I have connected to the oracle db with PHP using oci_connect. Now I'm trying to do the same using the Joomla! site but have run into a problem where PDO cannot find driver.
I believe I need to install the pdo_oci driver but have no idea how to do it or even where to get it from. I'm also surprised it is not preinstalled in the VM.
Can anyone point me in the direction of a 'How to' for installing the driver please?
Thanks!

Can't find MySQL driver anymore (Linux)

Today some of my packages in Ubuntu was upgraded automatically, and I didn't think of what was actually going on.
Ever since the update, my local dev-environment doesn't work anymore. First of by not working was mod_rewrite which I had to enable again using a2enmod. But now I've run into an issue that I can't seem to resolve. My application can't seem to find the PDO MySQL driver. When running the application, I get the error failed to open the DB connection: could not find driver.
This is strange, since if I check the phpinfo() the PDO drivers do support MySQL, and the socket path is a valid path.
pdo_mysql client API version is 5.5.35 according to php info.
PHP5: 5.5.3
MySQL: 5.5.35
Connectionstring
mysql:host=127.0.0.1;dbname=MyDB;port=3306
What could be causing this?
The PHP MySQL driver (mysql.so/mysqli.so) and the PHP PDO MySQL driver (pdo_mysql.so) are two separate modules. You need both of them for PDO functionality with MySQL.
It is quite possible that one of them is missing or of an incompatible version - I do not have an Ubuntu system at hand, but on my RPM-based Linux distribution there is a separate package for each module (php-mysql/php-mysqli and php-pdo_mysql). I also expect PDO to be using the newer mysqli.so driver, rather than the obsolete mysql.so one, so you should verify that one is installed as well.
Try this:
sudo apt-get install -y php5-mysql php5 mysql-client
This should automatically restart your apache if any of the dependencies aren't installed.
Try using vagrant.
Dependencies can be isolated, upgraded and downgraded when you like.
Vagrant

Does the mongodb php driver require php5-dev?

I'm trying to install mongodb in a PHP environment. MongoDB itself is installed fine, I've run pecl install mongo, and added extension=mongo.so to php.ini; but my Laravel application complains that it can't find the class MongoClient. Checking phpinfo() reveals no mention of Mongo, suggesting that it isn't aware of the driver.
I noticed that all the instructions for installing mongo on Ubuntu mention apt-get install php5-dev. Is that a requirement for the mongodb php driver? At the moment the server is built with Chef and installs php with apache2::mod_php5. If php5-dev is required, can it be installed as an apache module?
Yeah you should as stated by docs here http://docs.mongodb.org/ecosystem/drivers/php/
Also if its unable to find mongo drivers ,Try debugging , check logs if it says something like mongo.so file is missing.
Don't forget to restart php and apache after saving php.ini

Categories