I am trying to install Nette2.3.1 using Composer (on XAMPP). In c:\x\php folder I run this command:
composer create-project nette/sandbox myprojectname
When I do this, getting following error:
[Seld\JsonLint\ParsingException] "c:\x\php\php.exe" does not contain valid JSON Parse error on line 1: MZÉ ♥ ♦ ╕ ^ Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
I tried all these options to no avail:
- removed the project directory and tried
- ran this command inside htdocs folder
- ran this through PHP JetBrains console
- made sure that the Composer version is the latest one
What was wrong?
This was what went wrong:
I installed xampp while anti-virus is running - i got a warning but chose to ignore that. Consequently php.exe was corrupted and messed up the whole thing for me.
PATH variables under my user wasn't updated with php.exe path. Though system variable is updated, it is still a mystery to me why this became an issue.
How I did to correct this:
Removed xampp altogether, cleared composer cache and installed wamp this time and created project for nette sandbox. This worked fine. In all fairness xampp would have worked as well had I installed it with av disabled and PATH variables properly updated.