and1c Posted July 16, 2007 Share Posted July 16, 2007 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?! Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 16, 2007 Share Posted July 16, 2007 try switching all the $HTTP_GET_VARS to $_GET Quote Link to comment Share on other sites More sharing options...
and1c Posted July 16, 2007 Author Share Posted July 16, 2007 try switching all the $HTTP_GET_VARS to $_GET Thanks for the suggestion toonmariner I will try this. Quote Link to comment Share on other sites More sharing options...
and1c Posted July 16, 2007 Author Share Posted July 16, 2007 Well, I changed all instance of the variable in this file and I am unfortunately getting the same error (but no extra ones!) Hmm Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 16, 2007 Share Posted July 16, 2007 indeed it is baffling - can you post the whole script? Quote Link to comment Share on other sites More sharing options...
and1c Posted July 16, 2007 Author Share Posted July 16, 2007 indeed it is baffling - can you post the whole script? The whole script is over 500 files and 40 mb but I can post the entire code form that part of the script if thats what you mean? thanks Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 16, 2007 Share Posted July 16, 2007 everything before that would be great. 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.