Reputation: 141
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:
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.
Upvotes: 1
Views: 3300
Reputation: 361
I think your composer PATH or shortcut/batch file is kind of broken, because it tries to read the php.exe file as a JSON file.
Try to remove composer completely and start with a clean install
composer create-project nette/sandbox myprojectname
command in any directoryDocumentation - windows installation of composer
Upvotes: 1