Was trying to install solr extension from pecl using pecl install solr
but getting this error php_bin d:\xampp\php\php.exe appears to have a suffix \php.exe, but config variable php_suffix does not match
Asked
Active
Viewed 4,101 times
4

Kuldeep Dangi
- 4,126
- 5
- 33
- 56
2 Answers
3
In order to fix the error run the following commands in sequence but replace the paths with the ones of your php installation folder . This fixed for me . By first command you tell the config where the php binary folder is . By the second command you append the php executable file.
pecl config-set php_bin C:\xampp\php
pecl config-set php_suffix \php.exe

user3102290
- 145
- 9
-
Mind the difference between php binary folder , php executable file(suffix) and slashes . – user3102290 Jul 01 '18 at 18:40
2
I think that is a warning. Try run these commands in terminal:
pecl config-set php_suffix \php-cgi.exe
pecl config-set php_bin C:\pathto\php\php-cgi.exe

msoa
- 1,339
- 3
- 14
- 33
-
I actually had to use php_suffix set to just .exe due to my path having dots in it. – Jon Marnock Mar 18 '21 at 04:01