-
Latest Posts
Put Some Magic Into Your Inbox
If I ever start a newsletter, you'll be in on it. You can unsubscribe easily anytime.Community Sponsorships
- (why?)
Category Archives: Tips
Last-ditch Solution to Non-Working PHP-FPM + Apache Configuration
I had a surreal experience yesterday. I was following online tutorials about setting up Apache + PHP-FPM (for example, this ServerFault question: http://serverfault.com/questions/326919/how-to-set-the-httpd-conf-when-using-php-fpm-with-php5-3-8-and-apache2). I’ll let you read that rather than re-hash it. My goal here is only to share quickly how I actually got this working. Alright, so you know the part where it says [...]
Also posted in DevOps, Life of a Web Developer Tagged 2, action, addtype, apache, apache2, Drupal, fpm, httpd, lamp, php, php-fpm, troubleshooting Leave a comment
Linux tip – regular expression find and replace in all files in a directory
As you may have seen me tweet, I’ve been looking for a way to do this. I didn’t want to manually change my Apache configuration to reflect my new internal IP address. After some Internet searching, I stumbled across this gem: http://www.linuxquestions.org/questions/linux-software-2/find-and-replace-text-in-multiple-file-203801/#post1742045 find . -name '[^.]*' | xargs perl -pi -e 's/192\.168\.1\.3/192\.168\.0\.3/g' I adapted it [...]
Also posted in Life of a Web Developer Tagged apache, expression, find, host, linux, perl, preg, regular, replace, ubuntu, virtual, xargs 2 Comments
Cloning Content Types in D7 – Errata
Update: You may also want to check out the Bundle Copy module. I haven’t tried it yet, so let me know in the comments if it works! Recently, I read the Stanford Tech Commons article on Cloning a Content Type in D7 at https://techcommons.stanford.edu/topics/drupal-7x/cloning-content-type-d7. It proposes a simple but (mostly) effective way to wind up [...]
How-to: Create Drupal development sites in Quickstart
Yesterday, I felt like reviewing some patches, so I fired up my Quickstart-based virtual machine and set about creating some Drupal development sites. I realized I first had to create Drush Make files to get the proper development versions installed. So I did that. However, I also realized that, despite cloning the code via Git [...]
Also posted in Drupal, Drush, Life of a Web Developer Tagged 6, 7, 8, development, Drupal, drush, git, make, quickstart, version, workaround, working copy Leave a comment
Feeds CSV Importer Sources: Caveat Amplificator
I had an interesting experience with Feeds and Feeds Tamper today. I wasn’t able to get a comma-separated set of words to turn into multiple tags no matter what I tried. I was using the Explode plugin that comes with Feeds Tamper and set the delimiter as a comma and the limit to 1. My [...]
Code Snippet – Open Link in New Window in Drupal 7
Although this is not recommended, I’ve seen the question mentioned in the topic come up a couple times over the last few weeks: How do I get my links to open in a new window or tab in the user’s browser in Drupal 7? I’ve heard that the target=”_blank” method is once again valid in [...]
Linux sed trick – Remove line from file by number
I wanted to document this before I forgot it. To remove a single line from an existing file with sed, use: sed -i '[num]d' [filename] For example, to remove line 1 from ~/.ssh/known_hosts (my exact use case right now), type: sed -i '1d' ~/.ssh/known_hosts sed is a neat little tool. I use it to quickly [...]
Quick Drush Tip – Import database SQL with drush sql-cli (sqlc)
I discovered something awesome today just on a hunch and wanted to share. I’m not the first one to blog about this, but it isn’t widely mentioned on the ‘net, at least not as far as I can see. Basically, it’s the drush sql-cli command, or drush sqlc for short. If you type just that, [...]
Also posted in Drupal, Drush, Life of a Web Developer Tagged Drupal, drush, drush sql-cli, drush sqlc, import database to drupal, import sql to drupal, import sql with drush, magic, mysql, postgres, postgresql Leave a comment
Drupal 7 Tips: Fixing “$ is not an object” in JavaScript code
(I almost named this, “Drupal 7 wants you to use $ for money, not your jQuery.) I ran into an API change issue yesterday when working on upgrading Fill PDF to be fully Drupal 7-compatible, and just today, someone on IRC ran into the same issue. She suggested that “somebody” write a blog post about [...]



UPDATED: Weird fix for CCK fields not appearing with Display Suite (Drupal 6)