help!!! php/mysql and website
I read another thread on here similar to my problem but it was just a little different- and it didn't help me, still having same problems. This is what I'm getting when I click on my website: Warning: mysql_connect(): Unknown MySQL server host 'DB_SERVER' (1) in /home/content/g/r/e/greatembooks/html/includes/functions/database.php on line 12
Unable to connect to database server!
I have never used SQL or a php designed site before, so I'm sure it's error is with me and not the actual coding for the site...I hope. If anyone can help me, I would be greatly appreciative.
Following is the Instructions I received for setting up my site. I have posted the original here without my changed variables.
Edit the configuration files
You need to edit 2 files that you have uploaded to your webserver, they are: -
Includes/configure.php
Admin/includes/configure.php
These lines in the file need to be edited so that the server knows how to connect to
the website. Edit all the variables above the line "don't edit"
There will be a blank '' where you can place the variable.
And here is what I see when I open the includes/configure.php:
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
// add your database and website details to the variables below
define('DB_SERVER_USERNAME', '');
// your username that you use to log into your web server
define('DB_SERVER_PASSWORD', '');
// your password that you use to log into your web server
define('DB_DATABASE', '');
// your database
define('DIR_FS_CATALOG', '/home/username/public_html/');
define('HTTP_SERVER', 'http://www.yoursite.com');
define('HTTP_COOKIE_DOMAIN', '.yoursite.com');
// do not include the www
define('DB_SERVER', 'localhost');
// you do not need to change anything below
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '');
define('DIR_WS_HTTP_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('HTTPS_SERVER', '');
define('ENABLE_SSL', false);
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'mysql');
?>
And here is what I see when I open the admin/includes/configure.php:
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
// add your database and website details to the variables below
define('DB_SERVER_USERNAME', '');
// your username that you use to log into your web server
define('DB_SERVER_PASSWORD', '');
// your password that you use to log into your web server
define('DB_DATABASE', '');
// your database
define('DIR_FS_ADMIN', '/home/username/public_html/admin/'); // replace username with your web server username
define('DIR_FS_CATALOG', '/home/username/public_html/');
define('DIR_FS_DOCUMENT_ROOT', '/home/username/public_html');
define('SITE', 'www.yoursite.com');
define('WWW', 'http://www.yoursite.com');
define('HTTP_SERVER', 'http://www.yoursite.com');
define('HTTP_CATALOG_SERVER', 'http://www.yoursite.com');
define('DB_SERVER', 'localhost');
// you do not need to change anything below
define('DIR_WS_ADMIN', '/admin/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('HTTPS_CATALOG_SERVER', '');
define('ENABLE_SSL_CATALOG', 'false');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'mysql');
?>