473,503 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5824
-----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
8431
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
2418
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
5215
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
10804
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
2223
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
5760
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
2991
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
2445
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
4209
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
5501
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
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
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,...
1
7006
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5021
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4685
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3166
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
397
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.