Before continuing the rest of the installation process we started (/wp/index.php/2009/07/setting-up-a-web-application-on-centos-5-3/), I must mention my appreciation for the “yummy” tool Linux developers provided: yum (.. an automatic updater and package installer/remover for rpm systems). I love using webmin (.. a web-based interface for system administration for Unix) as well. The other day I only clicked on a button to upgrade almost all the packages in our CentOS box; this facility is using yum in the background. It took almost 2 hours: just be patient 🙂
The main problem I have experienced was the create the link between PHP and Oracle 10g Express Database server. Thanks to Google I was able to find people on the net that had the similar issues.
I downloaded 2 (free) packages from Oracle’s website (into folder /usr/src/):
oracle-instantclient-basic-10.2.0.3-1.x86_64.rpm
oracle-instantclient-devel-10.2.0.3-1.x86_64.rpm
Then, I ran:
cd /usr/src/
rpm -ivh oracle-instantclient-basic-10.2.0.3-1.x86_64.rpm
rpm -ivh oracle-instantclient-devel-10.2.0.3-1.x86_64.rpm
Development packages and a compiler were needed, as far as I understood from the error messages.
yum install gcc
yum install php-devel
yum install php-pecl-* --skip-broken
yum install php-oci8
pecl install oci8
When it asks for the ORACLE_HOME or Oracle Instant Client, type:
instantclient,/usr/lib/oracle/10.2.0.3/client64/lib
[root@localhost src]# pecl install oci8
downloading oci8-1.3.5.tgz ...
Starting to download oci8-1.3.5.tgz (137,987 bytes)
............................done: 137,987 bytes
10 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] : instantclient,/usr/lib/oracle/10.2.0.3/client64/lib
By the way, I did not need all the pecl libraries installed. I simply went into /etc/php.d/ and commented out the lines for extensions (to disable them):
[root@localhost php.d]# ls
apc.ini gmagick.ini lzf.ini oci8.ini pdo_sqlite.ini sphinx.ini z-mailparse.ini
curl.ini imap.ini mbstring.ini pdf.ini phar.ini sqlite.ini
fileinfo.ini interbase.ini memcached.ini pdo_firebird.ini php-pecl-imagick.ini ssh2.ini
gd.ini json.ini memcache.ini pdo.ini pspell.ini xdebug.ini
geoip.ini ldap.ini ncurses.ini pdo_oci.ini radius.ini zip.ini
[root@localhost php.d]# nano xdebug.ini
; Enable xdebug extension module
; zend_extension=/usr/lib64/php/modules/xdebug.so
So, far the packages installed help us run our bespoke web application on Apache (httpd 2.2.3), PHP 5.3.1, Firebird 2.1.2, Oracle 10g XE.
Check the following useful extras:
yum install aspell
yum install php-pspell
yum install php-imap
Reading emails from an IMAP server, parsing structured content, preparing emails using by TinyMCE with spellchecker and sending email using PHPMailer class are all fun!
Happy coding!