2

I've just upgraded my VM to Ubuntu 14.04, and my OCI8 PHP driver has stopped working.

I've tried to install/upgrade it, but it doesn't work. That's the error messages I get:

marc@sf2:/build/buildd/php5-5.5.9+dfsg/pear-build-download$ sudo pecl install oci8
downloading oci8-2.0.8.tgz ...
Starting to download oci8-2.0.8.tgz (190,854 bytes)
.........................................done: 190,854 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/oci8-2.0.8.tgz"
Download of "pecl/oci8" succeeded, but it is not a valid package archive
Error: cannot download "pecl/oci8"
Download failed
install failed

I've "untared" the file oci8-2.0.8.tgz without problems and the package.xml is there... What can I do to fix this? Must I revert to Ubuntu 13.10? Because I need oci8 for my job to be done...

Thanks for your help!

EDIT: I've found the problem: PECL isn't working on Ubuntu 14.04 and OCI8 must be installed from source or using a phar package. I'm still looking for information about how to install it.

EDIT 2: I've found it!

  1. Download and extract the oci8 library from PECL repository (http://pecl.php.net/package/oci8)
  2. Run the phpize command to create the build scripts
  3. With the InstantClient installed, run ./configure -with-oci8=shared,instantclient,$ORACLE_HOME
  4. Finally, run a make install and /etc/init.d/apache2 restart

All this information is taken from the PHP OCI8 Installation Guide (http://php.net/manual/en/oci8.installation.php)

1

2 Answers 2

2

mHouses, you are my hero. I spent 4 hours yesterday trying to install pecl_http-1.7.6 on my 32 bit ubuntu 14.04 with no avail. Your instructions worked perfect for me, too.

all I had to do was changing your

"./configure -with-oci8=shared,instantclient,$ORACLE_HOME"

to a simple

"./configure"

Thanks a lot for sharing your knowledge

-1

Latest PHP version has them built-in but installation of these extensions from pecl is mostly failed.

Best way is compile & install the extensions from PHP source

See my blog on this problem for more detail: http://itblog.study.land/how-to-install-php5-pdo_oci-oci8-and-other-extensions-for-ubuntu/

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .