By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

PHP & Oracle

P: n/a
I just got a VM box. 2.6.9-22.ELsmp, Oracle 10gr2_client
This works: # sqlplus user/pw@machine connects right up.

But this doesn't:
putenv ("ORACLE_PATH=/opt/oracle/10gr2_client/bin");
putenv ("ORACLE_HOME=/opt/oracle/10gr2_client");
putenv ("PATH=$PATH;/opt/oracle/10gr2_client/bin");

$conn = ora_logon ("user@machine", "passwd");
$cur = ora_open($conn);

Gives: PHP Fatal error: Call to undefined function: ora_logon() in
/var/www/html/tst.php I've been searching the web - nothing, well
nothing that fits my case. On the old machine oci8 was in /etc/php.ini.

phpinfo says oci8 is supported. /etc/php.d doesn't have a oci8.ini and
web searching doesn't return anything (that exists). So what am I
missing? doing wrong? cl in co Thanks
Jul 5 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cal Lidderdale wrote:
Gives: PHP Fatal error: Call to undefined function: ora_logon() in
/var/www/html/tst.php I've been searching the web - nothing, well
nothing that fits my case. On the old machine oci8 was in /etc/php.ini.

phpinfo says oci8 is supported.
Then, why are you using the deprecated oracle functions (ora_logon) instead
of the oci8 (oci_connect) functions?

- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

http://acm.asoc.fi.upm.es/~mr/
Proudly running Debian Linux with 2.6.16-2-686 kernel, KDE3.5.3, and PHP
5.1.4-0.1 generating this signature.
Uptime: 18:42:30 up 1 day, 21:06, 1 user, load average: 0.42, 0.21, 0.37

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEq+wz3jcQ2mg3Pc8RAmx2AJ9/55QQS7Z7zK/c2hp2YGlWzdGE8ACfWT2g
XqxLZlWko4u7CmHYOIpNp24=
=ibsI
-----END PGP SIGNATURE-----
Jul 5 '06 #2

P: n/a
On Wed, 05 Jul 2006 09:51:55 -0600, Cal Lidderdale <ca*@nospam-bug.comwrote:
putenv ("ORACLE_PATH=/opt/oracle/10gr2_client/bin");
putenv ("ORACLE_HOME=/opt/oracle/10gr2_client");
putenv ("PATH=$PATH;/opt/oracle/10gr2_client/bin");
What Iván said, plus it's generally better to set the environment variables
before Apache starts rather than setting them with putenv - if you have access
to do so, at least.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jul 5 '06 #3

P: n/a
On Wed, 05 Jul 2006 09:51:55 -0600, Cal Lidderdale wrote:
phpinfo says oci8 is supported. /etc/php.d doesn't have a oci8.ini and
web searching doesn't return anything (that exists). So what am I
missing? doing wrong? cl in co Thanks
The problem is in the fact that ora_logon is an OCI function, not OCI8
function. OCI is no longer supported in 5.1. The function you're looking
for is called "oci_connect", "oci_new_connect" or "oci_pconnect",
depending on what do you want to do with it.

--
http://www.mgogala.com

Jul 16 '06 #4

P: n/a
On Wed, 05 Jul 2006 18:43:29 +0200, Iván Sánchez Ortega wrote:
Then, why are you using the deprecated oracle functions (ora_logon) instead
of the oci8 (oci_connect) functions?
I didn't see your answer in time.
--
http://www.mgogala.com

Jul 16 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.