Version used: Atom 1.14.4 x64. Some details may vary depending on the editor’s version and configuration, such as language.
Linter PHP
To display syntax errors, you can make use of the package Linter PHP.
You will need to have PHP installed on the machine. After that, just install the package by running the command:
apm install linter-php
Or go into Edit / Preferences (Ctrl + Comma), enter the tab Install, searching for the name linter-php. Press Install. If necessary, allow adding all package dependencies.
Depending on your PHP installation, you may have to configure the path of the executable to the package. To do this, go to Edit / Config...
and add, if not already existing, the:
'linter-php':
# php path. run 'which php' to find the path
'executablePath': /usr/bin/php
Remembering that /usr/bin/php
should be the way to install PHP. In Linux environments, usually this path will be given.
Once done, the package should already be working.
For programming errors do you say syntax errors? If yes, you can use the package Linter PHP.
– Woss
Hi Anderson. Thanks for the fix. I installed linter-php, but it gives the error in the image I put in the post.
– user24136
Substitute
executablePath
for/usr/bin/php
, being like this:"linter-php": '/usr/bin/php'
– Woss
the error is gone. Forgive my ignorance, but '/usr/bin/php' would be the PHP directory on my computer or I leave it with this same nomenclature?
– user24136
It is the path to where PHP is installed on your machine.
– Woss
Perfect. Thank you very much Anderson.
– user24136