Profile cover photo
Profile photo
Earl Fong
17 followers
17 followers
About
Earl's posts

Post has attachment
A Reason to Use the Drupal Coder / PHP_CodeSniffer utility
Drupal Coder includes the command line utility PHP_CodeSniffer , which parses source code to detect violations of a coding standard. Actually, there are two utilities in the package, one to detect violations, a second to automatically make changes for those...

Post has attachment
Using xDebug and Sublime Text with Docker
I've used xDebug with Sublime Text locally for quite some time but have started playing with Docker containers to instantiate instances of Apache, PHP, MySQL, and Drupal 8. The Docker
image I use has xDebug enabled for PHP, but I wanted to have xDebug runn...

Post has attachment
Initial Thoughts on Using Docker
I have started to use the Docker images from wadmiraal/drupal for local Drupal development, for example, wadmiraal/drupal:8.1.0 to use Drupal 8.1.0. These images are very well documented at Use Docker to kickstart your Drupal development . There are other i...

Post has attachment
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 72 bytes)
I ran into the above error message while modifying some custom Drupal code. At first, I thought I just needed to increase the memory limit due to some newly called core functions consuming more than what was allocated. There's good discussion about differen...

Post has attachment
Using Drupal 8 Cache Tags for Page Caching
This is a small case study in converting how page caching is done in the D7 version of the Optimizely module to Drupal 8. The purpose of the module is to manage the insertion of certain <script> elements into designated pages of a site. To do so, the user c...

Post has attachment
Enable and Use X-Drupal-Cache-Tags in HTTP headers
While converting from Drupal 7's caching to that of Drupal 8, for debugging purposes I wanted to enable the display of  X-Drupal-Cache-Tags in HTTP headers. How to do this is documented in the article CacheableResponseInterface and is actually simple, but I...

Post has attachment
Call of MySQL database function fails
This post describes (another) database issue that was tracked down by my colleague Luis Delacruz. We had both a live site and a corresponding development site using the same MySQL database server. On the live site, carrying out a particular user task worked...

Post has attachment
Two sites on the same database server - PDOException: SQLSTATE[HY000][1129] Host 'nnn.nnn.nnn.nnn' is blocked because of many connection errors
A web search shows a number of forums and postings about the error message in the title of this post, but our particular problem involved two sites on the same web server and the same database server. One of the sites appeared to repeatedly bring down the o...

Post has attachment
Blocking Chinese and Korean spam for user-submitted content
I help maintain a Drupal 7 site called Power Poetry that is a platform for publishing poetry. It's really a great site with awesome writing that has grown steadily in both the amount of content and the number of page views. Unfortunately, its popularity has...

Post has attachment
An Exercise in Pair Programming
I've spent many years as a software developer working in contented solitude: wrapping my mind around spaghetti code; stepping through a debugger; implementing an algorithm. I'm an introvert, so I'm comfortable being alone. The past few years, though, I've f...
Wait while more posts are being loaded