problem posts

Apache PHP FPM and “Primary Script Unknown”

A while back, I wrote about dealing with the Apache / FastCGI error ‘Primary script unknown’ when trying to access non-existent PHP files. Bots often do this trying to test for vulnerabilities, and it can fill up error logs and be annoying to look through. In that post, I fixed the problem through mod_rewrite and a RewriteCond. For PHP 2.4+, there is a more broad and likely more efficient solution using the <If> directive. It will work for all virtual hosts on a server.

Continue reading post "Apache PHP FPM and “Primary Script Unknown”"

Homebrew `composer` 2.6.x failing

For some reason, the Homebrew version of composer hasn’t been working recently, either 2.6.1 or 2.6.2. So I’ve manually grabbed the phar from getcomposer.org and replaced the file it was getting. I’m running the latest MacOS and up to date Homebrew, PHP, and Composer on an Intel Macbook Air. When I would run composer, I would get an exception

Continue reading post "Homebrew `composer` 2.6.x failing"