linter error running php
Comments
TrustedSamurai commented Jul 3, 2017
I’ve seen this error discussed before but don’t understand from previous issues what the solution was.
When I check the path listed with this error message I find helpers.js, index.js and types.js but nothing that says php (C:\Users\janderson.atom\packages\linter-php\node_modules\atom-linter\lib\helpers.js:102:24)
I’ve checked Atom packages and see that I have language-php installed.
But I don’t know what to try next?
The text was updated successfully, but these errors were encountered:
We are unable to convert the task to an issue at this time. Please try again.
The issue was successfully created but we are unable to update the comment at this time.
Arcanemagus commented Jul 3, 2017
The message is talking about the system wide %PATH% environment variable that determines where executables should automatically be found.
Do you have PHP installed on your system and have you modified your environment to make it available? You should be able to type where.exe php in a command prompt and get back a path.
TrustedSamurai commented Jul 4, 2017 •
Hey Arcanemagus,
Thanks for writing.
When I execute a where.exe php from my Windows 10 Command Prompt I get the message
INFO: Could not find files for the given pattern(s).
When I open the Environment Variables window there is a variable called ‘Path’. it contains two values:
C:\Users\Owner\AppData\Local\Microsoft\WindowsApps
C:\Users\Owner\AppData\Local\atom\bin
Isaactmh commented Jul 5, 2017 •
This is very easy to fix.
you need to edit the atom’s config.cson file.
It’s locate in C:\Users\YOURUSERNAME.atom (For Windows users only)
open with notepad and then add at the end of the file the section like the following:
«linter-php»:
‘executablePath’: YOURPHPLOCATION Example: C:\php7.0\
Save, restart atom and will start to work.
Isaactmh commented Jul 5, 2017
If you are using Xampp the PHP executable it’s on C:\xampp\php\
If you can see a blue PHP icon you are on the right folder. I don’t know if the plug-in can work or not with PHP5 because I have the php7 I think so but you have to try.
In case you can’t make it work, try to download the php7 standalone version and set the path in your config.cson. let me know what happen.
Arcanemagus commented Jul 6, 2017
@Isaactmh and @TrustedSamurai: Unless you know exactly what you are doing, you should always use the Settings within Atom to modify that file, it’s easy to break things if you don’t follow exactly how that file is supposed to work.
I don’t know if the plug-in can work or not with PHP5
Arcanemagus commented Jul 10, 2017
@TrustedSamurai The PATH environment variable expects a directory, while the «Executable Path» setting expects a full path (confusing terminology, I know).
If your PHP is located at C:\xamplite\php\php.exe then you would need to do one of the following:
TrustedSamurai commented Jul 20, 2017
Thank you, adding the path of the php executable to the environment variable ‘Path’ worked.
braday commented Dec 4, 2017 •
I have similar problem getting php works because am using wamp for local host. I also tried placing all the PHP version but it gave me this error msg
Here is what I set for the php.
Appreciated for any advises, thanks
Arcanemagus commented Dec 4, 2017 •
You attempted to set a folder, which wouldn’t work anyway.
Note: If you were curious about the several different things wrong with what you attempted above go back into the file after setting it in the UI to see all the differences.
Comments
danielefavi commented Oct 27, 2017
Hello,
I’m getting often the following error:
[Linter] Error running PHP Error: Process execution timed out
at C:\Users\Daniele.atom\packages\linter-php\node_modules\sb-exec\lib\index.js:89:18
I’m running Atom v1.21.1 on windows.
I don’t know how to replicate this error because it appears randomly: sometimes when I change the tab or open a file.
The text was updated successfully, but these errors were encountered:
We are unable to convert the task to an issue at this time. Please try again.
The issue was successfully created but we are unable to update the comment at this time.
Arcanemagus commented Apr 27, 2018
There isn’t much that can be done here, there are some ways to work around this but they are only band-aids to the real problem that for some reason php is taking a long time to parse your file.
As far as what can be done in this provider, a uniqueKey can be added to automatically kill previous runs of this provider when a new one is requested, although I’ve seen reports that this isn’t working on some people’s machines.
zemiacsik commented Apr 14, 2019 •
After last Atom update I have started to encounter this. When I open a blank Atom and then re-open some project, it basically kills my pc for couple of minutes.
Then 14x variations of this:
Edit: However I think this is probably more like an Atom issue, because I encounter this only after some of its updates.
li[Linter] Error running PHP #281
Comments
Daniel2314 commented Feb 19, 2018
this appears to me when I write anything is a mistake of the linter or atom do me the favor and tell me thank you
The text was updated successfully, but these errors were encountered:
We are unable to convert the task to an issue at this time. Please try again.
The issue was successfully created but we are unable to update the comment at this time.
Arcanemagus commented Feb 19, 2018
Without seeing the message that was printed to the Console in the Developer Tools it’s impossible to say what is going on here. Follow the instructions in the message to access it.
Daniel2314 commented Feb 19, 2018
Arcanemagus
this is the message that prints on the console in developer tools that I do to solve that error with linset
Arcanemagus commented Feb 19, 2018
Alternatively you can set the full path to php in the settings. (eg. C:\php7\php.exe )
Daniel2314 commented Feb 20, 2018
Can you show me how to download it and save it in php or add it to the console like I do
Arcanemagus commented Feb 20, 2018
Daniel2314 commented Feb 20, 2018
The file is decompressed or left in zip
Arcanemagus commented Feb 20, 2018
It looks like PHP has some installation instructions available here, if those don’t suffice I would recommend searching Google for how to get PHP available in your Command Prompt.
Arcanemagus commented Apr 27, 2018
Thank you for your issue!
It looks like you haven’t reported back as to whether the instructions were able to help you get PHP installed on your machine. Since there is nothing wrong with the provider I’m going to close this but don’t hesitate to reach out if you are still having problems, we’ll be happy to reopen the issue.
BaldCatDev commented Jul 18, 2018
Bump. In case not to open a new thread.
All of a sudden after the last update I got this error for a single file within entire project. File placed beside works like a charm. This one throws me that error.
Any help please?
Arcanemagus commented Jul 18, 2018
@BaldCatDev that message means php has reported a line number (251) that doesn’t exist in the document you are editing (which stops at line 216). Either php is wrong, or we’re parsing the raw output wrong.
If you are able to consistently reproduce this, and can share the file in the state where that is happening please file a new issue and I can confirm which of the above is what is happening, thanks!
Locking this thread as the original issue was simply a user setup question to which they stopped responding.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Настройка Atom от GitHub для работы с PHP, Python и некоторыми другими языками программирования
Изначально считаем что у Вас установлена поддерживаемая операционная система, Node.JS и Atom. В примерах мы работаем в OpenSUSE (13.1) в нём (и вообще в дистрибутивах *nix) уже «из коробки» обычно есть не только Python но PHP и другие языки программирования. Так же исправно работает на Ubuntu (>12.04). Если у Вас Windows 7 или 8, а раньше Вы с ними (языками) не работали то их предварительно необходимо скачать и установить.
Примечание: перед началом работы желательно запускать Atom под root.
опыт показывает — работает стабильнее
Linter
Идеология Atom к подсветке в том, что основным пакетом для работы с синтаксисом и его анализа будет Linter, который является верхним уровнем в API для других линтеров кода. Это сделано для прекращения «войны между плагинами» (The idea is to stop the linter plugins war, by providing a top level API for linters to parse and display errors in the Atom editor). Тем не менее, не все сторонние разработчики придерживаются этой идеологии и пишут свои плагины.
Пакет Script: запуск программ из Atom
Script — пакет для запуска кода в atom.
Установка пакета Script, возможна из командной строки:
или меню
Packages->Settings View->Install->Packages
Каждый язык работает, при наличии предварительно установленного компилятора / интерпритатора.
Пакет Script обновляется довольно часто. Например поддержка Swift появилась менее двух недель назад. Так что скорее всего в ближайшее время появится поддержка новых языков.
Для запуска программы необходимо выбрать
Packages—>Script—>Run
Дополнительные опции можно найти в документации либо на страницах Atom`а или проекта.
Для функционирования должен быть создан рабочий каталог.
Путь к нему нужно прописать здесь:
Packages—>Script—>Configure Script—>Current Working Directory
Заявку разработчикам на поддержку нового языка можно оставить здесь (отвечают быстро)
И немного юмора от разработчиков пакета Script,
у которых, судя по всему, спрашивают всё на свете:
первод: Атом не может найти Нод | Руби | Питон | Мои носки
Python
Поддержка подсветки этого языка идёт изначально. Пакеты для работы с синтаксисом и отладки:
Linter + Language Python + Linter Python Pep8 + Script
Script запускает код на Python, а Linter и Linter Python Pep8 покажут синтаксические ошибки.
Возможно Вам, для работы с Python также поможет Atom Python Debugger.
Подсветка ошибок и запуск после установки будут выглядеть так:
Swift
Терминал
Для запуска исполняемого кода С, C++, Java иногда проще использовать сторонний пакет (не пакет Atom, а пакет вашего дистрибутива), который запускается через терминал, поскольку сам Atom поддерживает большое количество языков. Если Atom выступает в качестве редактора кода, a терминал рядом запускает его — это очень удобно для нас, поскольку терминал не имеет такое преимущество редактирования, как Atom.
Для запуска терминала в окне Atom установите пакет Term. Для запуска терминала в окне Atom выбрать
Packages—>Command Palette—>Toggle и Term
с нужными параметрами.
В заключении ещё один интересный кликабельный анимационный gif от разработчиков script, ссылки.
[Linter] Error running JSHint #377
Comments
EthanBannister commented Apr 10, 2017
I have an error that I am unable to resolve. I have attempted to look for a solution elsewhere and have found issues that appear to be similar, but GitHub forums appear to be either providing no solution and I find myself running in a ‘Forum loop’.
I have attempted to reinstall EVERYTHING from scratch (Atom and all of my packages) and it keeps returning to haunt me.
When I open the console, it states ‘TypeError: Converting circular structure to JSON’:
I have also exported a list of all the packages that I am using for this installation of Atom to a text file using apm, performed a fresh install of Atom on another computer, then used apm to install all the packages noted in that installation file. This install was successful and jslint had no issues that Atom complained about.
Just in case you need to know, here is my list of installed packages:
atom-autocomplete-php@0.22.2
atom-beautify@0.29.18
atom-bracket-highlight@0.3.2
atom-wrap-in-tag@0.6.0
auto-detect-indentation@1.3.0
autoclose-html@0.23.0
busy-signal@1.3.0
file-icons@2.1.2
highlight-column@0.5.2
highlight-line@0.12.0
highlight-selected@0.13.1
intentions@1.1.2
linter@2.1.2
linter-csslint@1.3.4
linter-htmlhint@1.3.3
linter-jshint@3.0.3
linter-jsonlint@1.3.0
linter-php@1.3.2
linter-ui-default@1.2.2
minimap@4.27.1
minimap-highlight-selected@4.6.1
open-recent@5.0.0
permanent-delete@0.1.5
php-cs-fixer@4.1.0
pigments@0.39.1
python-autopep8@0.1.3
smart-tags@0.1.5
swackets@0.26.0
todo-show@1.11.0
Is there something that I may be missing?
The text was updated successfully, but these errors were encountered:
We are unable to convert the task to an issue at this time. Please try again.
The issue was successfully created but we are unable to update the comment at this time.