Jump to content

Baffling T string error in my code. Did work fine. PHP upgrade problem maybe?


and1c

Recommended Posts

ok guys. Ive got a large php script based site that I have heavily customised and I have recently found an error when using one of the menu functions.

It should take the user to their personal message box (its not a forum)

 

Parse error: syntax error, unexpected T_STRING in /blablabla/myfile.php on line 18

 

it used to work fine and all I can think of is it might be due to an upgrade a while ago from php 4.xx to 5.1.6

 

I remember I did have a problem with long array variables and a php.ini tweak sorted it.

 

Im not at all sure what is causing this though as T string error is for incorrect syntax as far as I recall and the syntax seems to be fine (to me!)

 

All help appreciated

 

Here is the code surrounding line 18 *which is bolded*

 

}

if($HTTP_POST_VARS['company_id']) {

    $companyid = $HTTP_POST_VARS['company_id'];

}

elseif($HTTP_GET_VARS['company_id']) {

    $companyid = $HTTP_GET_VARS['company_id'];

} //Line 18 is here

else {

    $companyid='0';

}

if ($HTTP_GET_VARS['f']) {

  $item_from=$HTTP_GET_VARS['f'];

  $item_to=$item_from+NR_DISPLAY;

 

 

Do I need to change something else in php.ini?

The rest of the site is 100% functional so I cant understand this?!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.