Topic on Project:Support desk

Wiki syntax error, unexpected

3
42.77.16.253 (talkcontribs)

My wiki after I LocialSettings.php into the root directory, the following message appears

"Parse error: syntax error, unexpected '<' in /home/a1330563/public_html/zh-tw/LocalSettings.php on line 147"

I check out my LocalSettings.php, line 147 is

<script type="text/javascript" src="http://stats.hosting24.com/count.php"></script>

I do not know what that means :(

88.130.115.236 (talkcontribs)

Hi!

That means that you made a mistake in that file, either in line 147 or somewhere before that. It tells you that the smaller-than sign is not allowed at that place.

The file must contain valid PHP code. But the line, which you posted is HTML with a JavaScript, which is no valid PHP code.

What did you want to do?

Ciencia Al Poder (talkcontribs)

I'm pretty sure you're on a free hosting service, which automatically adds scripts to the page to display ads, and it added that script when MediaWiki prompted you to download the generated LocalSettings.php file. If you're installing MediaWiki in such host, it will not work, because it will try to append that script in load.php URLs and will break scripts and styles of MediaWiki.

Reply to "Wiki syntax error, unexpected"