FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » admsmiley.php parse error
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
admsmiley.php parse error [message #6465] Sun, 13 October 2002 09:36 Go to next message
Willem_M is currently offline  Willem_M   Belgium
Messages: 3
Registered: October 2002
Location: Belgium
Karma: 0
Junior Member
I'm using FUDforum 2.3.2.
(installed it about 2 weeks ago).

When I want to go the the "smiley manager", I get
the error message:
parse error in ".../forum/adm/admsmiley.php" in line 217.

When I open this file in Notepad, it seems to be the last line
where it says require('admclose.html').

The admclose.html contains some closing tags:
</td></tr></table></body></html>

I noticed however that just before the "require" line in admsmiley.php I see a </table> closing tag. So this is probably why we get the parse error (as the first 3 closing tags of admclose.html are not needed ?).

How do I fix this ?
Or should I just load the latest development version ?
Re: admsmiley.php parse error [message #6477 is a reply to message #6465] Mon, 14 October 2002 16:50 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Cannot replicate the bug using version 2.3.2, looks like you got a corrupt file. Try upgrading to next dev version.

FUDforum Core Developer
icon3.gif  Re: admsmiley.php parse error [message #6507 is a reply to message #6477] Tue, 15 October 2002 15:20 Go to previous messageGo to next message
Willem_M is currently offline  Willem_M   Belgium
Messages: 3
Registered: October 2002
Location: Belgium
Karma: 0
Junior Member
Hi,

I upgraded to the 2.3.3RC1 version with the update script.
Still the same problem (and now I checked the MD5 sum).

But I did some more testing and I found the cause !! Very Happy

I started to check if any other page had the same problem, and came accross some other pages with the same problem (parse errors) or with garbled table lists (you could see part of php-code inside tables !).
Then I had the wonderful Idea to check the "View source" in my browser, and what did I see: some <? and ?> tags, and I had short tags disabled in my php.ini file !!!!!!

So this is the problem:
You have used some SHORT TAGS in several (admin) pages !!

    Some of the affected pages are:
  • adm/admreplace.php (gives parse error)
  • adm/admsmiley.php (gives parse error)
  • install.php ??? (see below)


I think also the install.php is affected, as I also discovered the following error when I want to load the Theme Manager page:
FATAL ERROR: _vti_conf/locale not a file in .../forum/priv/thm/default/i18n, can't open
Any help on how to resolve this would be appreciated !

    So my conclusion:
  • Add a check in your install.php to see if the PHP has "short_tags" enabled and abort if not (temporary solution)
  • (Better solution IMO) Remove all short tags and use the standard tags (as short tags and XML will not work together very well).
    I suggest you disable yourself the short tags on your test system and see what errors you get Very Happy Very Happy



The very young do not always do as they are told
The Nox
Re: admsmiley.php parse error [message #6511 is a reply to message #6507] Tue, 15 October 2002 15:39 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Thanks for noticing the short tags inside the adm/ scripts. I wrote a utility to check files for them and found them in few other scripts inside adm/. I've already corrected those scripts in the CVS so next release will be completely short tag free.

The install and upgrade contain the '<?' in them but they are not actually used in the source. They are used to replace the encoded
RAW_PHP_OPEN_TAG in the archive with '<?'.

The other error is very unusual because it seems the forum is trying to open a file inside _vti_conf/, which is a directory made by frontpage extensions. When exactly does this problem occur?


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: incorrect titles on Polish buttons
Next Topic: notification emails
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 16:33:04 GMT 2024

Total time taken to generate the page: 0.02762 seconds