Hey, first time here.

I am getting parse errors on my Digital Ocean Apache server, but not on my local XAMPP server. I checked the PHP versions, and they are both PHP 7. The error states, “Parse error: syntax error, unexpected ’”’, expecting ’-’ or identifier (TSTRING) or variable (TVARIABLE) or number (TNUMSTRING) in /var/www/[mywebsite]/index.php on line 44". I get no errors whatsoever on my local server, even thought the code is the exact same! I checked the other pages on the site, and the ones without PHP code work flawlessly (just a PHP issue). I am at a loss. Any help is appreciated. Thank you!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello, @ryanmichaelcurry

Can you paste the content of the index.php file so we can check it for you? You can review the code and make sure that you have ; at the end of each statement as well.

Regards,
Alex

Submit an Answer