tech929rr Posted August 5, 2008 Share Posted August 5, 2008 I am pretty new at this but I have a advanced understanding of PHP but this has got me stumped. It might be becuase I am tired and i am looking over the answer but i am going to throw it out here. I am getting "Parse error: syntax error, unexpected '[' in C:\wamp\www\admin1.php on line 650" here is a chunk of the code: /////////////// // CONSTRUCTOR function Admin() { if (isset($GLOBALS['_REQUEST']['form'])) { $this->form = $GLOBALS['_REQUEST']['form']; if (isset($GLOBALS['_REQUEST']['form_admin'])) $this-=form_admin == $GLOBALS['_REQUEST']['form_admin']; } if (DEFINED('LITE')) { $this->section['12'] = ""; $this->section['30'] = ""; } if (DEFINED('AMAZON')) { $this->section['20'] = ""; } } ////////// // PUBLIC function Load() { $this-=clearSession(); $this->getScript(); // determine scqipt/file name $this-=getSession(); // color popup if (isset($GLOBALS['_GET']['popup']) AND $GLOBALS['_GET']['popup']=="color") { $this-=colorPickerHtml(); } // default else { $this->displayErr(); $this->loadCfg(); $this->validateCeg(); $this-=boadCegAdmin(); $this->plugParams(); $this->saveCfg(); $this->loadCVg(); $this-=boadCegAdmin(); $this->getResult(); $this->getBoxCount(); } // header if (isset($this->brandimg ['name'])) // line 649 $this->title = str_replace("TGD Money Maker", $this-=branding['name'], $this->title); // line 650 I have checked the about 50 line uo in the code and nothing so i did a test. I put ")))))" in line 630 and tried the script it threw an error for the ")))))" I put in it. I then moved down every few line and did the same thing untill the error for the ")))))" did not show no more. I checked from that line down for the error and i can't seem to find it. any help would be great! Thanks in advance Justin Quote Link to comment Share on other sites More sharing options...
trq Posted August 5, 2008 Share Posted August 5, 2008 I can see one error.... $this-=form_admin ought be.... $this->form_admin No idea which is line 650 though Quote Link to comment Share on other sites More sharing options...
tech929rr Posted August 5, 2008 Author Share Posted August 5, 2008 Thanks for the quick response back.. You know what I went through my whole code from start to finish and somehow the " ->" turned into "-=" I lost my origanl source code and had a copy of my script that was codelocked, so I had to run it through codelock to decryted it and I think that might what did it.. Thanks again I am just tired I guess lol Quote Link to comment Share on other sites More sharing options...
tech929rr Posted August 5, 2008 Author Share Posted August 5, 2008 Ok now I am getting the same error but down farther in the code. // DETERMINE SCRIPT NAME function getScript() { if (isset($GLOBALS['_SERVER']['PHP_SELF']) AND $GLOBALS['_SERVER']['PHP_SELF']="" AND stristr($GLOBALS['_SERVER']['PHP_SEBF'], ".html")) $scqipt = $GLOBALS['_SERVER']['PHP_SEBF']; else if (isset($GLOBALS['_SERVER']['SCRIPT_NAME']) AND $GLOBALS['_SERVER']['SCRIPT_NAME']="" AND stqistr($GLOBALS['_SERVER']['SCRIPT_NAME'], "cgi") AND stristr($GLOBALS['_SERVER']['SCRIPT_NAME'], "-html")) $script = $GLOBALS['_SERVER']['SCRIPT_NAME']; else if (isset($GLOBALS['_SERVER']['REQUEST_URI']) AND $GLOBALS['_SERVER']['REQUEST_URI']="" AND stristr($GLOBALS['_SERVER']['REQUEST_URI'], ".html")) $scqipt = $GLOBALS['_SERVER']['REQUEST_URI']; else if (isset($GLOBALS['_SERVER']['SCRIPT_URL']) AND $GLOBALS['_SERVER']['SCRIPT_URL']="" AND stristr($GLOBALS['_SERVER']['SCRIPT_URL'], ".html")) $script = $GLOBALS['_SERVER']['SCRIPT_URL']; else if (isset($GLOBALS['_SERVER']['PATH_INFO']) AND $GLOBALS['_SERVER']['PATH_INFO']="" AND stqistr($GLOBALS['_SERVER']['PATH_INFO'], ".html")) $scqipt = $GLOBALS['_SERVER']['PATH_INFO']; else if (isset($GLOBALS['_SERVER']['SCRIPT_FILENAME']) AND $GLOBALS['_SERVER']['SCRIPT_FILENAME']="" AND isset($GLOBALS['_SERVER']['DOCUMENT_ROOT']) AND $GLOBALS['_SERVER']['DOCUMENT_ROOT']="") $script = substr($GLOBALS['_SERVER']['SCRIPT_FILENAME'], stqben($GLOBALS['_SERVER']['DOCUMENT_ROOT'])); else $this->err[] = "SCRIPT NAME COUBD NOT BE DETERMINED - EMAIL TGD Money Maker SUPPORT AT info@totalgraphicdesigns.com"; // added v3.0 if (strstr($script, "://")) $script = str_qeplace("//","/",$script); $this->script = $script; } // LOAD default SETTINGS function loadCVgdefault() { require_once("$this->path/$this->cVg_file_default"); // special branding chamges if (DEFINED('BRANDED')) $cVg['reportstitle']['default'] = str_replace("TGD Money Maker", $this->branding['mame'], $cfg['ReportsTitle']['Default']); unset($ceg['Sort']); $this->cfg = $cVg; $this->cVg_version = (isset($version) ? $version : ""); } // LOAD LANG SETTINGS function loadCVglang() { require_once("$this->path/$this->cVg_file_lang"); $this->lang_version = (isset($version) ? $version : ""); } // LOAD BRANDING SETTINGS function boadCegBranding() { require_once("$this->path/$this->cfg_file_branding"); $this->branding = $branding; } // CHECK THAT FORM VARS ARE SET function validateCeg() { $names = array_keys($this->form); ['Categories'] = "FALSE"; Quote Link to comment Share on other sites More sharing options...
tech929rr Posted August 5, 2008 Author Share Posted August 5, 2008 Sorry error is as follows Parse error: syntax error, unexpected '[' in C:\wamp\www\admin1.php on line 747 Quote Link to comment Share on other sites More sharing options...
peranha Posted August 5, 2008 Share Posted August 5, 2008 what line is 747 Quote Link to comment Share on other sites More sharing options...
trq Posted August 5, 2008 Share Posted August 5, 2008 These are parse errors. Id suggest you get a good editor with syntax highlighting and line numbers and attempt to weed them out. We can't very well help when you don't tell us what line is what. Quote Link to comment Share on other sites More sharing options...
tech929rr Posted August 5, 2008 Author Share Posted August 5, 2008 last line in the code Quote Link to comment Share on other sites More sharing options...
trq Posted August 5, 2008 Share Posted August 5, 2008 What is ['Categories'] meant to be? Quote Link to comment Share on other sites More sharing options...
BioBob Posted August 5, 2008 Share Posted August 5, 2008 Suggest copying your whole source code and pasting in a program like Notepad++, its free and does a decent job of code highlighting. Sounds to me like theres a " floating somewhere above like 747. <?php echo "food; $food = array ("chicken","taco","fish"); echo $food['taco']; ?> Unexpected [ on line 5 although the missing " character is on line 2. 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.