Andrés Córdova Andrés Córdova - 17 days ago 5
PHP Question

503 Service Unavailable after brew install and restarting apache2

I'm working in framework Phalcon, which uses PHP. I wasn't able to connect my application with Postgresql. I discovered this webpage: Enabling PostgreSQL support in PHP on Mac OS X, which basically says I should download something like "php_pdo_pgsql.so" and following a well voted solution I did:

brew install php56-pdo-pgsql


and then I restarted my apache with:

sudo /usr/sbin/apachectl restart


When I reloaded my web page, which was working perfectly, appears the error:


Service Unavailable

The server is temporarily unable to service your request due to
maintenance downtime or capacity problems. Please try again later.


Looking for the error log of the webpage it seems that after the restart there are not more errors, also no more accesses in the access log. I'm using version 5.6 of PHP. My server is OSX Sierra.

I accept solutions, ideas and new question to solve my problem. Thank you very much.

Answer

I solved it! There were no more errors in apache log. Why? When I installed the PDO of php-postgresql with brew, it automatically installed apache of brew and change the configuration of the server. So, I had 2 "apache" in my server, what screw up everything.

I used this tutorial: https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions. In general terms, What I did was uninstallig everything I could and installing apache from brew. Then I made the configuration of the tutorial and finally my webpage is running again. Thanks.

Comments