1
votes

So I'm using PhpStorm 2016.1.1 and I've been using a PHP 5.6 remote interpreter since I've started using this IDE.

The "remote" refers to a web dev server I have on my personal network.

So before my issue, I had the following the configuration:

enter image description here

As you can see, PhpStorm detects my PHP 5.6 version properly.

A few months ago, I switched to PHP 7 on my server so last week, I thought I would switch the interpreter too. So my PHP 7 interpreter is /usr/bin/php or /usr/bin/php7.0

The problem I'm facing is that none of those two works, PhpStorm keeps giving me the error:

PHP version: Not installed

enter image description here

I already double checked the permissions and both PHP 5.6 and 7 executables have the exact same permissions. I also tried making a copy of the PHP 7 executable and chmod it to 777 but didn't help.

Also calling PHP from the console with the same user as the one in my remote configuration works perfectly:

user@webdev:/var/www$ php -v
PHP 7.0.12-1+deb.sury.org~precise+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.3, Copyright (c) 2002-2016, by ionCube Ltd.
    with Zend OPcache v7.0.12-1+deb.sury.org~precise+1, Copyright (c) 1999-2016, by Zend Technologies
    with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans

I tried to use the Invalidate Caches / Restart of PhpStorm but didn't help.

Now I'm running out of ideas so I'm wondering if someone here has a clue of what's going on here.

1
Check the idea.log for possible hints. Please also try PhpStorm 2016.3 EAP build (can be run in parallel as it stores IDE-wide settings in separate folder). - LazyOne
@LazyOne unfortunately nothing in the idea.log ( I mean nothing related to this configuration issue) - Raph Petrini
Try extra logging and check the logs -- it might give more info (the deployment log part): intellij-support.jetbrains.com/hc/en-us/articles/… (try clearing idea.log before that so it's shorter) - LazyOne
@LazyOne idea.log indeed helped me but only after upgrading to 2016.3 EAP ;) see my answer - Raph Petrini

1 Answers

1
votes

Problem is that there is unicode characters in my PHP config for some reasons:

enter image description here

Thus, that breaks the XML generated by the PHPStorm phpinfo.php file.

I haven't found a way to get rid of those unicode characters yet so I ended up hacking temporarily (you know that temp hack probably means I'll keep it like this forever right ? ^^) the /home/<user>/.phpstorm_helpers/phpinfo.php by replacing line 154:

"name" => htmlspecialchars($configurationOptionName)

With:

"name" => preg_replace('/[\x00-\x1F\x80-\xFF]/', '', htmlspecialchars($configurationOptionName))