php_syntax_checker icon indicating copy to clipboard operation
php_syntax_checker copied to clipboard

Doesn't use the homebrew installed php

Open kaiyulee opened this issue 9 years ago • 11 comments

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.

kaiyulee avatar Nov 04 '15 03:11 kaiyulee

:+1: - would be awesome to provide a config for setting a custom php path.

CodeBrauer avatar Dec 23 '15 11:12 CodeBrauer

I have exactly the same issue, is there a fix for this? Thanks

tokayer avatar Aug 27 '17 17:08 tokayer

@tokayer Since there are no updates I just hardcoded my custom PHP path in this line

So the line looks like this:

EXECUTE_COMMAND = "/usr/local/bin/php -l"

You can edit this file here: bildschirmfoto 2017-08-27 um 20 11 03

CodeBrauer avatar Aug 27 '17 18:08 CodeBrauer

Thank so much for responding! I have a little issue applying your suggestion. When I go to " ~/Library/Application Support/Sublime Text 3/Packages/" I see a few packages, but not the "PHP Syntax Checker", But I do believe that package is installed on my sublime text, because I keep getting this php warnings. image

tokayer avatar Aug 27 '17 18:08 tokayer

@tokayer Hi, This looks like a php problem. I found a similar problem. https://github.com/Homebrew/homebrew-php/issues/2544

naomichi-y avatar Aug 28 '17 14:08 naomichi-y

@naomichi-y That's true, It is a php warning but it's only because sublime is loading the wrong php.ini file. I think the warning i'm getting in sublime is coming from the "PHP Syntax Checker" package, but I can't find the package files in order to change the path of the php.ini file. I don't see it in "~/Library/Application Support/Sublime Text 3/Packages/", where it should be. (as "CodeBrauer" suggested).

tokayer avatar Aug 29 '17 12:08 tokayer

@tokayer Which OS & Sublime build are you using? - The path I've suggested is default for macOS and Sublime 3

CodeBrauer avatar Aug 29 '17 19:08 CodeBrauer

@CodeBrauer Right, I'm using macOS Sierra version 10.12.6 and sublime 3. The path you've suggested has a few packages of sublime, but I don't see there the "PHP Syntax Checker". image

tokayer avatar Aug 30 '17 11:08 tokayer

@tokayer Hm, maybe you could do it this way:

  1. Install PackageResourceViewer by Package Control: Install Package
  2. Press CMD+Shift+P
  3. Type prvor for PackageResourceViewer: Open Resource
  4. Search for PHP Syntax Checker
  5. Press enter and select phpSyntaxChecker.py

Now you should be able to edit the file

CodeBrauer avatar Sep 01 '17 13:09 CodeBrauer

@CodeBrauer, That did it!!!

THANK YOU!!

You are amazing!

On Fri, Sep 1, 2017 at 4:13 PM, Gabriel Wanzek [email protected] wrote:

@tokayer https://github.com/tokayer Hm, maybe you could do it this way:

  1. Install Extract Sublime Package https://packagecontrol.io/packages/Extract%20Sublime%20Package by Package Control: Install Package
  2. Press CMD+Shift+P
  3. Type prvor for PackageResourceViewer: Open Resource
  4. Search for PHP Syntax Checker
  5. Press enter and select phpSyntaxChecker.py

Now you should be able to edit the file

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/naomichi-y/php_syntax_checker/issues/11#issuecomment-326576500, or mute the thread https://github.com/notifications/unsubscribe-auth/AKOpVJaH-KfuhZ2DXbCrHs-FsxFymeXbks5seALdgaJpZM4GbdXJ .

tokayer avatar Sep 03 '17 11:09 tokayer

@CodeBrauer thanks!!!! I was about to disable the plugin, but then I found your excelent solution

dvn-github avatar Oct 05 '17 23:10 dvn-github