naomichi-y / php_syntax_checker Goto Github PK
View Code? Open in Web Editor NEWThis package is plugins for Sublime Text 2 and 3. When you save PHP file, perform syntax check of PHP
This package is plugins for Sublime Text 2 and 3. When you save PHP file, perform syntax check of PHP
PHP Syntax Checker seems to be not working in SublimeText 2.0.1 x64 and Windows 8.
Recently, I had some students install this package and many of them are getting this error on save.
/bin/sh: php command not found
Since this package hasn't been updated (because it likely doesn't have any reason to be) in three years, I can only guess that it has something to do with a change in Sublime / or more likely - a change with the most recent MacOS Mojave and/or MAMP.
So, it's not able to find PHP. That's likely because the new OS doesn't ship with PHP. So, it looks like if people run into this, they'll need to install PHP. https://formulae.brew.sh/formula/php
But - here's this little story for when many people inevitably end up here. : )
This plugin run the php interpreter and by this will make this work only if php is installed on the machine.
I am using a container to run php.
Saving make it pops a window /bin/sh php not found
Maybe a note in the documentation?
Installing from package control I get in console:
Package Control: Error downloading package. HTTP error 400 downloading https://codeload.github.com/naomichi-y/php_syntax_checker/zipball/v1.0.0.
error: Package Control
Not exactly sure what's causing it other than possibly the github url scheme as various other packages result in the same error.
Hi,
this package is simply not working for me. It does nothing. Can I see an error output somewhere to get information what is wrong?
I'm using sublime 3 on MacOS X 10.13.4
Thanks for the help
Thanks for your great job.
I have an issue~~~
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/Server.app/Contents/ServerRoot/usr/lib/php/extensions/no-debug-non-zts-20121212/pdo_pgsql.so' - dlopen(/Applications/Server.app/Contents/ServerRoot/usr/lib/php/extensions/no-debug-non-zts-20121212/pdo_pgsql.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/Server.app/Contents/ServerRoot/usr/lib/php/extensions/no-debug-non-zts-20121212/pgsql.so' - dlopen(/Applications/Server.app/Contents/ServerRoot/usr/lib/php/extensions/no-debug-non-zts-20121212/pgsql.so, 9): image not found in Unknown on line 0
it uses the built-in php.
which php
=> /usr/local/opt/php55/bin/php
whereis php
=> /usr/bin/php
When I type /usr/bin/php -v
, it shows the warning above.
Hope update the package form subl3.
any news about support for ST3 ?
// ERROR
while ($i = 0; $i <= 1000; $i++) {
// stuf
}
// ACCEPT
$i = 0;
while($i <= 1000) {
// stuf
$i++;
}
This is aponted as error... Why?
I get this error message whenever I save a php file with the php_syntax_checker package installed.
'php' is not recognized as an internal or external command, operable program or batch file.
(SublimeText2 on Windows7)
Edit: My guess is that this is because I don't have PHP installed on my local machine?
Edit2: I've installed PHP Via XAMPP but continue to get the same error, even after successfully running local php files in my browser
My code
empty($salary) === false ?? false;
Error message wen i save the file.
PHP Parse error: syntax error, unexpected '?'
Can you kindly fix this
When saving a file with a syntax error in,
nothing happens...?
(Sorry for my English.)
I've found that PHP Syntax Checker doesn't display any error message when I save file to directory containing space characters (e.g. D:\foo bar\app.php)
My workaround is to edit the phpSyntaxChecker.py @ line 10
from this
command_line = self.EXECUTE_COMMAND + " " + file_path
to this
command_line = self.EXECUTE_COMMAND + " \"" + file_path + "\""
and it works.
(my env)
PHP Syntax Checker Version: 2015.04.17.10.02.28
Sublime Text Version: 2.0.2
OS: Windows 7
PHP Syntax Checker seems to be not working in SublimeText 2.0.1 x64 and Mac OS Lion 10.8.3
This plugins does not recognize the [ ] to make array..
The dialog popsup all the time.
Perhaps it would be possible to use the file's syntax rather than the extension to detect PHP files (or a combination)? To get the file's syntax, use view.settings().get('syntax')
- for PHP the standard syntax file is 'Packages/PHP/PHP.tmLanguage'. This way it's easier to use the plugin with PHP syntaxed files that have a different extension!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.