Page 1 of 1

Parse error: syntax error, unexpected end of file

PostPosted: 02. March 2015 23:24
by Strokerace
I have used Xampp on and off over the years. I am a web developer and all my files work on my servers. Seeing my servers only have php 5.3 on them and I needed php5.4 or higher, I decided to use Xampp to test facebook new php-sdk4.0. I installed xampp 5.5.19 on windows 7. Put all my files in the htdocs and in a seperate fold for my site. When I open the url in my browser, I keep getting Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\public_html\index.php. I can tell you the code is correct. It works on a server with php5.5 running on the server. I believe the issue is with Xampp. I have also searched google and tried a lot of suggestions and still have the error. Anyone have a suggestion.

Re: Parse error: syntax error, unexpected end of file

PostPosted: 03. March 2015 00:21
by Altrea
Strokerace wrote:I can tell you the code is correct.

I can tell you, it is not. The PHP interpreter is not telling lies.
There is something in the code (a missing bracket or something like that) that php is still expecting another piece of code until end of file.

Re: Parse error: syntax error, unexpected end of file

PostPosted: 03. March 2015 02:55
by Strokerace
If it wasn't correct, then why does it work on a server? Have the code running on 5 different servers. Please, the missing bracket line has been investigated already. I am not new to php, been using it for 15 year.

Re: Parse error: syntax error, unexpected end of file

PostPosted: 03. March 2015 16:31
by Altrea
"works on the server" was never a qualified exclusion criterion for working code.
server configurations may be different. For example, maybe your code requires a very specific value of a PHP-Setting like short_open_tag which is not set by default.
At the end your parser is missing something and a person with your knowledge (15 years of php programming experience) should be able to fix that (or identifying the true reason) in a few minutes of debugging.

Re: Parse error: syntax error, unexpected end of file

PostPosted: 03. March 2015 19:43
by Strokerace
I work off of w3c. I used current values that are the standards. Those who don't end up having security problems. The issue is not with the code, its with a poorly made package by a halfwit that has no clue how to code.

Re: Parse error: syntax error, unexpected end of file

PostPosted: 03. March 2015 20:00
by Altrea
Strokerace wrote:The issue is not with the code, its with a poorly made package by a halfwit that has no clue how to code.

Feel free to use something different than XAMPP. I simply don't care and will not feed the the trolls anymore 8)