jstinehelfer Posted December 2, 2008 Share Posted December 2, 2008 Help I am not a coder, been learning bits and pieces here. I purchased a script from an online website to find error in the config.php file. I have installed other php scripts many times with plenty of success. I have emailed for support with no luck after a week. Me the sucker out some serious money now. But here it goes. Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/pcdeskt1/public_html/member/config.php on line 15 config.php file // I deleted db username password etc for security purposes. <?php $connect_string = 'localhost'; $connect_username = 'xxxxx_xxxx'; $connect_password = 'xxxxx'; $connect_db = 'xxxxxx_xxxxxx'; $link =mysql_connect($connect_string, $connect_username, $connect_password) or die("Connection Failed"); mysql_select_db($connect_db) or die("Database selection failure"); $gff = mysql_query("SELECT * FROM affiliate_settingspcor die(mysql_error()); $gffF = mysql_fetch_array($gff); // site variables $site_name = $gffF['site_name']; $site_url = $gffF['site_url']; $admin_email = $gffF['admin_email']; $title =$gffF['title']; $keywords =$gffF['keywords']; $description = $gffF['description']; $copyright = $gffF['copyright']; $manual = $gffF['manual']; //$currency = $gffF['currency']; $symbol = $gffF['symbol']; $usd_symbol='$'; $gbp_symbol='£'; $euro_symbol='€'; $today=date("Y-m-d"); $ip=$_SERVER['REMOTE_ADDR']; ?> Its not liking the site variables for some reason. Added code tags ~ CV Link to comment https://forums.phpfreaks.com/topic/135251-solved-parse-error/ Share on other sites More sharing options...
DarkWater Posted December 2, 2008 Share Posted December 2, 2008 Please post any code in tags so it's readable. Also, it has a syntax highlighter so it makes spotting some errors very easy. <?php $connect_string = 'localhost'; $connect_username = 'xxxxx_xxxx'; $connect_password = 'xxxxx'; $connect_db = 'xxxxxx_xxxxxx'; $link =mysql_connect($connect_string, $connect_username, $connect_password) or die("Connection Failed"); mysql_select_db($connect_db) or die("Database selection failure"); $gff = mysql_query("SELECT * FROM affiliate_settingspcor die(mysql_error()); $gffF = mysql_fetch_array($gff); // site variables $site_name = $gffF['site_name']; $site_url = $gffF['site_url']; $admin_email = $gffF['admin_email']; $title =$gffF['title']; $keywords =$gffF['keywords']; $description = $gffF['description']; $copyright = $gffF['copyright']; $manual = $gffF['manual']; //$currency = $gffF['currency']; $symbol = $gffF['symbol']; $usd_symbol='$'; $gbp_symbol='£'; $euro_symbol='€'; $today=date("Y-m-d"); $ip=$_SERVER['REMOTE_ADDR']; ?> EDIT: See? That gigantic block of red is not good. =P Try changing your code to: <?php $connect_string = 'localhost'; $connect_username = 'xxxxx_xxxx'; $connect_password = 'xxxxx'; $connect_db = 'xxxxxx_xxxxxx'; $link =mysql_connect($connect_string, $connect_username, $connect_password) or die("Connection Failed"); mysql_select_db($connect_db) or die("Database selection failure"); $gff = mysql_query("SELECT * FROM affiliate_settings") or die(mysql_error()); $gffF = mysql_fetch_array($gff); // site variables $site_name = $gffF['site_name']; $site_url = $gffF['site_url']; $admin_email = $gffF['admin_email']; $title =$gffF['title']; $keywords =$gffF['keywords']; $description = $gffF['description']; $copyright = $gffF['copyright']; $manual = $gffF['manual']; //$currency = $gffF['currency']; $symbol = $gffF['symbol']; $usd_symbol='$'; $gbp_symbol='£'; $euro_symbol='€'; $today=date("Y-m-d"); $ip=$_SERVER['REMOTE_ADDR']; ?> Link to comment https://forums.phpfreaks.com/topic/135251-solved-parse-error/#findComment-704469 Share on other sites More sharing options...
dirtyfrenchman Posted December 3, 2008 Share Posted December 3, 2008 $gff = mysql_query("SELECT * FROM affiliate_settingspcor die(mysql_error()); needs to be $gff = mysql_query("SELECT * FROM affiliate_settings") or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/135251-solved-parse-error/#findComment-704478 Share on other sites More sharing options...
jstinehelfer Posted December 3, 2008 Author Share Posted December 3, 2008 Thank you so much, That did the trick just fine. I thank you again for your wisdom. Link to comment https://forums.phpfreaks.com/topic/135251-solved-parse-error/#findComment-704542 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.