Re: Install php5 oracle 11g x64 ora_logon() ISSUE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I have a large  existing code base, i will migrate to new oci8 in a few
weeks but now ,i need to solve this problem. Which version of php did
you recommend me to  compile with oracle 11g?


-----Mensaje original-----
De: Christopher Jones <christopher.jones@xxxxxxxxxx>
Para: fvargas@xxxxxxxxx
Cc: php-install@xxxxxxxxxxxxx
Asunto: Re:  Install php5 oracle 11g x64 ora_logon() ISSUE
Fecha: Thu, 25 Sep 2008 08:27:29 -0700

PHP 5.1.6 doesn't have the old 'oracle' extension.  It only has the
newer 'oci8' extension.  Recent versions of PHP will give a warning
when an unknown 'configure' option is used, but 5.1 doesn't, IIRC.

If you are writing new PHP code, use oci8 functions (and remove the
--with-oracle option from 'configure').  If you have a small existing
code base, consider migrating it to oci8.  If you have a large
existing code base, you will need to get 'oracle' from an older PHP
and build it.  I can discuss this more if necessary.

I'd recommend upgrading oci8 to use the latest version from PECL;
again I can explain how, if you go this route.

For a mapping between the old "ora_xxx" and new "oci_xxx" functions,
see chapter 17 of the current version (1.4) of the Underground PHP &
Oracle Manual:


Fabricio Vargas wrote:
 > Hi everyone
 > I have a Oracle database Release x64 an Red Hat 5.2 x64
 > running perfectly and i need to install php with oracle connectivity in
 > the same machine. After follow diferentes guides (even mixed) always get
 > the same error "Call to undefined function ora_logon()"
 > In orden to get help from you I will explain the steps i made in the
 > configuration:
 > 1) environments variables
 > In /etc/bashrc include this lines
 > export ORACLE_BASE=/opt/oracle
 > export ORACLE_HOME=$ORACLE_BASE/11.1.0/db_1
 > export ORACLE_SID=lpz1
 > export ORACLE_TERM=xterm
 > export PATH=$PATH:$ORACLE_HOME/bin
 > 2) Download and install the source of php in new session
 > #rpm -i php-5.1.6-20.el5.src.rpm
 > #cd /usr/src/redhat/SOURCES/
 > #tar -zxvf php-5.1.6.tar.gz
 > #cd php-5.1.6
 > #./configure --with-apxs2=/usr/sbin/apxs --prefix=$ORACLE_HOME
 > --enable-track-vars --with-oci8=shared,$ORACLE_HOME  --with-gd
 > --enable-sigchild --with-zlib --disable-rpath
 > --with-config-file-path=/etc/httpd/conf --with-oracle=$ORACLE_HOME
 > #make
 > #make install (show output)
 > Installing PHP SAPI module:       apache2handler
 > /usr/lib64/httpd/build/
 > SH_LIBTOOL='/usr/lib64/apr-1/build/libtool'
 > /usr/lib64/httpd/modules
 > /usr/lib64/apr-1/build/libtool --mode=install cp
 > /usr/lib64/httpd/modules/
 > cp .libs/ /usr/lib64/httpd/modules/
 > cp .libs/libphp5.lai /usr/lib64/httpd/modules/
 > libtool: install: warning: remember to run `libtool
 > --finish /usr/src/redhat/SOURCES/php-5.1.6/libs'
 > chmod 755 /usr/lib64/httpd/modules/
 > [activating module `php5' in /etc/httpd/conf/httpd.conf]
 > Installing PHP CLI binary:        /opt/oracle/11.1.0/db_1/bin/
 > Installing PHP CLI man page:      /opt/oracle/11.1.0/db_1/man/man1/
 > Installing shared
 > extensions:     /opt/oracle/11.1.0/db_1/lib/php/extensions/no-debug-non-zts-20050922/
 > Installing build environment:     /opt/oracle/11.1.0/db_1/lib/php/build/
 > Installing header files:          /opt/oracle/11.1.0/db_1/include/php/
 > Installing helper programs:       /opt/oracle/11.1.0/db_1/bin/
 >   program: phpize
 >   program: php-config
 > Installing man pages:             /opt/oracle/11.1.0/db_1/man/man1/
 >   page: phpize.1
 >   page: php-config.1
 > Installing PEAR environment:      /opt/oracle/11.1.0/db_1/lib/php/
 > [PEAR] Archive_Tar    - already installed: 1.3.1
 > [PEAR] Console_Getopt - already installed: 1.2
 > [PEAR] PEAR           - already installed: 1.4.9
 > Wrote PEAR system config file at: /opt/oracle/11.1.0/db_1/etc/pear.conf
 > You may want to add: /opt/oracle/11.1.0/db_1/lib/php to your php.ini
 > include_path
 > Installing PDO
 > headers:          /opt/oracle/11.1.0/db_1/include/php/ext/pdo/
 > 3)Final touches
 > #cp php.ini-dist /etc/php.ini
 > follow the output instructions in php.ini
 > include_path = ".:/opt/oracle/11.1.0/db_1/lib/php
 > #libtool --finish /usr/src/redhat/SOURCES/php-5.1.6/libs
 > 4) in /etc/httpd/conf/httpd.conf
 > AddType application/x-httpd-php .php .phtml
 > 5) Finally
 > #service httpd restart
 > go to the php page end i get
 > Fatal error: Call to undefined function ora_logon()
 > in /path/to/file/index.php on line 11
 > I hope you can help me
 > Cheers
 > Fabricio

[Index of Archives]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Users]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]

  Powered by Linux