C
C
corpsedevour2014-11-15 06:33:42
PHP
corpsedevour, 2014-11-15 06:33:42

Why does the site work on the local machine, but not on the hosting?

Parse error: syntax error, unexpected '}' in /home/u550203487/public_html/plugins/system/helix/features/totop.php on line 1 after uploading to hosting.
In the line of the file, this is:
<?php
Instead of a site, a white sheet and site menu items in a column.
Why does it work on a local machine, but not on a hosting?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
Sergey Lerg, 2014-11-15
@corpsedevour

Are you using FileZilla? If the hoster allows, then find this file in the web interface (admin panel), open it and paste the contents from the local file in the browser. Most likely something is wrong with the FileZilla settings - maybe you need to force the encoding to UTF-8 or force the server type to be unix.
Or upload files using the web interface. Usually you can download a ZIP archive and unpack it on the server.

W
WEB_champion, 2014-11-15
@WEB_champion

It usually happens to almost everyone at first. And whether the data for connection of a DB is correctly added?
And there must also be the correct encoding, that is, UTF-8 must be written in the header and the files themselves must be in UTF-8 encoding, this can be easily done in the editor.

D
Denis Rybin, 2014-11-15
@RybinDen

Syntax error, on the right curly brace. Rewrite file in utf-8 encoding

U
ukoHka, 2014-11-15
@ukoHka

Perhaps different versions of PHP.

F
FanatPHP, 2014-11-15
@FanatPHP

The question is stupid.
If there is an error, then what is the point of asking why the hosting does not work? The error is the answer why.
Another thing is that the error looks strange. It feels like it's not from this site at all.
In general, you need to re-upload the files, make sure that all errors are logged, and look in the error log. If he persistently writes the same error about the same file - look at its contents on the host, and not on the local machine

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question