Skip navigation ]

Scheduled tasks without cron

Tuesday, November 28, 2006

If your web host doesn't allow for cron jobs ("scheduled tasks") this can cause problems for some scripts you might want to run.

Help is at hand however - SmartScripts.com have a free fakecron script that you can install on your server.

It is cgi-based and very simple to setup - just follow the installation instructions. The only bit which you may need help on is the time syntax. The fakecron script uses traditional crontab settings which can be difficult to get your head around e.g. a task scheduled to run at midnight every day will look like:

* 0 * * * http://yourdomain.com/scheduledtaskname

However, again, help is at hand - HTMLBasix have a fantastic free crontab generator that is simply to use. Just remember to remove /dev/null from the 'send results to:' box as this will not work in fakecron.

Labels: , ,

Signed by Emma

Get paid to review my blog post

PHP Scripts Don't Have to End in .PHP

Sunday, November 26, 2006

by Robert Plank

If you tweak your site to perform better in search rankings then you practice the science of Search Engine Optimization (SEO). It's possible to start using PHP scripts on your site without losing that high ranking of yours.

You've probably noticed your site rise and fall in search engine rankings quite a bit. That's just how it goes since search engines such as Google like to change their algorithms around.

If one day you decide to rename all the files on your site you can be sure your Google listing will moved off page 1 of your target search keyword onto the back-listings of page 67 and beyond.

When you rename a file on your site, and another site links to that file, anyone coming to your site thru that particular link will get an error. When a search engine crawler sees this, it decides your site and decides either to lower your ranking or delete the URL from its search results entirely.

Search engines don't want to send their visitors to Not-Found pages... makes sense, doesn't it?

Okay, so let's say you don't want to have a ton of broken links across your site, which will cause you to drop in the search results, but you want to tinker with PHP a little bit.

There's an easy fix for that. You can actually name your PHP scripts so that they end in .htm or .html, and have them run as PHP scripts on your webserver. So from the outside world it'll look as if your site is full of "updated-by-hand" content.

All you have to do is add this line to your .htaccess file:

AddType application/x-httpd-php .html .htm

If you don't have an .htaccess file, all you have to do is put that line of code up there into a new text file, save it as ".htaccess" (with the dot in front) then upload it to your web server.

As soon as you set this up, try going back to your site. Everything should look exactly the same, with the exception that your HTML pages are all now PHP-enabled.

So you could setup a simple script like the one here:
http://www.jumpx.com/tutorials/1

... And put that on any HTML page of yours. It will work exactly the same as if the file ended in .php instead of .html. Neat, huh?

You could even go crazy and change that line of htaccess code to add in more weird file extensions, for example:

AddType application/x-httpd-php .html .htm .ezine

This would parse any page ending in .html, .htm, or .ezine as PHP. So you could name a file something crazy like "subscribe.ezine" and it would work as a PHP script, or in other words as an HTML file with PHP tags in any place you want them.

For thank you pages sometimes I like to make the extension .thanks or .order just to make it harder to guess.

If you wanted to go totally nuts, you could even put something like this in your .htaccess file:

DefaultType application/x-httpd-php

With that, any file without an extension (so if you named a file "download" instead of "download.php") will be "assumed" to be a PHP file. Any unrecognized extension would default to PHP.

The reason I say you can go totally nuts with this is because now you can now name a file to something that isn't already used -- like site.blog, or form.feedback, subscriber.area or bonus.page.

About the author

Experienced PHP/JavaScript Tutor
Solves 19 Of Your Most Frustrating
Direct Response Sales Page Hang-Ups
http://www.salespagetactics.com/littlefish

Additional note by Emma:

If you are going to use this method, but already have pages listed in Google that end in .php, you will need to add some extra lines into your .htaccess file. This will ensure that Google redirects the traffic from the old .php to the new .htm or .html page:

Assume that www.yourdomain.com/index.php was listed in Google but you wanted to change it to www.yourdomain.com/index.htm.

Add the following line to the bottom of your .htaccess file, making sure that you hit the 'enter' key at the end of the last line of text, and to change 'yourdomain.com' to your actual web address:

Redirect 301 /index.php http://www.yourdomain.com/index.htm

Labels:

Signed by Emma

Get paid to review my blog post

Guest article: Move Up to Virtual Private Server?

Thursday, November 23, 2006

Traditional Shared Hosting

Most people are familiar with "shared" web hosting accounts. A shared hosting account is where you rent disc space on a server which is shared among many other users.

This is a cost effective way to getting started as a webmaster but it has some disadvantages. Firstly you may encounter email delivery problems if someone else with a site on the server decides to run a large business mailing. Also abuse of web hosting providers service may result in a torrent of spam clogging the shared mail queue, causing a "denial of service" attack.

You will find your website slowing down when someone else with a datebase intensive website (such as a forum or bulletin board). Another disadvantage of shared hosting is that you very rarely get administrator or root access. This can make setting up dynamic sites more tricky. Also you can't install your own software and will have to put up with software libraries (such as Perl or PHP) that the web hosting provider has installed.

Security

There are also security issues to consider of using a shared file system. Could other users access your files and data with an appropriate script? This is of critical concern if you are considering ecommerce hosting and in particular storing credit card information. Certain credit card payment processors may wish you to have a more secure arrangement than a shared hosting server. A shared server introduces many more security vectors and someone elses unpatched phpBB script may result in lost business and downtime for you.

Enter the Virtual Private Server

How can you avoid this problem? A few years ago you would have had to consider a dedicated server. However there has been a relatively recent development in web hosting - the virtual dedicated server. These are often known as VPS's or Virtual Private Servers. A virtual dedicated server lets you run your sites as if you had your own "dedicated" server, except it is cheaper because you are really just using part of a server that has been split into multiple virtual dedicated servers.

The most important distinction to shared virtual hosting is that you have "root" or admin access and you control your own background processes, such as apache (httpd), qmail (smptd) and MySQL (databases) So someone elses buggy application or script is not going to crash or interfere with your own processes. Furthermore you have filesystem security as it effectively jailed or "chrooted" from other users and processes, and you can install your own libraries and software.

Where to Find a VPS Hosting

There are now plenty of VPS Providers. You can find many by searching Google for "virtual private servers" or "vps hosting" or looking in one of the many web hosting directories or forums. Virtuozzo by SW-Soft is the main commercial software that web hosts use to run virtual hosting services, but there are others. For instance vserver is similar in principle to Virtuozzo but is not as well used. Open source vps systems exist in the form of OpenVZ ( a subset of Virtuozzo) UML (User Mode Linux) and more recently Xen. It's highly likely that you will be hosted on a Virtuozzo system.

VPS hosting used to be the prerogative of the smaller web hosts primarily looking for a more geeky market but recently the bigger mainstream web hosts have moved into VPS's. Virtual Dedicated Server hosting starts at just £30 a month. You'll get a much more generous bandwidth allowance compared to shared hosting, and none of the problems that go with a shared host. Usually you get multiple IP addresses that are exclusive to your sites, which you will need for SSL certificate hosting and for running your own nameservers if you want to register domain names.

So what's the catch? Apart from the price there isn't one. You'll be spending a lot more on hosting each month but not as much a for a real dedicated server. The main drawback of upgrading to virtual dedicated hosting is that you will need to be more technically proficient so that you can administer the server. You might think this requires a lot Linux skills to make sure your server runs smoothly but most VPS hosts provide a control panel such as Plesk or CPanel to make administrative tasks a cinch.

Many hosting providers will offer "premium" or managed support which includes a bit more hand holding - this is definitely recommended if you don't have much experience with Linux, and are not confident about keeping your VPS updated. It's worth talking to your web host about updating and installing software. If its a Virtuozzo system, the web host will have pre-installed templates for common applications such as Coldfusion which can be rolled out across many VPS's thus cutting down on disc space inside your VPS and well as saving memory and resources on the "hardware node" it runs on. Quite often the VPS provider can roll out operating system updates and bugfixes across all their VPS infrastructure.

With the increased speed and bandwidth that a virtual dedicated host offers, and none of the shared hosting headaches, the move is one you will never regret.

About the author

Paul Lee has over six years experience in the web hosting industry and was formerly Senior System Administrator with Simply.Com Limited. He currently lives and works in London and runs his own consultancy and hosting company Weycrest.

Labels:

Signed by Emma

Get paid to review my blog post

Blogger Beta - first impressions

Tuesday, November 21, 2006

After a couple of weeks of not blogging due to other commitments, I logged into my Blogger Dashboard to see an invitation to upgrade to Blogger Beta.

Firstly, I had to agree to upgrade, with dire warnings that I couldn't go back to the old Blogger. With the 'nothing ventured nothing gained' attitude, I started the process. Firstly, I had to confirm my Blogger login details followed by my Google account details (you can setup a Google account here if you don't already have one). The ubiquitous agreement to the latest terms and conditions followed then the screen told me that my blog was being converted and that I'd receive an e-mail when it was completed.

Simple and straightforward so far...I logged back into my Blogger account to see a new dashboard - this showed a list of my blogs, complete with last post date for each (same as the old) but also the total number of posts, any comments that need moderating * and a list of common tasks.

A quick flick through all the functions showed not much change, but I suspect that's because all my blogs are published on my own server, rather than on Blogger itself.

The best feature so far for me is labels - you can add labels to each post, then visitors to your blog can click on the label to see all other posts labelled in a similar way.

My biggest gripe so far is that the posting word verification has reared it's ugly head. This means that to make any post, you have to complete the verification box. Normally, this is because you publish on Blogger and they think your blog might be spam. It may be that they are checking all blogs for quality purposes but after 100 posts on my own server, I'm slightly irritated and bemused. To remove this, you need to create a new post, scroll down the word verification section and click on the orange question mark. This takes you to a form to submit to Blogger for them to verify your site isn't spam.

* One other surprise was the comments needing moderating - after I removed the ability to comment on my blog, I never saw any comments again (good), but that meant that some comments were left in no man's land - neither visible or able to be moderated. Logging in, I did see that there are comments that needed approving or rejecting.

Overall though, not much seems to have changed. Perhaps if I create a new blog, I'll see more of the new features.

Labels:

Signed by Emma

Get paid to review my blog post

Sitemaps: Google, MSN and Yahoo unite

Sitemaps are the easiest way for webmasters to tell search engines about the content of their website. A sitemap can either be for site visitors' benefit, in which case an HTML or similar file is created or for the search engines in which case an XML needs to be made. This XML file contains information about each page on the site - the URL, how important the page is relative to the other site pages, when the page was last updated and how often it usually changes.

By providing this information, search engines are able to crawl your site more effectively. There are still no guarantees that your pages will be included though!

A new protocol "Sitemap 0.90" standardises the way that sitemap information is presented, so rather than having sitemap.xml for Google, URLlist.txt for Yahoo! etc... search engines will support the one format. Google, Yahoo! and MSN have all agreed to support this protocol.

I still recommend GSiteCrawler for creating your sitemap - it's simple to use and even automates uploading your newly created sitemap to your website and pinging Google Sitemaps!

Labels: , ,

Signed by Emma

Get paid to review my blog post

Zoomquilt - zoom infinitely into one painting

Monday, November 06, 2006

It's not often that something on the web literally takes my breath away, but take a look at ZoomQuilt.

Available as a flash file or a screensaver, this beautiful fantasy landscape literally never ends. Okay it has a very clever seamless loop eventually, but this just adds to the charm.

By moving your mouse forwards or backwards, you move through the landscape - forward to get closer and backward to move further away to get a different view of that particular image and to move into the next.

Very quirky and cool!

Labels:

Signed by Emma

Get paid to review my blog post

100 oldest dot coms

Friday, November 03, 2006

Just a bit of fun - see Jottings.com for the 100 oldest registered dot com domains. Their registration dates range between March 1985 and November 1987.

As you might expect, most of them are tech-related and include many companies that are world leaders in their field - Philips, Sun, Xerox, Intel, Adobe, Siemens and Apple.

And no Microsoft as they didn't register their domain until May 1991.

Quite amazing when you realise that there are over 100 million domain names registered!

Labels: ,

Signed by Emma

Get paid to review my blog post

Open source notepad replacement and webpage editor

I've just discovered Notepad++, which must have one of the funkiest websites I've seen. Just have a look at the menu on the site!


The program is a breeze to use especially if you like to handcode web pages, but like syntax highlighting, line numbers and ability to 'bookmark' lines. If you don't know how to write webpages, then there is a WYSIWYG editor and plenty of help in the files provided.

For a full list of features and to check out the funky chameleons, see Notepad++.

Labels:

Signed by Emma

Get paid to review my blog post

Subscribe to RSS feed Subscribe | By e-mail

Links

Previous Posts

Archives

Categories

webmaster help