visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: PHP :: connect to web server by using php


By: fy_chongch U.S.A.  Date: 30/05/2003 00:00:00  English  Points: 60 Status: Answered
Quality : Excellent
how can i connect to web server by given IP address( the database in the web server is oracle) by using php?
By: carchitect Date: 30/05/2003 05:32:00 English  Type : Comment
<A HREF="http://www.devarticles.com/art/1/314">http://www.devarticles.com/art/1/314</A>
By: VGR Date: 30/05/2003 05:35:00 English  Type : Answer
simply do a :
$connection=mysql_connect('x.y.t.z','youruser','yourpassword') or die('could not connect');

you've to be sure that youruser@x.y.t.z with password 'yourpassword' is allowed access to the Mysqld server, of course 8-)
By: carchitect Date: 30/05/2003 05:36:00 English  Type : Assist
<A HREF="http://in2.php.net/oracle">http://in2.php.net/oracle</A>
By: carchitect Date: 30/05/2003 05:37:00 English  Type : Comment
<A HREF="http://in2.php.net/function.mssql-connect">http://in2.php.net/function.mssql-connect</A>
By: harwantgrewal Date: 30/05/2003 20:51:00 English  Type : Comment
listening...

I seems everyone lost here

Harry
By: harwantgrewal Date: 30/05/2003 20:56:00 English  Type : Comment
These are some comments that might help you

Regarding connecting to an Oracle Db on NT from Linux, here is what you need to do. Little Oracle knowledge is a prerequisite.

1. Install Oracle database client onto Linux.
2. Once installed on Linux, modify the tnsanmes.ora file to create an alias to the database running on the NT box. Follow the syntax already in the tnsnames.ora file
3. Depending on the version of Oracle you have and the Oracle Database has the listener running there is a utility called tnsping(xx) that you can use to verify that you can hit a remote 0racle database syntax is tnsping <alias in tnsnames.ora>
4. You could use sqlplus to conenct to the remote database to verify the login process works. Remember to use login_id@tnsnames_alias/password
5. Once you have gotten this far PHP should be able to hit the database. Give it a shot. You might need to tool around the PHP config to get things to work. use the phpinfo function to debug, its rather useful.

-------------------------------------------------------------------------------------------------------------------------------------------------------------
While login to remote oracle server,you should setup oracle client first.If failed with error ora-12154,Please if you web server account can acess the tnsnames.ora file or not.One way is login as root then 'su nobody' and set the correct envrionment,run sqlplus to test if it works fine.


Harry
By: VGR Date: 30/05/2003 21:00:00 English  Type : Comment
yes, I'm lost, I answered for MySql ;-)
for oracle from PHP functions , it's ora_* (deprecated) or the ORACLI ones

see <A HREF="http://www.php.net">www.php.net</A>

Do register to be able to answer

EContact
browser fav
page generated in 346.933130 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page