Languages :: PHP :: connect to web server by using php |
|||
| By: fy_chongch |
Date: 30/05/2003 00:00:00 |
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 | 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 | 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 | Type : Assist |
|
| <A HREF="http://in2.php.net/oracle">http://in2.php.net/oracle</A> |
|||
| By: carchitect | Date: 30/05/2003 05:37:00 | 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 | Type : Comment |
|
| listening... I seems everyone lost here Harry |
|||
| By: harwantgrewal | Date: 30/05/2003 20:56:00 | 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 | 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 |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








