"PHP: syntax error, unexpected '!' in C:\xampp\php\php.exe

Problems with the Windows version of XAMPP, questions, comments, and anything related.

"PHP: syntax error, unexpected '!' in C:\xampp\php\php.exe

Postby wdeda » 21. November 2021 02:00

Hi!
I am getting the following error message from PHP when, for example, I check which version is installed(php -v):
"PHP: syntax error, unexpected '!' in C:\xampp\php\php.exe on line 1"

I can no longer use Composer, PHP Spark, etc.
wdeda
 
Posts: 2
Joined: 21. November 2021 01:39
XAMPP version: 8.0.12.0
Operating System: Windows 10

Re: "PHP: syntax error, unexpected '!' in C:\xampp\php\php.

Postby Nobbie » 21. November 2021 10:54

Did you install 64bit version into 32bit Windows?
Nobbie
 
Posts: 13177
Joined: 09. March 2008 13:04

Re: "PHP: syntax error, unexpected '!' in C:\xampp\php\php.

Postby wdeda » 21. November 2021 14:14

Of course not! The installation setup itself would prevent it.
wdeda
 
Posts: 2
Joined: 21. November 2021 01:39
XAMPP version: 8.0.12.0
Operating System: Windows 10

Re: "PHP: syntax error, unexpected '!' in C:\xampp\php\php.

Postby Nobbie » 21. November 2021 14:22

wdeda wrote:Of course not! The installation setup itself would prevent it.


It depends - if you simply installed a ZIP Package, nothing would prevent it.
As i dont know anything about your installation, its very difficult to find a reason. Finally, your hard disk may have crashed or a Virus destroyed your installation.
Nobbie
 
Posts: 13177
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 215 guests