call to undefined function oci_connect

hi,

ihad previously everything on one machine but now i have two servers A and B. on server A i have my oracle db and on server B my php pages. they aer on the same network.
on server Bi have every thing configured (php.ini, db connection, ect..)
my db connection is like:
<?php
//ORACLE DB CONNECTION | USERNAME, PASSWORD, TNSNAME
$db_conn = oci_connect('vais', 'vais', 'xe');
?>

as you see i use xe as the tns name because the db is on the same machine as the pages.

what must i do now that they apart on different servers. because i think thats why i get the error: call to undefined function oci_connect

when on the same server it works fine.
eawebAsked:
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.

nplibCommented:
call to undefined function doesn't mean you made a mistake in the way you used your function, it means the orcacle dll isn't loaded in php.ini
0
eawebAuthor Commented:
but should the call function data (tns name)work even if the db is on a different server?
0
nplibCommented:
that I'm not entirely sure of, I would have to look at how the oci_connect() function actually works.

but check your php.ini to see if the oracle extension has been loaded.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

eawebAuthor Commented:
i check the dll and it is uncommented
extension=php_oci8.dll
0
nplibCommented:
make a php called phpinfo.php

<?php
phpinfo();
?>

and see if it is loading the php file that you checked to have the uncommented extentsion
0
eawebAuthor Commented:
already did that.

maybe i need to install the oracle client on server B?? in order to get connected to server A via the TNSNAME??
0
nplibCommented:
maybe, but that's not the error you are receiving.

just make sure that the

"Configuration File (php.ini) Path" in phpinfo(); is pointing to the php.ini file that you are using.

Windows PHP sometimes makes a php.ini file in C:\Windows or C:\Windows\System32, and in c:\php

so you may be editing the wrong one.
0
hernst42Commented:
I suggest using Zend Core for Oracle which include all necessary components to run php, webserver and oracle-Client (and if you want you get support for that)

http://www.zend.com/products/core

>maybe i need to install the oracle client on server B?? in order to get connected to server A via the TNSNAME??
yes oracle instant client 10 e.g
tns not needed you can use e.g
//servera/databasename if port 1521 is used a listener on Server A
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
PHP

From novice to tech pro — start learning today.