Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OSX Compatibility #4

Open
enzolutions opened this issue May 8, 2013 · 1 comment
Open

Mac OSX Compatibility #4

enzolutions opened this issue May 8, 2013 · 1 comment

Comments

@enzolutions
Copy link

PHP Syntax Checker seems to be not working in SublimeText 2.0.1 x64 and Mac OS Lion 10.8.3

@nucleobases
Copy link

I have same issue while using SublimeText 2.0.2 on Mac OS X 10.9.4.
After some testing, I think the problem is on php.

The syntax check command used in file PhpSyntaxChecker.py is:
EXECUTE_COMMAND = "php -l"

And I have following versions of php, "5.3.29", "5.4.24", "5.5.15".
5.4.24 is Mac OS X built-in, which locate in "/usr/bin/php"

Wrote a test php file "a.php" which has some error and test with built-in php.
It returns nothing...

So I change the "EXECUTE_COMMAND" with the other version of php.
EXECUTE_COMMAND = "/opt/local/bin/php53 -l"

And it works fine for me.


$php -v
PHP 5.4.24 (cli) (built: Jan 19 2014 21:32:15)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

$php53 -v
PHP 5.3.29 (cli) (built: Aug 24 2014 01:46:13)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies

$php55 -v
PHP 5.5.15 (cli) (built: Jul 25 2014 13:17:32)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

$php -l a.php
No syntax errors detected in a.php

$php53 -l a.php

Parse error: syntax error, unexpected T_VARIABLE in a.php on line 4
Errors parsing a.php

$php55 -l a.php

Parse error: syntax error, unexpected '$a' (T_VARIABLE) in a.php on line 4
Errors parsing a.php


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants