p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

Go Back   p2p.wrox.com Forums > PHP/MySQL > PHP Databases
I forgot my password
Register Now
Register | FAQ | Members List | Calendar | 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 tens of thousands of computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other programmers’ questions, win occasional prizes given to our best members, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 11th, 2004, 11:05 PM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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 . . .


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old March 12th, 2004, 04:33 PM
Friend of Wrox
Points: 1,708, Level: 16
Points: 1,708, Level: 16 Points: 1,708, Level: 16 Points: 1,708, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA.
Posts: 833
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/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old August 11th, 2006, 06:09 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 2
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/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Desktop Connection hari raghav Windows Server 3 June 9th, 2008 01:46 PM
SQL remote connection gcharri SQL Server 2000 0 March 26th, 2008 04: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 06:09 PM
creating a remote connection Adam H-W SQL Server 2000 1 February 10th, 2005 08:33 AM



All times are GMT -4. The time now is 04:03 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© 2010 Wiley Publishing, Inc