Drupal – How to Diagnose a Blank White Screen: White Screen of Death (WSOD)

While developing a Drupal website, I was testing out the created pages and suddenly on one page, nothing was loaded. There was just a blank white page – more appropriately called the Drupal White Screen of Death or WSOD. First step I did was to enable error reporting because there might also be problems with the template I was customizing:

Read the rest of this entry »

How to Upgrade PHP to 5.2 in CentOS

Developing a Drupal community site has been really good for a while until I needed to search a module to integrate Facebook Connect with it. I found this module specifically for that. Unfortunately, it requires PHP version 5.2, but the one on the Godaddy VPS (which is by default a CentOS flavor) is 5.1 I think. I needed to upgrade the PHP version to 5.2, and the best possible way is to install the latest rpm for CentOS and do a yum update. Here were the steps I did:

Read the rest of this entry »

9 Tips for Improving Drupal Performance

I’ve started working on a Drupal Project just last month and although the learning curve is quite steep, its also a good thing that I chose the Drupal System over others like Joomla and WordPress for building something like an article submission site. Drupal is very advanced & flexible since its got a ton of available modules and themes. But it also entails some performance drawbacks if you continue to develop a Drupal website without thinking of performance optimization. And with that, here are 9 tips for improving Drupal performance:

Read the rest of this entry »

Create multiple-step forms using CCK Fieldgroups in Drupal

multi-step-form.jpg

Lately I’ve been working on a Drupal project, and one aspect in our priority list is the user-friendliness for the people who will submit their contents to the site. A good solution would be to divide the submission form into different steps so that the form page would not be so crowded. Thanks to David Newker for his solution on how to create muliple step forms using CCK Fieldgroups in Drupal. Here are the instructions I followed:

Read the rest of this entry »

How to optimize GoDaddy Virtual Private Server – Kill Tomcat & Simple Control Panel

While searching for some optimization tips for Virtual Private Servers, I checked out this post which claimed that Godaddy (ahem) VPS sucked BUT offering a solution to those who were on the same boat (in this case, I).  Luckily, I tried out his solution and it has proven to speed up the Godaddy VPS.

To give an overview of our setup, we have a few (like 20 ?) websites hosted on the GoDaddy server and its occasionally bugging down. One optimization I did was to kill some processes that are not needed most of the time which takes up a few MBs of RAM from the server.

So here is the solution that I implemented on the said VPS as suggested by Colin McNamara – basically to stop the Apache Tomcat and Godaddy Simple Control Panel, which are used very rarely. But of course, if you need to use the Simple Control Panel, you can always start it up again then turn it off when you are done.

Here are the steps:

Read the rest of this entry »

How to Install/Recompile MCRYPT in PHP (CentOS VPS)

I’m starting to develop sites with the Interspire Shopping Cart system, which I think is totally way better than Prestashop. I suggest people who want a better system than Prestashop to checkout the Interspire Shopping Cart, its worth every penny.

So I’m setting it up for our company in a VPS hosting, and it requires the PHP installation to be compiled with MCRYPT package. Specifically, this is needed for the manual credit card processing module. And it seems that the Godaddy VPS support is NOT willing to support (ironic) so I had to deal with the challenge myself. I found this instructions from NotesBit.com on how to recompile PHP with MCRYPT support. Here are the steps I followed – it was actually easier than I thought:

Read the rest of this entry »

Search and Replace in MySQL

I just went through a domain transfer for one of our websites, and the links in the posts are all pointing to OldSite.com rather than the NewSite.com. But it’s an easy fix, as long as you got Google.

Read the rest of this entry »

How To Completely Backup your GoDaddy Website Files

Godaddy mainly offers domain names for sale, but they are also selling hosting plans including shared hosting, VPS and dedicated server. For those who are using shared linux hosting on Godaddy, it can be a pain to backup all of your website’s files because they do not have an option for that purpose. This has been my problem too when we needed to transfer from Godaddy shared hosting to VPS – the files needed to be backed-up.

Here are two ways you can backup your Godaddy website files:

Read the rest of this entry »

Working Paypal Module for Prestashop

I just finished adding the Paypal payment option for our e-commerce site that uses Prestashop as the shopping cart application. I’m quite getting more comfortable configuring and editing the source code of Prestashop, but along with those modifications is the failure of the default Paypal payment module that came with the Prestashop code package to fail.

Read the rest of this entry »

How To Repair Corrupted MySQL Tables in Linux

I had this problem for days and can’t find a solution. What I had was .frm, .MYD and .MYI backup files from a previous MySQL installation. My task was to restore these files to the newly reformatted dedicated server. I searched all over the net to find the solution, and here’s what I did (commands are in italics):

  1. Make sure you log in as root.
  2. All the files were in a tarball file: “admin_backup.tar.gz”, so I extracted everything to a directory. tar -xvf admin_backup.tar.gz
  3. Now all the .frm, .MYD and .MYI files are extracted. I placed all the files in the MySQL database folder located at /var/lib/mysql/admin_mike.
  4. I immediately logged into phpMyAdmin and tried to access the tables, but unfortunately it says that “Can’t find file: ‘./admin_mike/sometable.frm’”. What I had to do was check the ownership of the files. ls -la /var/lib/mysql/admin_mike/*
  5. The files should have the ownership like “drwx—— 2 mysql mysql sometable.frm” if not, chown all the backup files. chown mysql:mysql *
  6. I tried to access the tables now in phpMyAdmin, and now they are all accessible!

I thought I’d share this so that others would also fix their own corrupted mysql table. :)