Sublime Text 3 PHP check problem

Today, after I edited PHP script and I save it – I got this message:

dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: /usr/local/bin/php
Reason: image not found

I tried to update brew, npm, gawk – many tips I found on the internet. But it did not work.

If I uninstalled PHP Syntax Check in Sublime Text Editor, a message is gone. Reinstalling did not help – the message is back. So, I went on this page, where this plugin lives: and here I found a command

php -l

I tried it in a terminal and I got the same error message, like before in Sublime Text 3.

Newer is not automatically better

The first problem was the version of openssl library. For some reason, homebrew updated the SSL library to 1.1, but this plugin needs 1.0.

The solution was not straight and simple, but after little googling, I found this:

brew uninstall openssl; brew uninstall openssl; brew install

but, I had dependencies that don’t allow simple removing of this library, so I had to upgrade this command to

brew uninstall --force --ignore-dependencies openssl; brew uninstall --force --ignore-dependencies openssl; brew install

Then I tried command “php -l” again and terminal answered me with a new error message

dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib

Here helps simple link to the new version

cd /usr/local/opt/readline/lib

I checked, what version I have on my computer and then I linked the old version to my new version

ln -s libreadline.8.0.dylib libreadline.7.dylib

Now – Sublime Text 3, if I’m editing my PHP script and I make some syntax mistake – I get my old good friendly warning.