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?!

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.