Install PDO_OCI on Zend Server VirtualBox Appliance - php

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!

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.

Connection Failed CakePHP 3 and MSSQL on Linux

I'm trying to connect a new project CakePHP v3 installed in a common LAMP on Ubuntu Server and the DataBase is a MSSQL 2008. I've tried to install the library php5-mssql but nothing changes. Any idea?
The error message received is:
CakePHP is NOT able to connect to the DataBase.
DataBase driver Cake\Database\Driver\Sqlserver cannot be used due to a missing PHP extension or unmet dependency
Thanks!
CakePHP does not have an ODBC driver at this time. You can connect to MSSQL servers using the SQLServer driver from a Windows server, but this issue (https://github.com/cakephp/cakephp/issues/6990 ) just keeps getting bumped.
Since Cake3 uses PDO drivers to connect SQL Server (from Linux), you should try to install Microsoft ODBC Driver for Linux, see
http://onefinepub.com/2013/03/ms-sql-odbc-ubuntu/
it may helps

MongoDB on Amazon EC2 - Configuring Mongo Client for Php

I am pretty new to Amazon EC2.
I followed the instructions given in mongodb official site for installing mongodb on Amazon Linux. I have a Yii-2(basic) project to host on my amazon Linux server. mongoDB is already installed in the and even I Imported some dumps over there. But when i run the project
Class 'MongoClient' not found
How can I configure mongodb on amazone linux?
(now when i do sudo service mongod restart it is showing FAILED)
I installed mongodb using yum.
PHP version 5.6
Amazon Linux
these are my configuration. I am sure I am using latest versions since it is a fresh installation. Please help me out. Thanks in advance!
From the error message it seems that you haven't installed the PHP Mongo Driver in your server.
To check if you have it, try a php_info() and check if the entry "mongo" is present
If it's not present install it using the instructions found in the link above, or check here

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

Installing POD driver for Symfony on Ubuntu Server

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.

Categories