Aleli Sanchez

Member
Feb 7, 2018
5
0
1
Mexico
cPanel Access Level
Root Administrator
Hi
I already installed the pecl extension pdo_sqlanywhere.so and it is in this directory: /opt/cpanel/ea-php71/root/usr/lib64/php/modules/

But php is not recognized yet, so I think that I need to add it to php.ini and restart apache, but I don´t know how to do it.

Any one can help me to find the php.ini extensions file or any other way to activate this extension.

PD: I needed to do it manually because the stability is beta and it was not possible through cpanel.

Thanks
 

Aleli Sanchez

Member
Feb 7, 2018
5
0
1
Mexico
cPanel Access Level
Root Administrator
Hi

I did all those steps, but the driver is not recognized yet. I receive this error: Attempted to call function "sasql_connect".

The same if I try with odbc connection.

Due the stability is beta I installed it manually, then I edited the PHP.ini with Multiphp Editor, but I received the same error.

I have:
Centos 6.9 with WHM/CPanel

https://pecl.php.net/get/PDO_SQLANYWHERE-0.1.4.tgz installed here: /opt/cpanel/ea-php71/root/usr/lib64/php/modules/

The subdomain have PHP 7.1

I restarted Apache and FPM, too

PDO and OBDC extensions are installed with Easy Apache 4

What I´m missing?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
Hello,


It seems like you've taken the necessary steps.

What do you see when you run

Code:
/opt/cpanel/ea-php71/root/usr/bin/php -m
Do you have a pecl.ini or zzzzzzz-pecl.ini file in /opt/cpanel/ea-php71/root/etc/ which has the module listed?

Thank you,
 

Aleli Sanchez

Member
Feb 7, 2018
5
0
1
Mexico
cPanel Access Level
Root Administrator
I see this when I run /opt/cpanel/ea-php71/root/usr/bin/php -m :

[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
enchant
exif
fileinfo
filter
ftp
gd
hash
iconv
intl
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_pgsql
PDO_SQLANYWHERE
pdo_sqlite
pgsql
Phar
posix
pspell
readline
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache


In /opt/cpanel/ea-php71/root/etc/ I only have this files:
pear
php.d
php-fpm.conf.rpmnew
php-fpm.d sysconfig
pear.conf
php-fpm.conf
php-fpm.conf.save
php.ini
 

Aleli Sanchez

Member
Feb 7, 2018
5
0
1
Mexico
cPanel Access Level
Root Administrator
Thanks

I have this files:

10-opcache.ini 20-iconv.ini 20-simplexml.ini 20-zip.ini
20-bcmath.ini 20-intl.ini 20-snmp.ini 30-mysqli.ini
20-bz2.ini 20-json.ini 20-soap.ini 30-pdo_mysql.ini
20-calendar.ini 20-mbstring.ini 20-sockets.ini 30-pdo_odbc.ini
20-ctype.ini 20-mcrypt.ini 20-sqlite3.ini 30-pdo_pgsql.ini
20-curl.ini 20-mysqlnd.ini 20-sysvmsg.ini 30-pdo_sqlite.ini
20-dba.ini 20-odbc.ini 20-sysvsem.ini 30-wddx.ini
20-dom.ini 20-pdo.ini 20-sysvshm.ini 30-xmlreader.ini
20-enchant.ini 20-pgsql.ini 20-tidy.ini 30-xmlrpc.ini
20-exif.ini 20-phar.ini 20-tokenizer.ini opcache-default.blacklist
20-fileinfo.ini 20-posix.ini 20-xml.ini zzzzzzz-pecl.ini
20-ftp.ini 20-pspell.ini 20-xmlwriter.ini
20-gd.ini 20-shmop.ini 20-xsl.ini

And zzzzzzz-pecl.ini is empty.
 

Aleli Sanchez

Member
Feb 7, 2018
5
0
1
Mexico
cPanel Access Level
Root Administrator
Nop, may be a driver problem? Something with odbc, I´m thinking to use odbc to connect SQL Anywhere, instead of this extension, but I don´t know how to config the odbc.ini to recognize the driver for SQL Anywhere.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
When you look at the installed php modules it does come up which leads me to believe the module is loaded and possibly the issue is configuration in nature.

I did find several How-To articles on using ODBC to connect to SQL Anywhere when performing a search with Google which you might look into as well.