-1

I added a function to functions.php (that was previously working) and updated it in the server using filezilla. There was a syntax error outside of my function.

Then, to solve the issue, i changed the functions.php for i copy that i had of a previously working version. But there were syntax errors there too.

Then i returned to my new version and to the backup. Both had sintax errors, but different ones.

I don't understand what is happening. It should work with the backup, or at least throw the same syntax error every time. My thoughts are that Filezilla is corrupting the file or something like that when it uploads it

¿What could be the reason for this errors?

Truca
  • 195
  • 2
  • 10
  • Without the actual code we can't help you... and learn how you can fix syntax errors [here](http://stackoverflow.com/q/18050071/5914775). – Tom Udding Mar 26 '17 at 13:09
  • I don't think that the code has the errors, i think that is filezilla that is causing them, that's why i didn't put any code. The current error is Parse error: syntax error, unexpected end of file in /home/iaspmalc/public_html/wp-includes/functions.php on line 5245 but the file has 5677 lines – Truca Mar 26 '17 at 13:15
  • Set binary (instead of text mode) for FTP transfers in FileZilla. And if you haven't already, remove closing PHP tag `?>` at the end of the file, for reasons see this answer [Why would one omit the close tag?](http://stackoverflow.com/a/4499749/111433). – Igor Jerosimić Mar 26 '17 at 13:32

1 Answers1

0

At the end, the problem was Filezilla. It was transfering the file wrong. had to retry many times but at the end it solved it

Truca
  • 195
  • 2
  • 10