500 Error, no page working

I have a 500 error on my clients server –
– the server has PHP Version 7.3.6-1+ubuntu18.10.1+deb.sury.org+1
– rewrite engine is on
– error log file says:

[Thu Jul 04 13:03:54.401996 2019] [fcgid:warn] [pid 16053] [client] mod_fcgid: stderr: PHP Parse error: syntax error, unexpected end of file in /var/www/clients/client175/web409/web/kirby/vendor/composer/ClassLoader.php on line 159

Website is working fine on my personal server. (Same PHP Version)
I re-uploaded the whole page again, not working.

Any ideas?

Hm, that error message doesn’t make much sense. Is there some stack trace?

I don’t suppose you built the site on windows? Might be a file encoding / line ending issue going from there to linux. Just a hunch.

No – website is built in mac… and there is no stack trace – one line for every request…

Are you using PHP short tags in your code? <? ?> instead of <?php ?> or something like that?

Are you sure you havent closed a PHP tag somewhere silly? Maybe flush out all the composer stuff and reinstall via composer again.

I use <?= ?> instead of <?php echo ?>, and ->kt() instead of ->kirbytext() and so on, but no <? ?>

Gonna try that. But anyway, if I deploy the website on my personal server, the site is working fine – there would be also a 500 Error if I havent closed a PHP tag, no?

Yes, definitely.

Unless maybe you have a closing tag where there shouldn’t be one (in PHP only files), don’t know if that can result in 500 errors like that

I downloaded the CMS from your website again, did no changes und uploaded it. The error log says:

[Thu Jul 04 14:14:50.284776 2019] [fcgid:warn] [pid 8868] [client] mod_fcgid: stderr: PHP Parse error: syntax error, unexpected '/' in /var/www/clients/client175/web409/web/kirby/vendor/composer/ClassLoader.php on line 159

It has to be a server issue. I called the support, they don’t know what to do.

Oh, the error has changed now, but that doesn’t make it any better.

Can you switch to another PHP version?

Yes, I changed to 7.2, not any better. I’m gonna change the server since they are not very supportive. Thanks a lot for your help, appreciate it!

Maybe it helps someone in the future: The upload via ftp client (Transmit) was faulty on this server. Never had any problems with this application and using it since years. It finally worked with FileZilla, but I had to reset the permissions on some files / folders. Anyway, seems to be a server side issue.

I think probably that Transmit was set to auto for the transfer, which means it guesses how to send it to the server. Certain kinds of files need to be sent different. I suspect Filezilla was explicitly set.

Hm, I’ve been using Transmit for years with file transfer set to auto and never ran into any issues. There were only some very rare cases where I had to set transfer to binary, and all of them were not related to Kirby.

Well me too, and its always been fine, but that was only thing i could that would cause Filezilla to work when Transmit failed.