Helllo mr. php expert ( no sarcasm intended) i am trying to install a program called lightbox on my server. My server IS set up to handle php, and i'm pretty sure i followed everything exactly (all CHMOD commands) ...but i keep getting this error message when trying to install... ''Parse error: parse error, unexpected T_VARIABLE in /home/content/X/X/X/xxxx/html/xxxxx/photo_gallery/setupconfig.php on line 1'' Can someone please tell me what i am doing wrong, or what i need to do. Please note, my php is extremely limited. Thanks for your help.
There is a variable being called in line 1 that hasn't been set in your config file. Open that file up and fill all the fields. You can do that through notepad.
open the file in that directory.. its either there is no ; in line 1, need space after a line, etc.. anyways, post the code in that file...
ok .. first off.. this is why i love this place... you uys are all right there when i need ya .. THANK YOU!!! ....secondly .. line 1 is technically <?php .. so i'm imagining that you mean something else. below, are the first 30 lines of the 'CONFIG.PHP file (i'm guessing this is what you are refering to: <?php if ( isset($HTTP_POST_VARS['validate']) ) { $validate = @$HTTP_POST_VARS['validate']; } else { $validate = 0; } if ( isset($HTTP_POST_VARS['notify']) ) { $notify = @$HTTP_POST_VARS['notify']; } else { $notify = 0; } $notify_email = $HTTP_POST_VARS['notify_email']; $date_format = $HTTP_POST_VARS['date_format']; $cat_option = $HTTP_POST_VARS['cat_option']; $cols = $HTTP_POST_VARS['cols']; $rows = $HTTP_POST_VARS['rows']; $order_field = $HTTP_POST_VARS['order_field']; $direction = $HTTP_POST_VARS['direction']; if ( isset($HTTP_POST_VARS['dis_gallery']) ) { $dis_gallery = @$HTTP_POST_VARS['dis_gallery']; } else { ...please remember, my php is not good!!! and thirdly ... bartolay .. love your quote!!! .. good stuff!
that's regular 'config' this is 'SetUpConfig.php': <?php $dbconfig_file= "./config/dbconfig.inc.php"; $config_file = "./config/config.inc.php"; $logo_image= "./images/logo.gif"; $DATABSECREATEFILE= "./database.sql"; $title_color= "#FF8000"; //setup pageid $SetupWelcomePageId= 300; $SetupHostInfoPageId= 301; $SetupDBInfoPageId= 302; $SetupImageDirPageid= 303; $SetupConfirPageId= 304; $SetupExecuteSetup= 305; $SetupSuccessfullyPageId= 306; ?>
As far as I can see, there is no problems with your setupconfig.php (so it is strange that it says that there is an unexpected T_VARIABLE). Is that the only setupconfig.php on your website? Because, there's no errors in it. Maybe try to change the code to: <? $dbconfig_file = "./config/dbconfig.inc.php"; $config_file = "./config/config.inc.php"; $logo_image = "./images/logo.gif"; $DATABSECREATEFILE = "./database.sql"; $title_color = "#FF8000"; //setup pageid $SetupWelcomePageId = 300; $SetupHostInfoPageId = 301; $SetupDBInfoPageId = 302; $SetupImageDirPageid = 303; $SetupConfirPageId = 304; $SetupExecuteSetup = 305; $SetupSuccessfullyPageId = 306; ?> PHP: The error, unexpected T_VARIABLE is normally when you have forgot an ; (closing mark) or got too less or too many curly end-braces '}'.