phil's blog

How to Force Update Drupal 7 Database Rerun

Have you ever been in the middle of a database update with Drupal, only to get a wonderful PHP error, or some other error of sorts? Then when you go to run the database update again, there's nothing to update, leaving you wondering if it actually ever updated or not...

I've run into this more than once and for the most part, just left it the way it was and crossed my fingers in hopes that I wouldn't have a problem later.

Back in the Drupal 6 days, you could rerun a database update on a module, as much as you wanted but they did away with this ability in Drupal 7.

How to Rewrite Primary Drupal Domain to Subfolder on cPanel Using .htaccess

So you picked up a domain, setup a shared hosting account with a company using cPanel, and now you want to add a few more addon domains inside of the /public_html folder but alas! You can't get your primary domain running Drupal to link over to the subfolder!

While there are lots of deeper methods to "properly" fixing this, a lot of times you won't have access to these options yourself.

PHP .user.ini Doesn't Work

In the olden PHP days, if you wanted to set a php.ini file per user directory, you would configure all sorts of PHP and Apache magic smoke stuff and PHP would recognize the php.ini file in a users folder. From my understanding, this is still the case when using mod_php...

How To Remove .00 From Drupal 7 Ubercart 3.x Display Price

I've recently become interested in reading up on "marketing" tactics, especially for websites. Once you get an online store up and going, it's making money and everybody's fat and happy, the owners always seem to want more. This is where the whole traffic vs conversions comes into play and there are all sorts of different ways to convert a person to do whatever you need them to convert to for a website. Contact form, sign up for a news letter, fill out a survey or in the case of an Ubercart store, buy a product.

How to Theme HTML Form Option, Input and Button Based On Value or Type Using CSS

Ever wanted to them a form option, input or button based on either the value or type? Well, there's a way and it's surprisingly pretty easy.

Simply declare the tag as normal, then add the desired value or text in brackets. That's it!

Stuff I Hate About Microsoft Windows | Goolge Hurry Up With x86 Android!

For a while, I've wanted to vent my frustration with certain things I absolutely hate about Microsoft Windows. Here's a company that has made the top selling operating system over the last decade and a half but yet they continue to move all of the previously written software into the next newest version. Here's my ongoing list of pet peeves I have with Microsoft Windows, mainly Windows 7 because I refuse to move to Windows 8. I have some beef with that one too though...

Drupal Webform Thank You Confirmation URL Path

Have you ever needed to know the default URL path for the thank you or confirmation page when a user submits a contact form through the Drupal Webform module?

I recently wanted to setup a goal in Google Analytics so I could track the Webform submissions in Analytics on a site where I didn't directly receive the form. It turns out the URL is pretty simple. Find the node ID of the webform and add /done to the end of it.

For Example:

node/2/done

APC Only Caching 1 File cPanel suEXEC mod_fcgid

For the second time, I've run into an issue where I could get APC all setup and showing to be working, but it would only show 1 Cached File. The cached user files appeared to be working just fine, but for some reason the files wouldn't cache. I've got a VPS running on a CentOS cPanel setup and the first time I ran into this issue(about a year ago), I remember spending a lot of time trying to hunt it down. It's been a year later and PHP, MySQL etc needed some updates, so I ran the EasyApache upgrade to re-compile all the apache and php goodness.