PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 08-14-2004, 01:31 PM   #1
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
Setting Up connect.php

The following is some guidance on just how to fill in the parameters for your phpdig database connection script, connect.php. You'll note that there are five parameters to be defined:
Code:
define('PHPDIG_DB_PREFIX','<dbprefix>');
define('PHPDIG_DB_HOST','<host>');
define('PHPDIG_DB_USER','<user>');
define('PHPDIG_DB_PASS','<pass>');
define('PHPDIG_DB_NAME','<database>');
The username and password (PHPDIG_DB_USER and PHPDIG_DB_PASS, respectively) are under your control. Pick whatever you want for these values, but make sure they agree with the username and password that were setup when you defined your phpdig database.

For the remaining parameters, the easiest way to tell what they should be is to look at what shows up on phpMyAdmin, on your web host's control panel. Here's one example:
Code:
Database prefixname_phpdigdb running on localhost
There are three parts to this message:

1) The database has a prefix called prefixname
2) phpdigdb is the database name
3) The MySQL database is running on localhost, meaning that it is running on the same server as your website

Hence, your connect.php file would be set like so for the following variables:
Code:
define('PHPDIG_DB_PREFIX','prefixname');
define('PHPDIG_DB_HOST','localhost');
define('PHPDIG_DB_NAME','phpdigdb');
Here is another example:
Code:
Database phpdigdb running on sql02.server25.host.com
The above message tells you:
1) There is no database prefix
2) phpdigdb is the database name
3) The MySQL database is running on a server called:
sql02.server25.host.com

Hence, your connect.php file would be set like so for the following variables:
Code:
define('PHPDIG_DB_PREFIX','');
define('PHPDIG_DB_HOST','sql02.server25.host.com');
define('PHPDIG_DB_NAME','phpdigdb');
Questions, comments and suggestions are welcome.
vinyl-junkie is offline   Reply With Quote
Old 08-15-2004, 04:39 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. One thing to add is that if you use the install.php file, and you don't have permission to create database such as with certain hosting accounts, then you should run install.php and select create tables instead, and then you shouldn't have to mess with _connect.php or connect.php, assuming you use the correct database info when you run the install.php file.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
apache:apache on connect.php lucite Troubleshooting 0 01-27-2007 09:02 AM
can not find connect.php liquidice Script Installation 1 12-12-2004 09:14 PM
Encrypting connect.php AllKnightAccess Mod Requests 1 09-23-2004 04:24 AM
connect.php search4lancer Script Installation 1 07-20-2004 10:44 PM
Passwords in connect.php renehaentjens Mod Requests 0 02-11-2004 08:06 AM


All times are GMT -8. The time now is 05:21 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.