How to install PHP5, OCI8, GD, LDAP, ZEND on linux

This note apply to Red-Hat linux 64, but it’s close for all linux version.

 

1. Download and install RPM’s from Oracle Site :  http://oss.oracle.com/projects/php/files/EL5/x86_64

oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm
php53-5.3.8-1.el5.x86_64.rpm
php53-cli-5.3.8-1.el5.x86_64.rpm
php53-common-5.3.8-1.el5.x86_64.rpm
php53-gd-5.3.8-1.el5.x86_64.rpm
php53-ldap-5.3.8-1.el5.x86_64.rpm
php53-oci8-11gR2-5.3.8-1.el5.x86_64.rpm
install using :   rpm -ivh

 

2. Create log dir :
mkdir -p /etc/php.d/logs

 

3. Modify the php.ini :  (/etc/php.ini)

3.1 Enable “<?"  :
short_open_tag = On

3.2 Enable Error Log  :

error_log = "/etc/php.d/logs/php.log"

 

4. Put the tnsnames.ora in :

/usr/lib/oracle/11.2/client64/network/admin

 

5.  Add config to run php (/etc/httpd/conf.d/php.conf) :

AddType application/x-httpd-php .php .phtml

 

6. Add config in  (/etc/sysconfig/http)  and put your charset country:

LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
TNS_ADMIN=/usr/lib/oracle/11.2/client64/network/admin
ORACLE_HOME=/usr/lib/oracle/11.2/client64
NLS_LANG=”BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1″
export LD_LIBRARY_PATH TNS_ADMIN ORACLE_HOME NLS_LANG

 

7. Add config in (/etc/httpd/conf/httpd.conf) and put your charset country :

7.1 Add:
#AddDefaultCharset UTF-8   (comment)
AddDefaultCharset ISO-8859-1
AddCharset ISO-8859-1  .iso8859-1  .latin1

7.2 Add at the of file :
PassEnv ORACLE_HOME
PassEnv LD_LIBRARY_PATH
PassEnv TNS_ADMIN
PassEnv NLS_LANG

 

8. To install the Framework Zend (with lucene search), download the file :  ZendFramework-1.11.10-minimal  from site:  http://www.zend.com/en/downloads

8.1 Uncompress the file :
gunzip ZendFramework-1.11.10-minimal.tar.gz
tar -xvf ZendFramework-1.11.10-minimal.tar

8.2 Create dir:
mkdir -p /usr/lib64/php/include

8.3 Copy the dir “zend” from ZendFramework to include

 cp  ZendFramework-1.11.10-minimal/ZendFramework-1.11.10-minimal/library/Zend  /usr/lib64/php/include

8.4 Modify in php.ini :

include_path = "/usr/lib64/php/include"

 

Good Luck !

3 Comments to "How to install PHP5, OCI8, GD, LDAP, ZEND on linux"

  1. 09/28/2011 - 6:14 PM | Permalink

    hi I was luck to look for your theme in yahoo, your Topics is impressive, I learn a lot in your Topics really thanks very much, btw the theme of you blog is really wonderful, where can find it
    My website is about DreamHost Reviews.

  2. 09/29/2011 - 6:54 PM | Permalink

    I really appreciate your post and you explain each and every point very well.Thanks for sharing this information.And I’ll love to read your next post too.

  3. 10/07/2011 - 6:03 AM | Permalink

    You got a really useful blog. I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me.

Leave a Reply