Php PDO OCI Driver installation using pecl -
i'm trying install pdo driver oci.
when searching google pdo_oci find following url:
https://pecl.php.net/package/pdo_oci
it displays message @ top of page:
this package not maintained anymore , has been superseded. package has moved channel http://www.php.net/pdo_oci, package ext/pdo_oci.
what message mean, how add channel using pecl?
i've attempted add channel using pear channel-discover php.net/pdo_oci
, doesn't seem work. can't find channel.xml file php.net/pdo_oci try pear channel-add channel.xml
.
edit
if have php installed (from repository example), can compile pdo_oci php source (you need instantclient installed)
- download php source same version have installed;
- unzip;
- change directory php-your-version/ext/pdo_oci
inside pdo_oci folder, run these commands:
$ phpize $ ./configure --with-pdo-oci=instantclient,/usr,12.1 $ make && make install $ echo "extension=pdo_oci.so" > /etc/php.d/pdo_oci.ini $ service httpd restart
this method create pdo_oci.so in php extensions folder, don't need recompile entire php. can repositories versions of php, , can extension inside ext folder in php source.
first, sorry bad english.
i had same question, solve.
as message says, pecl extension deprecated. need compile php source pdo_oci included in php source.
i made way in centos 6.6, mysql, apache , instantclient installed:
install dependencies like
curl-devel freetype-devel libc-client libc-client-devel libjpeg-devel libmcrypt-devel libpng-devel libtool-ltdl-devel libxml2-devel libxpm-devel libc-client libc-client-devel libmcrypt-devel libpng-devel db4-devel ...and other prompted dependencies in ./configure (always install *-devel package too)
download php source
$ wget http://ar2.php.net/get/php-5.6.10.tar.gz/from/this/mirror
unzip downloaded file , change folder
$ tar -xzf php-5.6.10.tar.gz $ cd php-5.6.10
execute configure command desired params (my example below)
./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --datadir=/usr/share/php \ --mandir=/usr/share/man \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d \ --with-zlib \ --enable-bcmath \ --with-bz2 \ --enable-calendar \ --with-gdbm \ --with-gmp \ --enable-ftp \ --with-gettext \ --enable-mbstring \ --with-readline \ --with-apxs2 \ --with-pdo-oci=instantclient,/usr,12.1 \ --enable-dba=shared \ --with-pdo-mysql --with-mysql-sock=/var/mysql/mysql.sock \ --with-pdo-pgsql \ --with-mcrypt \ --with-mhash \ --with-curl \ --with-gd \ --enable-gd-native-ttf \ --with-jpeg-dir=/usr \ --with-png-dir=/usr \ --with-zlib-dir=/usr \ --with-xpm-dir=/usr \ --with-vpx-dir=/usr \ --with-freetype-dir=/usr \ --with-t1lib=/usr \ --with-libxml-dir=/usr \ --with-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --enable-soap \ --with-xmlrpc \ --with-xsl \ --with-tidy=/usr \ --enable-pcntl \ --enable-sysvshm \ --enable-sysvmsg \ --enable-shmop
if see error when running command, missing dependency (maybe dependency have not mentioned).
after run configure command without errors
$ make && make install
at moment, php installed. certify, use command below:
$ php -v
but before finishing, need make adjustments...
copy php.ini correct directory
### if you're on development server $ cp php.ini-development /etc/php.ini ### if you're on production server $ cp php.ini-production /etc/php.ini
open apache config file edit
$ vi /etc/httpd/conf/httpd.conf
add following lines apache interpret php (ignore if have)
addtype application/x-httpd-php .php addtype application/x-httpd-php-source .phps
restart apache
$ service httpd restart
Comments
Post a Comment