Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

ocilogon() from php to oracle ...error:undefined function

Posted on 2008-11-12
7
Medium Priority
?
1,760 Views
Last Modified: 2013-12-19
this is a winxp apache 2.2 server, php5.2, oracle client, 8i database on sco. able to connect to oracle from sqlplus.
the connect string is the one in the tnsnames.ora is
connect.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521))
    (CONNECT_DATA = (SID = db)
  )

i am getting this error:
Fatal error: Call to undefined function OCILogon() in C:\webs\test\testoracle.php5 on line 2
pls help
thanks..


<?php
       if ($c=OCILogon("user", "password", "connect")) {
            echo "Successfully connected to Oracle.\n";
            OCILogoff($c);
       } else {
            $err = OCIError();
            echo "Oracle Connect Error " . $err[text];
       }
?>

Open in new window

0
Comment
Question by:rameshupadhye
  • 4
  • 3
7 Comments
 

Author Comment

by:rameshupadhye
ID: 22943436
i am able to connect from this xp client to oracle on sco with the connect string in tnsnames.ora. oci8.dll is in c:\php\ext and this directory path is in php.ini but unable to see the oci8 in phpinfo().

any help pls.. ??
0
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 22947021
Do you have the following extension enabled in the php.ini?

extension=php_oci8.dll

_or_

extension=oci8.dll

Reference:
http://forums.devshed.com/php-development-5/php-oci8-dll-won-t-load-on-php-5-0-5t-325971.html?p=1399189


0
 

Author Comment

by:rameshupadhye
ID: 22947419
yes .. i mentioned it in my earlier comment. and the extension_dir is also defined as c:\php\ext in php.ini
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rameshupadhye
ID: 22947710
i downloaded msvcr71.dll and tried after putting it in system32 directory.. or system directory but no improvement
0
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 22948756
In your comment you said it was placed in the c:\php\ext directory and in the path, but there is no mention that have enabled the extensions inside the php.ini:

extension = php_oci8.dll
extension = php_oracle.dll

Please attach a copy of your php.ini so we can review it.
0
 

Author Comment

by:rameshupadhye
ID: 23002489
i m sorry i was not at this place..
meanwhile, today, i have copied the php_oracle.dll in php/ext directory and enabled the same in php.ini but no result
i m sending the php.ini..
Copy-of-php
0
 
LVL 29

Accepted Solution

by:
Michael Worsham earned 1500 total points
ID: 23008415
Well, I am out of options. Maybe one of the other EE experts have some ideas on where to look next.

Now if you had a Linux server, I could get you up and running in no time with Apache2/PHP5/Oracle client.

This is one of the reasons I don't recommend running Apache/PHP on Windows boxes, especially for Oracle interfaces as they are very picky and require a bit more to get working.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question