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

From: Date: Thu, 25 Sep 2008 15:27:29 +0000
Subject: Re: Install php5 oracle 11g x64 ora_logon() ISSUE
References: 1 2 3 4  Groups: php.install 
Request: Send a blank email to php-install+get-19433@lists.php.net to get a copy of this message
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: http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf See Fabricio Vargas wrote:
Hi everyone I have a Oracle database Release 11.1.0.6.0 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/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' libphp5.la /usr/lib64/httpd/modules /usr/lib64/apr-1/build/libtool --mode=install cp libphp5.la /usr/lib64/httpd/modules/ cp .libs/libphp5.so /usr/lib64/httpd/modules/libphp5.so cp .libs/libphp5.lai /usr/lib64/httpd/modules/libphp5.la libtool: install: warning: remember to run `libtool --finish /usr/src/redhat/SOURCES/php-5.1.6/libs' chmod 755 /usr/lib64/httpd/modules/libphp5.so [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
-- Email: christopher.jones@oracle.com Tel: +1 650 506 8630 Twitter: http://twitter.com/ghrd Free PHP Book: http://tinyurl.com/f8jad

« previous php.install (#19433) next »