Install PHP from Postgresql on MAC using homebrew

I am trying to install PHP 5.6 with Postgresql using homebrew using this tutorial .

However, since I do not want to use mysql and apache, when installing php 5.6 I use this command:

brew install php56 --without-mysql --without-apache --with-pgsql=/Applications/Postgres.app/Contents/Versions/9.4/bin/ 

However, I do not install postgres support. The first line I see is all the time:

 ==> Installing php56 with --without-mysql, --without-apache 

But nothing concerns --with-pgsql.

When I try not to provide a link to my postgres application, it tells me that it cannot find pg_config. He also told me that --with-pgsql is deprecated and that I should use -with-postgresql, but in the end nothing will change.

How does anyone know what might happen?

+2
source share
1 answer

I found a way to fix the problem. I installed postgresql with homebrew (even if it was already installed on my computer) and then installed php5.6 with the following command line:

 brew install php56 --without-mysql --without-apache --with-postgresql 

Then I delete postgresql with homebrew

 brew uninstall postgresql 

And finally I installed php5.6 pdo-pgsql

 brew install php56-pdo-pgsql 

Hope this helps!

+10
source

Source: https://habr.com/ru/post/1245145/


All Articles