naomichi-y / php_syntax_checker

This package is plugins for Sublime Text 2 and 3. When you save PHP file, perform syntax check of PHP
39 stars 14 forks source link

Doesn't use the homebrew installed php #11

Open kaiyulee opened 8 years ago

kaiyulee commented 8 years ago

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.

CodeBrauer commented 8 years ago

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

tokayer commented 6 years ago

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

CodeBrauer commented 6 years ago

@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

tokayer commented 6 years ago

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

naomichi-y commented 6 years ago

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

tokayer commented 6 years ago

@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).

CodeBrauer commented 6 years ago

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

tokayer commented 6 years ago

@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

CodeBrauer commented 6 years ago

@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

tokayer commented 6 years ago

@CodeBrauer, That did it!!!

THANK YOU!!

You are amazing!

On Fri, Sep 1, 2017 at 4:13 PM, Gabriel Wanzek notifications@github.com 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 .

dvn-github commented 6 years ago

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