Need a PHP Programmer to tell me what this is:

Discussion in 'PHP' started by Motelsex, Jan 8, 2009.

  1. #1
    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.
     
    Motelsex, Jan 8, 2009 IP
  2. qualityfirst

    qualityfirst Peon

    Messages:
    147
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    0
    #2
    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.
     
    qualityfirst, Jan 8, 2009 IP
  3. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #3
    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...
     
    bartolay13, Jan 8, 2009 IP
  4. Motelsex

    Motelsex Peon

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    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!
     
    Motelsex, Jan 8, 2009 IP
  5. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #5
    is that "setupconfig.php" or "config.php" ?
     
    crath, Jan 8, 2009 IP
  6. Motelsex

    Motelsex Peon

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    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;
    ?>
     
    Motelsex, Jan 8, 2009 IP
  7. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #7
    Please link me to the version of lightbox you downloaded and I will look into it.
     
    crath, Jan 8, 2009 IP
  8. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #8
    I need the link to the download for the script, not your installation.
     
    crath, Jan 10, 2009 IP
  9. elias_sorensen

    elias_sorensen Well-Known Member

    Messages:
    852
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    110
    #9
    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 '}'.
     
    elias_sorensen, Jan 10, 2009 IP