Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
|
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 August 12th, 2005, 10:57 AM
Sho Sho is offline
Registered User
 
Join Date: Aug 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP in one server, Database in another...

Hello.

This is the first time I venture into PHP developement, and I've got some "limitations" so to speak.

As the topic states, The php files will be located in a Linux based webserver, while a Postgres database, the one I'm trying to connect with the php files of the first one, is located on another Linux based computer.

I'm also Linux newbie, so my question is this: Does the webserver need to be configured in some way so it can connect to the Postgres Database (like using an ODBC in Windows)? And if so, what would these modifications be?

For your reply, thanks in advance.

 
Old August 14th, 2005, 07:33 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

To connect MySQL db from PHP, we use mysql_connect(). Parameters to this functions are IP/name of db server, username, password and optional MySQL daemon socket.

There're will other functions to use other db than MySQL.

ODBC is required to connect to MS db like MS Access.

Please see PHP documentation.

http://www.mediasworks.com/tutorials/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Php database connection...[?] aaronabdiel PHP Databases 1 January 3rd, 2008 12:06 AM
DATABASE to PHP p2ptolu PHP Databases 1 December 23rd, 2005 07:17 AM
IIS server, connection to offsite database server Hazzardusa Classic ASP Databases 1 August 14th, 2005 10:03 PM
php+MSACCESS database karadavut Beginning PHP 1 December 15th, 2004 02:14 PM
PHP Error on Server snappy316 BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 August 22nd, 2004 07:36 PM





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