Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

"unexpected T_IF " error after upgrading?


Print Track
hi i have a problem with my web site i have just upgraded my site to 6.01.9 .. So now i m re-adding somew codes about my mods etc.(for example youtube addon, [hide]bbc code ..) but after the upgrading these codes cause an error
the error in maincore.php is
"Parse error: parse error, unexpected T_IF in /home/*******/maincore.php on line 1
in viewthread
Parse error: parse error, unexpected T_IF in /home/*******/viewthread.php on line 1

and some similar errors in other files?? i didnt make any change in line 1
Do you know what is the reasons of these errors???

9 replies

can you please post the first few lines of maincore.php?
Of course beginning lines of maincore.php
<?php

/*---------------------------------------------------+

| PHP-Fusion 6 Content Management System

+----------------------------------------------------+

| Copyright © 2002 - 2006 Nick Jones

| http://www.php-fusion.co.uk/

+----------------------------------------------------+

| Released under the terms & conditions of v2 of the

| GNU General Public License. For details refer to

| the included gpl.txt file or visit http://gnu.org

+----------------------------------------------------*/

if (eregi("maincore.php", $_SERVER['PHP_SELF'])) die();


But i dont change anyth,ng in these lines.. i added some codes for show youtube videos in forum..
do you have any idea??
could it be there's a line break or whitespace between the "<?php" and the comment line?

it should look like
CodeDownload  
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (eregi("maincore.php", $_SERVER['PHP_SELF'])) die();

unfortunately no :( i compared with the older files everything is same but in v6.01.9 this(these) error/errors occur .. really very strange...
isnt there any idea_?
i need help why?
i know i am spamming but dont you think anything about this matter? or what does this error means??
You likely break the code when you add your mods. Test with core files and if the errors are gone using core files, then then look into the mod code you are trying to add.
author ercutombalak
forumOfficial Core Support - 6
replies10 posts
viewed2,408 times
activeLast updated on 12 years ago
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.