Categories
Workflow

Fixing the PHP-FPM User/Group File Permissions

After upgrading to PHP7.2 php-fpm was running as the _www user. PHP worked, but was unable to write to most files.

Needed to change php-fpm to use my own Mac user and group. Biggest difficulty was finding where my actual version of Apache & PHP are configured and where error logs are written. This is due to Homebrew adding to the native installs.

Try these paths if it happens again.
(May not be correct as I tried a lot of things to get this fixed)

Apache

Config  /usr/local/Cellar/httpd24/2.4.27
Logs   /usr/local/var/log/apache2

(Defined in /usr/local/etc/apache2/2.4/)

PHP

/usr/local/etc/php/7.2/php-fpm.d
Categories
Workflow

Mac Homebrew Dev Environment Stuff

Restart Apache
sudo apachectl restart

Apache Config
/usr/local/etc/apache2/2.4

Categories
Uncategorized

Mac OS X / Homebrew Notes

which apachectl
/usr/local/bin/apachectl

I expect that response if the Homebrew version of Apache is running.

Categories
Uncategorized

Unable to Start Apache on Windows

If you get service specific error code 1 this relates to an IP/port conflict.

In my case Apache was listening to an IP address no longer attached to the system.

In httpd.conf there was Listen 192.168.0.20:80, which was an out of date IP. This line is usually unnecessary, but for me to get Apache to respond to the computer name I needed it.