Lana Taylor Posted July 30, 2008 Share Posted July 30, 2008 My friend bought this website from another hosting company, but when I moved it over to my servers, the website would not work or should I say display online. The error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/ed/public_html/config.php on line 15 Is it that my hosting company does not have the relevant PHP modules to run on my servers? Any help would be much appreciated. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted July 30, 2008 Share Posted July 30, 2008 You would really need to post the relevant code to get the quickest answer. Quote Link to comment Share on other sites More sharing options...
Lana Taylor Posted August 4, 2008 Author Share Posted August 4, 2008 <?php if ( !defined( 'SMARTY_DIR' ) ) { include_once( 'init.php' ); } if ($_SESSION['AdminId'] > 0) { header('location: admin/index.php'); exit; } if ($_SESSION['UserId'] <= 0 && $_GET['page'] == 'login' && isset($_COOKIE[$config['cookie_prefix'].'osdate_info']) ) { $cookie = $_COOKIE[$config['cookie_prefix'].'osdate_info']; $_SESSION['txtusername'] = $cookie['username']; $_SESSION['txtpassword'] = $cookie['dir'] ; $_SESSION['rememberme'] = true; list($_SESSION['lookagestart'], $_SESSION['lookageend'])= split(':',$cookie['search_ages']); if ($cookie['username'] != "") { if ( !$_GET['errid'] ) { header("location: midlogin.php"); exit; } Above is the first 16 lines of the index page, does this help or do you need more info? Cheers, Lana. Quote Link to comment Share on other sites More sharing options...
Lana Taylor Posted August 6, 2008 Author Share Posted August 6, 2008 Can anyone help with the above problem ? Would really appreciate it, as PHP is not my forte - Obviously! Lana Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 6, 2008 Share Posted August 6, 2008 The posted code does not trigger the stated error. We would need more information to provide any help with the problem. Quote Link to comment Share on other sites More sharing options...
Lana Taylor Posted August 8, 2008 Author Share Posted August 8, 2008 Thanks for your reply. Can you tell me what info you need /where to look for the error. Regards Lana. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted August 8, 2008 Share Posted August 8, 2008 The error is in file config.php, not the index.php file. Please post the first 20 lines of config.php between tags. Ken Quote Link to comment Share on other sites More sharing options...
Lana Taylor Posted August 9, 2008 Author Share Posted August 9, 2008 Please post the first 20 lines of config.php between tags. Ken Cheers Ken, Is this what you need? Regards, Lana. // Error Message Codes // --------------- define ('USERNAME_BLANK','1'); define ('PASSWORD_BLANK','2'); define ('FIRSTNAME_REQUIRED','4'); define ('LASTNAME_REQUIRED','5'); define ('EMAIL_REQUIRED','6'); define ('CITY_REQUIRED','7'); define ('ZIP_REQUIRED','8'); define ('FIRSTNAME_LENGTH','11'); define ('LASTNAME_LENGTH','12'); define ('EMAIL_LENGTH','13'); define ('CITY_LENGTH','14'); define ('PASS_CONFIRMPASS', '18'); define ('MANDATORY_FIELDS', '20'); define ('INVALID_LOGIN','21'); define ('USERNAME_EXISTS', '22'); define ('WRONG_OLD_PASSWORD','23'); define ('EMAIL_EXISTS','25'); define ('NOT_ACTIVE', '26'); define ('NO_MESSAGE','27'); define ('UNSUPPORTED_FILE_FORMAT','29'); define ('QUESTION_ON_TOP','30'); define ('QUESTION_AT_BOTTOM','31'); define ('NOT_YET_APPROVED','35'); define ('ACCOUNT_SUSPENDED', '36'); define ('SUBMISSION_DECLINED', '37'); Quote Link to comment Share on other sites More sharing options...
Lana Taylor Posted August 9, 2008 Author Share Posted August 9, 2008 Oops ! think it should be this: <?php define( 'VERSION', '1.1.10' ); /* ----------- DB Settings ----------- */ define( 'DB_USER', 'govan' ); define( 'DB_NAME', 'dating' ); define( 'DB_HOST', 'localhost' ); define( 'DB_PASS', randango7' ); define( 'DB_TYPE', 'mysql' ); define( 'DB_PREFIX', 'osdate' ); // ------------- // Mail settings // ------------- // text|html define( 'MAIL_FORMAT', 'text' ); //mail|sendmail|smtp define( 'MAIL_TYPE', 'mail' ); define( 'SMTP_HOST', 'localhost' ); define( 'SMTP_PORT', '25' ); define( 'SMTP_AUTH', '0' ); define( 'SMTP_USER', '' ); define( 'SMTP_PASS', '' ); define( 'SM_PATH', '/usr/sbin/sendmail' ); Thanks again, Lana. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted August 9, 2008 Share Posted August 9, 2008 You missed a ' on this line: define( 'DB_PASS', randango7' ); It should be: define( 'DB_PASS', 'randango7' ); A syntax highlighter helps a lot in coding PHP. Quote Link to comment Share on other sites More sharing options...
Lana Taylor Posted September 4, 2008 Author Share Posted September 4, 2008 This fixed the problem. Thank you very much DW, you are a star ! [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
DarkWater Posted September 4, 2008 Share Posted September 4, 2008 This fixed the problem. Thank you very much DW, you are a star ! Wow I posted that almost a month ago. You were still having that problem? o_O Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.