Tech & Business Blog

/Tech & Business Blog
2710, 2009

Drupal update.php returning blank page

October 27th, 2009|Categories: Drupal|1 Comment

I recently upgraded Drupal to version 6.14 and went to run the database update as the instructions stated. When clicking the link, update.php only showed a blank page.

This is because errors on this page are hidden by default. In order to diagnose your problem, you’ll need to edit update.php and change the following line:

ini_set(‘display_errors’, FALSE);

to this:

ini_set(‘display_errors’, TRUE);

Try running update.php again and you should be displayed with an error message.

In my case, the errors I received looked like this:

Warning: include() [function.include]: Unable to access ./themes/garland/maintenance-page.tpl.php in /var/www/vhosts/example.com/httpdocs/includes/theme.inc on line 1020

It appears that Drupal still references the Default theme Garland which I had deleted from the server to save space. Once I’d reinstated this, the errors disappeared and I was able to run the database update.

1410, 2009

Configuring Drupal cron jobs in Parallels

October 14th, 2009|Categories: Drupal|3 Comments

If you’re using Drupal, you should set cron to run automatically through your web host.

I’m using Open Host for one of the New Zealand based websites I do work on – who run Parallels for their clients to make hosting set up changes.

If you’re using this system, here’s what you need to do to get cron running automatically:

1) Log in to Parallels and click “Crontab”
2) Select your system user. If one does not appear I recommend contacting your host for help.
3) Click “Schedule a task”
4) Complete the form like below:

cron_drupal

The above settings will ping cron.php on the first minute of every hour, every day of the month, every month. Make sure you change http://mywebsite… to show the URL of your site.

The official Drupal site provides more information on setting up cron jobs using Linux/Unix commands: http://drupal.org/cron

2409, 2009

How to disable ViewState in web.config

September 24th, 2009|Categories: .NET Development, Uncategorized|0 Comments

ViewState is enabled by default in ASP.NET projects. If you’re not going to use it, you can disable it site-wide in web.config.

To do this, enter the following into your web.config file:

<pages enableViewState=”false”>

</pages>

If you already have a <pages> tag,  just add enableViewState to the end like this:

<pages validateRequest=”false” enableViewState=”false”>

</pages>

308, 2009

How to enable MMS in iPhone with 3 mobile

August 3rd, 2009|Categories: General Internet, Uncategorized|0 Comments

I recently updated my 3G iPhone to use the 3.0 firmware. In doing this I knew that MMS would become available but I’d need to change a few network related settings.

This turned out to be a nightmare due to my network not providing any information on how to do this. So if you’re with 3 mobile in Australia and are having the same issue, here’s what you need to do:

1) First go to Settings > Phone and set your phone number. This needs to be in the following format:

61xxxxxxxxx

If you add 01 or +, MMS will not work.

2) Visit Settings > General > Network > Cellular Data Network > MMS and enter the following:

APN: 3services
MMSC: mmsc.three.net.au:10021/mmsc
MMS Proxy: 10.176.57.25:8799

Leave the other fields blank.

3) Finally, visit Settings > Messages > MMS Messaging and make sure this is set to ON.

805, 2009

Validating your Twitter badge HTML

May 8th, 2009|Categories: Front end development|0 Comments

I recently added a Twitter badge to my personal website to show my latest Twitter updates.

When I went to validate the HTML through W3C, I received an error saying that a <ul> tag was not closed.

This is easy to fix, all you need to do is add some empty <li></li> tags like below:

twitter_code

If you haven’t added a badge yet and you’re looking for all the code, visit the Twitter badge page

2204, 2009

Compare plugin for Notepad++

April 22nd, 2009|Categories: Front end development, Uncategorized|4 Comments

Often when I don’t have access to Visual Studio, I use Notepad++ to edit code – particularly HTML and CSS files.

Today I found a fantastic plugin called ‘Compare’ that allows me to compare the differences between two files in Notepad++ without having to use an external program.

This can be downloaded here: Download Notepad++ Compare Plugin

Compare Screenshot

If you’re looking to download Notepad++ (it’s free!), you can visit their website here:
http://notepad-plus.sourceforge.net/uk/site.htm

It’s a great tool that loads quickly and is infinitely better than using regular old MS Notepad!


Edit: Thanks for the comments about installation. I should add:

To install the plugin, download the file, unzip and copy the .dll into the Notepad++ Plugins folder.

To use, simply open the two files you wish to compare, click Plugins > Compare > Compare. The differences between the two files will then be highlighted. Note: You may need to close Notepad++ and reopen it before the menu option will appear.

I’m currently working on my website so this is some placeholder text. Hi there! :)