Xampp php_pdo_odbc not working - php

Xampp linux version: 7.1
OS: Ubuntu 14.04
I already uncommented extensions=php_pdo_odbc.dll in opt/lampp/etc/php.ini
but odbc is not showing
image here

you are using linux, so forget about .dll windows extension :
first you will need to check if you have the extension or not :
print_r(PDO::getAvailableDrivers());
this will print an array with the currently installed PDO Drivers,
if you didn't get the odbc driver , try to enable it :
sudo phpenmod pdo_odbc
then check again, if not installed you will need to install it :
apt-get install php7.0-odbc

Related

How to enable sqlsrv - PDO drivers in xampp ubuntu?

Error : PDOException could not find driver
Actually I am facing error this while working with laravel and mssql .
For that purpose I want enable sqlsrv in PDO drivers .
PDO Driver
In this image PDO drivers contain mysql, pgsql, sqlite but not sqlsrv .
So How I can fix it ?
I guess your PHP environment doesn't have PDO extension installed.
To install pdo extension, open terminal and type the below command.
First check which version of PHP is installed, to check the PHP version, type below command :
$ php -v
Suppose you have php7.1 installed, then to install pdo for your version type below
$ sudo apt-get install php7.1-pdo
Restart you apache server :
$ sudo service apache2 restart
See below snap:
After entering the command, press tab to see all the possible commands as shown in the snapshot.

PHP - PDO Mysql not found! php_mysql.so exists, but phpinfo only shows sqlite

I installed different php versions on my Debian server for some reasons (Php 5.3.10, 5.4.41, 5.5.25, 5.6.9 and 7.0.17). I installed them from source.
I'm trying to get the mysql php pdo to work with php 5.3.10.
The active version on Debian is 5.4.41. and php5-mysql is installed by
sudo apt-get install php5-mysql
When I check php info in the console or by phpinfo(); for php 5.4.41 the result is:
~$ php --info | grep pdo
Additional .ini files parsed => /etc/php5/cli/conf.d/10-pdo.ini,
/etc/php5/cli/conf.d/20-pdo_mysql.ini
pdo_mysql
pdo_mysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock
But result of phpinfo() in another vHost that works with php 5.3.10 is:
and
and
Even I uncomment *.so files in php.ini
extension=mysql.so
extension=pdo.so
But no pdo_mysql.so being loaded!
Extra info:
OS: Debian 7.8
Server version: Apache/2.2.22 (Debian)
Any ideas?
Thanks!

installing Mcrypt php extension fails on Ubuntu and Xampp

I installed Xampp on Ubuntu 16 to work with Laravel.
I ran my Laravel code and got this error : Mcrypt PHP extension required.
After that I tried to install Mcrypt on PHP.
I have done these :
sudo apt-get install mcrypt
sudo phpenmod mcrypt
I have also done this : Link
I also restart the all services from Xampp after every change but I still get error on Laravel.
Any idea ?
My PHP version is 7.0.22 and Ubuntu version is 16.04.1 .
Thank you .
Edit 1
I did this and I still see the error.
After trying to many things. I just got rid of this shit by installing both version on my computer.
First I installed php 7.1.19 version.
Secondly I installed php 7.2.15 version
Now I am working perfectly with my project.

How to enable odbc in XAMPP linux [duplicate]

Xampp linux version: 7.1
OS: Ubuntu 14.04
I already uncommented extensions=php_pdo_odbc.dll in opt/lampp/etc/php.ini
but odbc is not showing
image here
you are using linux, so forget about .dll windows extension :
first you will need to check if you have the extension or not :
print_r(PDO::getAvailableDrivers());
this will print an array with the currently installed PDO Drivers,
if you didn't get the odbc driver , try to enable it :
sudo phpenmod pdo_odbc
then check again, if not installed you will need to install it :
apt-get install php7.0-odbc

MAC homebrew php pdo firebird driver

I installed php53 on mac osx with homebrew. I need to enable pdo driver for firebird.
I tried to instal via pecl ..
I donwload http://pecl.php.net/package/PDO_FIREBIRD
and compile this but I get this error
...
...
configure: error: libgds or libib_util not found! Check config.log for more information.
I found that means that I don't have installed firebird develepoment libraries...
I have installed firebird 2.0 on my mac.. this version is working Flamerobin.
Does anyone have pdo firebird driver on mac server installed via homebrew?
Pdo Firebird from pecl is deprecated , i will updated it soon that i get access to it
you need to download the source code for php extract it and then build only the pdo_firebird extension
cd ext/pdo_firebird
phpize
./configure
(you might need to pass the firebird framework dir --with-pdo-firebird=/Library/Frameworks/Firebird.framework )
make
sudo make install
after that you need to copy the extension in your brew build php extensions folder and add it to php.ini
extension=pdo_firebird.so
I also recommend firebird 2.5.x is more recent and well supported on recent macosx versions
I've solve this issue by :
sudo ln -s /Library/Frameworks/Firebird.framework/Versions/A/Firebird /usr/local/lib/libfbclient.dylib
macOS High Siera 10.13.3

Categories