I already have PHP 5.4 installed in a CentOS 7 VPS. I am trying now to access a legacy database in .mdb format with a PHP script.
However, my phpinfo() page says that only mysql
and sqlite
PDO drivers are enabled. No driver named ODBC is enabled.
Which is why I have tried to follow this tutorial to get that to work. But it doesn't work. bash: ./configure: No such file or directory
.
I don't know from which folder I have to run the commands listed there. Is there a command which will allow me to install the PDO ODBC drivers from the system e.g. yum -y install php_odbc
which would be easier for me to work with? If not, what am I doing wrong?
Pdo ( Portable Data Object ) needs to be installed if it is not done before. For windows platform go to control panel > Add remove program ( or Programs and features ) > Select your PHP installation and click Change. If you are installing PHP fresh then in the setup wizard you can select PDO from Extensions link.
The -i is used to display the output of phpinfo(). The |grep will filter the list to the ones containing PDO.
PHP is one of the most common open-source programming languages for web applications and websites development. ODBC is an API that allows you to connect to a data source, such as PostgreSQL, Oracle, MySQL, MongoDB or SQL Server, using standard PHP functions and Devart ODBC Drivers.
The Microsoft Drivers for PHP for SQL Server enable integration with SQL Server for PHP applications. The drivers are PHP extensions that allow the reading and writing of SQL Server data from within PHP scripts.
Looks like php_odbc
is one of CentOS 7 packages.
See http://mirror.centos.org/centos/7/os/x86_64/Packages/ it is a very long list.
So yum -y install php_odbc
should work. Just don't forget to restart your web-server if required.
You would run ./configure ...
if you were compiling PHP from source. It will not work in your case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With