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

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

rameshupadhyeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rameshupadhyeAuthor Commented:
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
Michael WorshamInfrastructure / Solutions ArchitectCommented:
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
rameshupadhyeAuthor Commented:
yes .. i mentioned it in my earlier comment. and the extension_dir is also defined as c:\php\ext in php.ini
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

rameshupadhyeAuthor Commented:
i downloaded msvcr71.dll and tried after putting it in system32 directory.. or system directory but no improvement
0
Michael WorshamInfrastructure / Solutions ArchitectCommented:
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
rameshupadhyeAuthor Commented:
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
Michael WorshamInfrastructure / Solutions ArchitectCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.