Reading this weekend about a backdoor introduced to the open source xz project.…
Continue reading post "xz backdoor"php posts
Apache PHP FPM and “Primary Script Unknown”
A while back, I wrote about dealing with the Apache / FastCGI error 'Primary sc…
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,…
Continue reading post "Homebrew `composer` 2.6.x failing"Playing with GitHub Pages
This past weekend, I started playing with GitHub Pages for the first time. It …
Continue reading post "Playing with GitHub Pages"Swap file for composer out of memory problems
PHP's defacto package manager, composer, has long required large amounts of mem…
Continue reading post "Swap file for composer out of memory problems"Sorting with `FIELD()` function in Doctrine
I recently needed to sort query results to match the order of IDs passed to it …
Continue reading post "Sorting with `FIELD()` function in Doctrine"PHP-FPM / Apache caching symlinks
At Cogneato, we use symlinks to point the web server to different versions of o…
Continue reading post "PHP-FPM / Apache caching symlinks"Deploying updates to my site with a composer lock file seemed slower since updat…
Continue reading post "#3253"I see that composer has released its 2.0 version. Nice. My biggest hope of imp…
Continue reading post "#3243"PHP: Escaping email display name
I recently had the need to take a name from a form submission and use it as the…
Continue reading post "PHP: Escaping email display name"Automatically reconnect PDO when connection times out
In PHP scripts that run queries to a MySQL database over a long period of time,…
Continue reading post "Automatically reconnect PDO when connection times out"Import SQL file in Doctrine / PDO
I recently needed to programmatically import SQL files containing database dump…
Continue reading post "Import SQL file in Doctrine / PDO"New server setup at Cogneato
I'm kind of excited that we moved the first site onto a new server setup at Cog…
Continue reading post "New server setup at Cogneato"Today I learned that PHP's mkdir() with the octal permission argument apparently…
Continue reading post "#2823"FastCGI and "Primary Script Unknown"
If you're routing requests for script file names through FastCGI, and don't hav…
Continue reading post "FastCGI and "Primary Script Unknown""PHP zend_mm_heap corrupted error
We were getting errors on our server where certain pages or even sites would oc…
Continue reading post "PHP zend_mm_heap corrupted error"PHP: Fallback for old constructor style
In versions of PHP before 5, constructors were functions with the same name as …
Continue reading post "PHP: Fallback for old constructor style"HTTP 2 on Ubuntu 18.04 with Apache and PHP
I recently got h2 (HTTP 2.0) running on my server. The new protocol should spe…
Continue reading post "HTTP 2 on Ubuntu 18.04 with Apache and PHP"Server upgrade: Ubuntu 18.04
I've finally updated my server to Ubuntu 18.04 using do-release-upgrade. It to…
Continue reading post "Server upgrade: Ubuntu 18.04"10k Apart: Deployed
My 10k Apart entry was finally deployed and can be seen at its Azure URL, thoug…
Continue reading post "10k Apart: Deployed"Quick regex to strip html tags
Recently, I needed to strip some HTML tags from some data. The goal was to mak…
Continue reading post "Quick regex to strip html tags"Sending email attachments with PHP `mail`
I recently had to set up a PHP script to send an email with an attachment. Wit…
Continue reading post "Sending email attachments with PHP `mail`"Globbing files including dot-files
Normally globbing for the wildcard * will find all files in a directory except …
Continue reading post "Globbing files including dot-files"Dreamhost now has PHP 7, so I've switched my main sites to it. Seem at least sl…
Continue reading post "#974"I got PHP 7 working locally finally. It worked for CLI just fine when I first i…
Continue reading post "#798"Load Balancers and HTTPS
Until recently, I had no experience working with sites behind load balancers. …
Continue reading post "Load Balancers and HTTPS"Notes on Using PHP Class With Statics for Configuration
I will be talking about using namespaced PHP classes with static properties for…
Continue reading post "Notes on Using PHP Class With Statics for Configuration"PHP Output Buffer Manager
With rebuilding my website with WordPress, I have made progress on the WordPres…
Continue reading post "PHP Output Buffer Manager"Symfony: PHP Templating Engine and Global Variables
At Cogneato, we are using Symfony's PHP templating engine to render our views f…
Continue reading post "Symfony: PHP Templating Engine and Global Variables"Using Symfony alongside an existing system
At Cogneato we've had a CMS that has been built up over more than a decade. We…
Continue reading post "Using Symfony alongside an existing system"PHP: Outputting Lists in Arbitrary Number of Columns
For lists of narrow pieces of content, it can make sense to put them in multipl…
Continue reading post "PHP: Outputting Lists in Arbitrary Number of Columns"PHP Functions: Array as Argument
A while back, I wrote about using the JSONesque literal value parameters in Jav…
Continue reading post "PHP Functions: Array as Argument"PHP Parser for RSS Feed From Wordpress.com
I've been working on my own site a bit since getting out of school. I've been …
Continue reading post "PHP Parser for RSS Feed From Wordpress.com"