473,385 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

PHP & Oracle

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
4 5806
-----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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
2
by: Hans Forbrich | last post by:
The following is a Request for Discussion, following up on some recent posts about distributing a periodic news group 'Charter and FAQ' post. While not formally following RFC/RFD rules, the intent...
3
by: Jake McDermott | last post by:
We have a few developers that use Oracle 9i (9.2.0.4.0) on their personal workstations for testing purposes. Recently, weve made the decision to upgrade them to WinXP so that they are able to use...
4
by: Arun Goel | last post by:
I have installed Oracle client & Oracle database(9.2.0.4) on Red Hat 9.0. It seems to me everything went fine in installation as I followed notes from...
7
by: Will | last post by:
On the subject of Data Warehouses, Data Cubes & OLAP…. I would like to speak frankly about Data Warehouses, Data Cubes and OLAP (on-line analytical processing). Has it dawned on anyone else...
0
by:  Ļ√Ż—Ô | last post by:
ORA-03114: not connected to ORACLE && MS's Bug?? DataBase:Oracle 817 using OracleClient,net framework 1.1 I'm using ADO.Net in C# with Oracle 817. and following is my public data access...
1
by: MAL | last post by:
Hello, I have 2 classes that work great as a windows app to retrieve and process data from an Oracle9i db. When I implement them in a Service program running as Local System, it fails on the...
4
by: opensourcearts | last post by:
Hello all, I am working on an application that is basically a bridge between oscommerce and gallery2 software, with some other functionality. It will allow users to port all of their media...
2
by: egoldthwait | last post by:
I need to convert a 17mb access 2000 db to Oracle and house it in a Citrix farm. The issue: we have never converted an Access Db to Oracle but can probably use Oracle's Workbench to assist with...
3
by: Noorain | last post by:
I designed a site. i want to header,footer,left & right column fixed but body information only scrolling. this site screen to be 800/600 px. i designed this way but when i used position fixed all...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.