-1
Causative
According to the comments and the previous answer given by the questioner himself can be understood that the cause of the problem is a kind of linter that uses the executable php to check the problems within your code, most of them do this to remain consistent on any version of the motorcycle used, running its code, and capturing errors.
Problem
Like most of the Linters (and Syntax Chekers, Coding Standards Fixers, Style Checkers, etc) use some executable to make their tests, they need to be installed for them to work, as reported in the previous answer, the problem was caused by PHP Syntax Checker of Naomichi-y, and can be seen in line 6 of the Checker on Github that she uses a PHP command:
...
EXECUTE_COMMAND = "php -l"
...
This command is used to check errors in the code ONLY as can be seen in PHP manual:
-l Syntax check only (lint)
This command is only executed if the php executable exists on your computer and is mentioned in your environment variables.
How To Solve
There are 2 options:
Install PHP
Oops: If even after installed the problem persists, make sure your environment variables are leading up to the folder containing thephp.exe
, if you don’t know how to do it, you can follow this step-by-step.Remove the Plugin
Oops: If even after removed the problem persists, check your plugins, must have some more that use php, are rare, but some autocompletes may also use.
Maybe you are using some kind of linter (checks code errors), many of them take Trigger when saved, and you don’t have PHP in your environment variables.
– Pliavi
@Pliavi and how I change it?
– Gustavo Samuel Marcolin
Hm, for that you need to answer me 2 things (actually only the second, but to be able to give a more complete answer the first is a good one), which plugins do you use that are related to PHP? and where is the installation of your PHP (whether via XAMPP, WAMP, Direct, etc)
– Pliavi
direct php usage, php plugins use only auto complete...
– Gustavo Samuel Marcolin
All right, which is the installation path? What is the name of the plugin and which editor is using?
– Pliavi
php snipets, sublime usage 3, install path vc refers to php? pq I’m just quardando o the files on the machine, I run them on an external server, the strangest thing is that really from nothing began to give this error, a few minutes before the error I was without internet
– Gustavo Samuel Marcolin
I’ll see what’s wrong here, thanks for your help..
– Gustavo Samuel Marcolin
Oh yes, it’s not normal, I only know a "snippet" plugin that uses PHP (PHP-Intellisense Vscode), I just saw the configs of the one you talked about and it only uses what you type, without checking anything. Since PHP is not installed on your machine, you should still have some other plugin looking for it, go disabling one by one and saving, one time you should stop and you will find out what is causing the problem. And if you find the solution, do not hesitate to answer your own question.
– Pliavi