Pages work on localhost - but not on server?

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
aidandon
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Oct 16, 2020 7:02 pm

Pages work on localhost - but not on server?

Post by aidandon » Sat Oct 17, 2020 7:06 pm

Hi all,

I have a version of Joomla 3.9 running on my machine locally - all works perfectly here.

However, when I port it to my server and try to access some pages such as contact, it throws an error:

An error has occurred while processing your request.
#0 syntax error, unexpected 'version' (T_STRING)

Is there any specific reasoning to why this would be? Accessing the same url locally works successfully.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 9698
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: "syntax error, unexpected 'version' (T_STRING)": Pages work on localhost - but not on server?

Post by sozzled » Sat Oct 17, 2020 7:28 pm

As a general principle, the error message "syntax error, unexpected 'version' (T_STRING)" indicates that some PHP script is syntactically incorrect with the version of PHP used on the target environment. It could be as simple as a missing semi-colon at the end of a PHP statement. ;)

In order to understand the cause of the issue, it is necessary to enable J!'s "debug mode". When you have enabled debug mode, you should be able to find the source of the problem.

I hope that helps. 8)
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)


Post Reply

Return to “General Questions/New to Joomla! 3.x”