Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 11th, 2004, 11:05 PM
Registered User
 
Join Date: Mar 2004
Location: mumbai, maharashtra, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to gouree Send a message via Yahoo to gouree
Default Remote Connection to DB2 from PHP

Hi,
I have a DB2 database placed on a different database server (Remote) and I have my PHP pages placed on different server,
I need to connect to the DB2 database from my PHP pages.
Could somebody tell me how to do a remote connection sice my PHP pages are on a different server and my database is on a different server.
Thanks,
Gouree . . .


 
Old March 12th, 2004, 04:33 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can connect to a database on a different machine by specifying the appropriate parameters in the connect function. For example, mysql uses this function:

 mysql_connect(<host>, <username>, <password>);

You aren't limited to using a database on the same machine. If it is on the same machine, just use "localhost" for the host.

I think you'll need to use the odbc extension to communicate with IBM DB2.


Take care,

Nik
http://www.bigaction.org/
 
Old August 11th, 2006, 05:09 PM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For accessing DB2 with PHP refer
http://www.regdeveloper.co.uk/2006/08/07/db2_udb_php/
http://www.regdeveloper.co.uk/2006/08/09/db2_udb_part2/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Desktop Connection hari raghav Windows Server 3 June 9th, 2008 12:46 PM
SQL remote connection gcharri SQL Server 2000 0 March 26th, 2008 03:42 PM
DB2/AS400 database connectivty using PHP roserita PHP Databases 0 February 13th, 2007 12:31 PM
Remote connection to DB2 database from PHP gouree Pro PHP 2 August 11th, 2006 05:09 PM
creating a remote connection Adam H-W SQL Server 2000 1 February 10th, 2005 08:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.