Restored last years program WORKED then, but not now??
Posted: Sun Apr 06, 2008 10:39 pm
I restored an version of my program from November, 2007 which SHOULD be the same as current. I restored it and have these strange unexplainable errors that are now showing up that didn't back then. I am assuming perhaps back then it was a different php version and now perhaps php on my server may have been upgraded? I don't have any other explaination as to why it would work back in 2007 and not now..
Here are the errors I am getting...
NOTE: Due to this website being VERY well known, to resist hacking I've "[HIDDEN]" the paths to the files.
(cotm.php)
(config.php)
NOTE: Due to this website being VERY well known, to resist hacking I've "[HIDDEN]" the logging in username/password of course.
I contacted my host 2 days ago to look at my coding and see why it's not working anymore, but still no response and I continue to get NONSTOP emails from all my visitors about the site being down.. HELP! Thanks
Here are the errors I am getting...
NOTE: Due to this website being VERY well known, to resist hacking I've "[HIDDEN]" the paths to the files.
Notice: Use of undefined constant DB_HOSTNAME - assumed 'DB_HOSTNAME' in /home/[HIDDEN]/[HIDDEN]/[HIDDEN]/[HIDDEN]/cotm.php on line 4
Notice: Use of undefined constant DB_USERNAME - assumed 'DB_USERNAME' in /home/[HIDDEN]/[HIDDEN]/[HIDDEN]/[HIDDEN]/cotm.php on line 4
Notice: Use of undefined constant DB_PASSWORD - assumed 'DB_PASSWORD' in /home/[HIDDEN]/[HIDDEN]/[HIDDEN]/[HIDDEN]/cotm.php on line 4
Warning: mysql_connect(): Unknown MySQL Server Host 'DB_HOSTNAME' (1) in /home/[HIDDEN]/[HIDDEN]/[HIDDEN]/[HIDDEN]/cotm.php on line 4
connect failed: Unknown MySQL Server Host 'DB_HOSTNAME' (1)
(cotm.php)
Code: Select all
<?php
require('config.php');
mysql_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD) or die('connect failed: ' . mysql_error());
$sql = 'SELECT full_name, DATE_FORMAT(camaro_of_the_month,\'%M, %Y\') AS cotm_month_year, car_year, model, type, city, state_or_province, country, ride_id FROM '
. DB_FRIDES_RIDE . ',' . DB_FRIDES_OWNER
. ' WHERE ' . DB_FRIDES_RIDE . '.user_id=' . DB_FRIDES_OWNER . '.user_id'
. ' ORDER BY camaro_of_the_month DESC LIMIT 1';
$result = mysql_query($sql) or die('query failed: ' . mysql_error());
$row = mysql_fetch_assoc($result);
include('cotm.htm');
?>
NOTE: Due to this website being VERY well known, to resist hacking I've "[HIDDEN]" the logging in username/password of course.
Code: Select all
<?php
if(!defined('INCLUDE_CONFIG')) {
define('INCLUDE_CONFIG', true);
/* database connection */
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', '[HIDDEN]');
define('DB_PASSWORD', '[HIDDEN]');
/* database names */
define('DB_FRIDES', '[HIDDEN]_frides');
define('DB_PHPBB', '[HIDDEN]_phpBB2');
?>