Site testing server on your hard drive

  Taran 16:33 21 Oct 2003
Locked

This may be a bit advanced for many people but it has become apparent through some of the questions being asked in here that some WebDesign forum users could benefit from a local web server on their hard drive for site testing.

This is especially useful where dynamic sites are being developed using ASP or PHP and/or where database site integration may be required.

It becomes inconvenient and irritating to upload your files to your live-hosted web root folder every time you want to test things and this is where a local server environment comes into its own.

Windows 2000 and XP Professional include the excellent and easy to configure and use IIS (Internet Information Services) while most earlier versions of Windows have PWS (Personal Web Server) included.

Windows Millennium and Windows XP Home have been left completely high and dry though, and users of these operating systems find that they have no native support for IIS or PWS.

This only really leaves Apache as a realistic alternative, but despite the fact that Apache is a superb application it is not quite a walk in the park to set up and configure. Even if or when you do get it up and running, it does not natively support ASP but can be made to run it using some interesting jiggery pokery so unless you only ever want to use PHP for dynamic sites, sooner or later you'll have to start doing some software surgery on your computer.

Now, if you got this far without falling asleep, here we go:

Windows Millennium can be made to run PWS. The process is not unduly difficult and may be slightly easier than wrestling with Apache for most users.

You can download PWS from the Microsoft page Windows NT 4.0 Option Pack for Windows 95 which can be found at click here

Make sure you select the download option for Windows 95. The files come to about 25mb in total and the largest is about 6mb so even narrowband dial up users can grab them.

Next you need to get an updated DLL file for the error messages you will probably get when you try to install PWS on WinME. You can get this file here along with instructions on how to use it: click here

A good article on the setup process and some possible issues can be found here: click here

I've just set PWS up on one of my desktop machines that still runs WinME and it works just fine, allowing me to play with ASP sites and similar.

Windows XP Home will run IIS if you want the challenge of installing it. Running a search in Google will throw up lots of articles and how-to pages. I shan't link to them directly here, since they are easy enough to find and follow yourself.

So if the thought of Apache fills you with dread (and well it may) IIS or PWS could be an option, depending on your version of Windows. The obvious advantage to IIS and PWS is their full native support for ASP and Access databases and it is relatively easy to set up and configure MySQL and PHP for them too. Far easier, in my opinion, than using Apache on Windows for PHP/MySQL then trying to shoehorn ASP support into the fray.

There are also some excellent alternatives like NuSphere for PHP and MySQL environments but that is another story.

The important thing here is not to think that just because you have Windows Millennium or XP Home that running a testing server is impossible.

Clearly it isn't, it just requires a bit of an adventurous spirit.

Regards

Taran

  Taran 16:40 21 Oct 2003

The advatages to running a testing server for dynamic sites are tremendous.

You can 'upload' your site to the testing server (a folder on your hard drive) and fully test the ASP or PHP pages and any underlying database connections before loading your site up to its home on the web.

If you use FrontPage you can also test your sites taking full advantage of FrontPage Server Extensions since you can install and configure them on your local testing server.

Even for static sites there may still be CGI or PHP feedback form scripts that you need to test prior to upload.

Finally, one important step I should have pointed out initially - security.

Any web server software will 'listen' for traffic so you have to use some common sense (and a firewall) to prevent outside access.

Good luck !

Taran

  Taran 16:48 21 Oct 2003

All of the high-end web editing software can hook into dynamic content pages for data driven sites.

Dreamweaver, FrontPage, Namo Web Editor, Adobe GoLive, NetObjects Fusion and so on all have the ability to create, test and publish dynamic sites and database connections.

I realise that this will be beyond the needs of may people but it's nice to see a few faces in the WebDesign forum getting their sleeves rolled up in data driven sites.

To these people, a testing server is a godsend.

T

  harristweed 12:39 22 Oct 2003

I tried PWS and found it 'flaky' to say the least. I set up Apache with no trouble and found MYSQL equally easy.

I totally agree with Taran that it is essential to be able to test locally.

I don't use ASP so can't comment on it, but I get on very well with PHP finding it very forgiving. I would recommend PHP and MYSQL to anybody that requires a database on their web site.

  Taran 14:25 22 Oct 2003

The main advantages to PWS and IIS are twofold:

1. First and possibly most important, since they are built into most versions of Windows they can be easily installed by using the Add/Remove Programs applet in the Control Panel, after which configuring them is relatively simple.

2. To anyone using FrontPage and Access/Excel, their native ASP and FontPage Server Extensions support is a godsend, allowing dynamic sites to be easily tested prior to deployment to a Windows web server.

Getting Apache to run ASP scripts is, in my view, far, far harder than getting IIS to run PHP and MySQL.

I agree though, that persuading PWS to run PHP is no easy task.

It all boils down to implementing an appropriate solution to your needs.

If you primarily intend to use PHP/MySQL then Apache is an excellent solution, if a little difficult to set up sometimes for beginners.

It's nice to see quite a few forum members getting to grips with dynamic content. Long may it continue.

I would also back harristweed up in his recommendation for PHP and MySQL. The two combined are very formidable in capability yet are relatively easy to get to grips with.

Their greatest advantage (arguably) is that just about all web hosts offer PHP and MySQL as part of your hosting package while paying for Microsoft ASP requires Windows hosting at a cost premium. This may not be of much note to a large corporate project and ASP certainly has its place, but to newcomers or for projects where initial setup costs are an important consideration, PHP and MySQL can really come into their own.

T

  The Paul 13:17 01 Dec 2003

Wow - thats nearly as hard as War & Peace. I think this is what I'm looking for but am terrified that I dont understand most of what you have said here.

Recently, I upgraded my PC system and included a MS MultiMedia KB which utilises all the F keys. I used to simply press F12 to view my sites in the browser and always assumed that I was doing this offline. Since getting the new kit, I cannot use F12 (as its assigned to my default printer) and everytime I want to connect to my web server to put or synch files I cannot get on.

When I click on the connect icon (the two wee plug things) it appears to connect okay and even confirms this - but it then immediately brings up another window with a progress bar showing that it is trying to connect to the server. It fails and drops the conenction. AS far as I can see, its something to do with the "Tetsing Server". I have cleared out the info to show that there is NO testing server set up - but still it tries to connect.

If I do as you suggest above, will this fix this infuriating problem.

Thanks Taran
- Paul

  Taran 14:07 01 Dec 2003

What OS are you running, are you using IIS, PWS or Apache and are you running web editing software with either of those three ?

I', assuming we're talking about narrowband and not broadband ?

In brief, you need to have your local server actually running and configured to treat your root folder as a web directory for it to work in allowing you to preview designs and functions of your web pages.

I'm not sure whether your problem may be to do with page caching and refresh intervals in your browser settings.

You don't actually need a web server running locally to test most HTML based web page functions: any browser will do for that. It's when you intend playing with FrontPage server extensions, ASP or PHP pages, CGI script testing and other things that you need to be running the site from either a local web server (IIS, PWS or Apache) or testing it live on a real web server on your hosted account.

For IIS you need to specify the web folder it is to use as a Virtual Directory (a folder that IIS knows you want to serve web pages and functions from).

Under XP and 2000, go to Control Panel, double click on Administrative Tools, double click on Internet Information Services, click the + sign where it says YOUR COMPUTER NAME local computer, then click the + sign next to Web Sites, then again next to Default Web Site. This is your web testing folder. Right click on Default Web Site, scroll down to New and select Virtual Directory. Follow the Wizard to set up a root folder on your hard drive for web testing.

Now, in the right hand panel of IIS, right click on the document you want to test and left click on Browse. This launches it as a served document from the IIS web server in your browser and any scripts and functions should be 'live' and working. For email, FrontPage extensions and CGI scripts you need to tweak the parameters of SMTP and/or your web folders permissions to run scripts to get things running properly.

Now, after all of that, you're going to tell me that I've misread your question, or misunderstood it, or that you aren't running IIS...

;o)

Post back if this is way off the mark.

Regards

Taran

  The Paul 14:14 01 Dec 2003

I've discovered that the problem was my Firewall. This had never been a problem before now, but it now blocked access to my server.

As for the other issue of previewing my site (previously using F12 key) will what you describe above sort out the problem.

I hope that you dont mind me jumping in on this thread. If you prefer, I'll start a new thread.

  Raywood 14:29 01 Dec 2003

Having a local server on your hard drive to test your website may not be all that helpful. For example if you want to test how quickly the site downloads. You would get a quicker response on your hard disk. It has a higher bandwidth than you can get on the internet. The result could be websites that take half a day to download.

  The Paul 14:38 01 Dec 2003

Sorry - I didnt see your earlier posting.

The firewall was blocking access to my server. It was never a problem in the past and I'm not sure how it became a problem now.

So - I can now access the server to put files etc. What I cannot do is view a page offline while I'm working on it. The rpeview button gives me a message which tells me that it is "Waiting For Server" and then this fails which produces a message saying that "I have lost the connection with the server". I have no idea why this is or what has changed to produce this. Previously I just pressed F12 and up popped an offline IE6 window showing the page. I cannot use F12 as the keyboard uses it for a print command.

I guess from what you say above that setting up a local network isnt really going to sort out this problem.

Raywood - I guess this is sort of what you are saying too.

Thanks guys.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Fujitsu Lifebook P727 laptop review

Microsoft Paint set to die after 32 years

Mac power user tips and hidden tricks

Comment désactiver la saisie intuitive et paramétrer votre clavier ?