Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Oracle support in PHP? Use flag ignored?

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
cayenne
l33t
l33t
User avatar
Posts: 945
Joined: Thu Oct 17, 2002 3:50 am
Location: New Orleans

Oracle support in PHP? Use flag ignored?

  • Quote

Post by cayenne » Fri Sep 19, 2003 7:08 pm

Hello all!

I've succesfully, installed Apache, PHP, and PostgreSQL...gotten them all to work. Now turning my attention to try to create some useful PHP/Apache apps here at work to work with my Oracle databases. On my first try, I got this error:

Fatal error: Call to undefined function: ora_logon() in /home/httpd/php/oracle_test.php on line 10

When looked around for this error, most posts indicted that Oracle support had not been compiled into PHP. I looked in the phpinfo() page I created, and sure enough, I did not see anything like:
--with-oracle=/path/to/oracle/home/dir
--with-oci8=/path/to/oracle/home/dir

Here is the info from the phpinfo() call:
'./configure' '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--without-readline' '--with-apxs=/usr/sbin/apxs' '--without-db3' '--without-db4' '--without-db2' '--with-mcrypt=/usr' '--with-mhash' '--with-interbase=/opt/interbase' '--with-ming=/usr' '--with-swf=/usr' '--with-sybase=/usr' '--with-gdbm=/usr' '--with-java=/opt/blackdown-jdk-1.4.1' '--with-mcal=/usr' '--with-unixODBC=/usr' '--with-pgsql=/usr' '--with-snmp' '--enable-ucd-snmp-hack' '--with-xpm-dir=/usr/X11R6' '--with-pdflib=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-png-dir=/usr' '--with-jpeg' '--with-jpeg-dir=/usr' '--enable-exif' '--without-jpeg' '--with-tiff-dir=/usr' '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-ttf' '--with-t1lib' '--with-gettext' '--with-qtdom' '--with-pspell' '--with-openssl' '--without-curl' '--with-imap' '--with-ldap' '--with-dom' '--with-dom-xslt' '--with-kerberos' '--with-pam' '--disable-memory-limit' '--disable-ipv6' '--enable-dbx' '--with-imap-ssl' '--with-zlib' '--with-zlib-dir=/usr/lib' '--with-sablot=/usr' '--enable-xslt' '--with-xslt-sablot' '--with-xmlrpc' '--enable-wddx' '--with-xml' '--enable-mbstring' '--enable-mbregex' '--with-bz2' '--with-crack' '--with-ndbm' '--with-cdb' '--enable-bcmath' '--enable-calendar' '--enable-dbase' '--enable-filepro' '--enable-ftp' '--with-mime-magic' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvipc' '--with-iconv' '--enable-shmop' '--enable-dio' '--enable-inline-optimization' '--enable-track-vars' '--enable-trans-sid' '--enable-versioning' '--with-config-file-path=/etc/php/apache1-php4'

I checked my USE flags in make.conf, and I to have oci8 in there:
USE="X -gtk -gnome alsa acl acpi arts avi -cdr crypt cups dga emacs encode esd fbcon firebird flash freetds gd gdbm gif gphoto2 gpm guile imap imlib innodb jack java jikes jpeg kde kerberos ladcca lcms ldap libwww mbox mcal mysql nas ncurses nls oci8 odbc oggvorbis opengl oss pam pcmcia pdflib perl png pnp postgres python qt quicktime readline samba sdl snmp spell sse ssl svga tcltk tetex tiff truetype usb Xaw3d xml xml2 xmms sv zeo zlib x86"

So, my question is...what happened? How do I get oracle support compiled into PHP on my Gentoo box?

Thanks in advance!!

cayenne
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9657
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Sat Sep 20, 2003 6:09 am

I guess it's a bug for http://bugs.gentoo.org
Top
tangent
n00b
n00b
Posts: 11
Joined: Sun Apr 13, 2003 5:29 pm

  • Quote

Post by tangent » Mon Sep 22, 2003 2:21 pm

I had that problem too. After scanning through php.eclass I noticed that the condition to compile --with-oci8 requires both the oci8 flag and ORACLE_HOME to be set. Didn't have that set for root so I set that and remerged. Now I'm getting compile errors in oci8.c, have to sort that out tommorrow. hrrmph...
Top
cayenne
l33t
l33t
User avatar
Posts: 945
Joined: Thu Oct 17, 2002 3:50 am
Location: New Orleans

So, set ORACLE_HOME env var and oci8 in the USE flags?

  • Quote

Post by cayenne » Mon Sep 22, 2003 5:23 pm

tangent wrote:I had that problem too. After scanning through php.eclass I noticed that the condition to compile --with-oci8 requires both the oci8 flag and ORACLE_HOME to be set. Didn't have that set for root so I set that and remerged. Now I'm getting compile errors in oci8.c, have to sort that out tommorrow. hrrmph...
So...just to be clear...If I have oci8 in my USE flags in make.conf, and I have the env variable ORACLE_HOME set in root...it will pick all that up if I re emerge PHP?

TIA,

cayenne
Top
cayenne
l33t
l33t
User avatar
Posts: 945
Joined: Thu Oct 17, 2002 3:50 am
Location: New Orleans

Still not working...

  • Quote

Post by cayenne » Tue Sep 23, 2003 1:57 pm

Ok...my root user has ORACLE_HOME set. I double checked, and oci8 is in my USE flags in make.conf. Howerver, when I was trying to re-emerge mod_php...I was watching, and it specifically said NO support for Oracle being put in.

I've been trying to figure things out...the only thing I can think of is that I have Oracle 9.0.2 client tools installed...would the fact that it isn't oracle 8i be the problem? I mean, mod_php is only going to be using the Oracle Net tools for the connections, right? Should it matter what version?

cayenne
Top
cayenne
l33t
l33t
User avatar
Posts: 945
Joined: Thu Oct 17, 2002 3:50 am
Location: New Orleans

Ok...solved...kind of...

  • Quote

Post by cayenne » Tue Sep 23, 2003 3:36 pm

Ok...maybe it should have been obvious to me...but, took me a bit.
The oci8 ONLY allows you to use the ocixxx commands, not the ora_xxx ones.

Took me a bit to see on the http://www.php.net/manual/en/ref.oracle.php page, which is the first place I went to find the oracle commands...there is a little link on the top of that page to take you to the OCI extensions. Color me slow, but, didn't dawn on me till just a minute ago when I tried my test script replacing all the ora_ calls with oci calls...and voila..it worked.

Ok..so, the USE flag, oci9 allows you to use the oci php extensions....How to you set a flag in USE to allow it to also use the ora_ commands?

Can you put something like 'oracle' as a USE flag...what happens if you put a flag in there, that isn't officially listed on the gentoo USE flag page? Will it work? Will it be ignored?

Maybe a larger question is...how to you put in compile flags for a program you are emerging, but, isn't covered in the USE flag part of make.conf?
Top
Arkanjo
n00b
n00b
User avatar
Posts: 24
Joined: Sat May 24, 2003 9:02 pm
Location: Portugal
Contact:
Contact Arkanjo
Website

  • Quote

Post by Arkanjo » Wed Apr 21, 2004 3:53 pm

I agree, this is not right how can one guess that to have OCI support you have to do all this, i was lucky to find the post and even now i ask the same question: how to enable the ora_... functions ???
There are 10 types of people in the world; those who understand binary, and those who don't
Top
ausmusj1
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 121
Joined: Fri Jan 02, 2004 12:18 am
Contact:
Contact ausmusj1
Website

  • Quote

Post by ausmusj1 » Wed Jun 02, 2004 3:31 pm

Edit the /usr/portage/eclass/php-sapi.eclass file, and add the line:

Code: Select all

myconf="${myconf} --with-oracle"
You'll want to make sure that your ORACLE_HOME environment variable is properly set before running the emerge, however, as the Oracle extension does need the client installed.

HTH

-James
Top
jfalberts
n00b
n00b
User avatar
Posts: 2
Joined: Tue Jun 29, 2004 5:35 am
Location: Bloemfontein, South-Africa

  • Quote

Post by jfalberts » Wed Jun 30, 2004 12:53 pm

Hi,

I'm having exactly the same trouble. I installed the Oracle 8.1.7 client, set my ORACLE_HOME for root and also made sure that oci8 is in my USE flags. I then emerged apache mod_php and mysql. Afterwards I ran ebuild mod_php-4.3.6_rc2.ebuild config, but oci 8 support is not being compiled into my php. When I try to use OCILogon I get Fatal error: Call to undefined function: ocilogon(). Here's my configure command from PHPInfo:

'./configure' '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--with-apxs2=/usr/sbin/apxs2' '--with-ndbm=/usr' '--with-db4=/usr' '--with-mcrypt=/usr' '--with-mhash=/usr' '--without-interbase' '--without-ming' '--without-swf' '--with-sybase=/usr' '--with-gdbm=/usr' '--without-fdftk' '--with-java=/opt/blackdown-jdk-1.4.1' '--without-mcal' '--with-unixODBC=/usr' '--without-pgsql' '--with-snmp=/usr' '--enable-ucd-snmp-hack' '--with-xpm-dir=/usr/X11R6' '--with-gmp' '--with-pdflib=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-png=/usr' '--with-png-dir=/usr' '--with-jpeg=/usr' '--with-jpeg-dir=/usr' '--enable-exif' '--with-tiff=/usr' '--with-tiff-dir=/usr' '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-freetype-dir=/usr' '--with-ttf=/usr' '--with-t1lib=/usr' '--with-gettext' '--with-qtdom=/usr/qt/3' '--with-pspell=/usr' '--with-openssl=/usr' '--without-imap' '--with-ldap=/usr' '--with-dom=/usr' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--without-kerberos' '--with-pam' '--disable-memory-limit' '--enable-ipv6' '--without-yaz' '--without-curl' '--enable-dbx' '--with-zlib=/usr' '--with-zlib-dir=/usr' '--with-sablot=/usr' '--enable-xslt' '--with-xslt-sablot' '--with-xmlrpc' '--enable-wddx' '--with-xml' '--enable-mbstring=all' '--enable-mbregex' '--with-bz2=/usr' '--with-crack=/usr' '--with-cdb' '--enable-pcntl' '--enable-bcmath' '--enable-calendar' '--enable-dbase' '--enable-filepro' '--enable-ftp' '--with-mime-magic=/usr/share/misc/file/magic.mime' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvipc' '--with-iconv' '--enable-shmop' '--enable-dio' '--enable-yp' '--without-ncurses' '--without-readline' '--enable-inline-optimization' '--enable-track-vars' '--enable-trans-sid' '--enable-versioning' '--with-config-file-path=/etc/php/apache2-php4'

No Oracle support in there anywhere. Please help, I'm really getting desperate! How can I get Oracle support into my PHP. Everything else works fine, just not the OCI functions. :cry:

Thanx
Top
Post Reply

9 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic