A Conversation for The H2G2 Programmers' Corner
CSS
Pirate Alexander LeGray Posted May 15, 2008
php looks a much better choice of language, but no way of testing programs privately, and cannot manipulate dom so easily. Apache is a server, is it really needed to run php, I don't understand why I need a server to run php.
Of course php is on my web host server, but I don't like running programs in a server which are in essence experimental. For instance I found that javascript doesn't pass by reference when I got into an infinite loop. The halting condition wasn't met because it wasn't being passed.
CSS
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted May 15, 2008
http://sourceforge.net/projects/xampp/
It's simple to set up; once you've defined a local ".HTDOCS" directory every time you run it the contents will appear on any web browser pointed at 127.0.0.1 and you can test scripts etc.
CSS
Pirate Alexander LeGray Posted May 15, 2008
OS Name Microsoft Windows XP Home Edition
Version 5.1.2600 Service Pack 3 Build 2600
OS Manufacturer Microsoft Corporation
System Name BIRMINGHAM
System Manufacturer ECS
System Model M810DLU
System Type X86-based PC
Processor x86 Family 6 Model 7 Stepping 1 AuthenticAMD ~1299 Mhz
BIOS Version/Date American Megatrends Inc. 07.00T, 02/04/2001
SMBIOS Version 2.3
Windows Directory C:\WINDOWS
System Directory C:\WINDOWS\system32
Boot Device \Device\HarddiskVolume1
Locale United Kingdom
Hardware Abstraction Layer Version = "5.1.2600.5512 (xpsp.080413-2111)"
User Name BIRMINGHAM\Stephen John Davis
Time Zone GMT Standard Time
Total Physical Memory 1,024.00 MB
Available Physical Memory 504.11 MB
Total Virtual Memory 2.00 GB
Available Virtual Memory 1.96 GB
Page File Space 1.58 GB
Page File C:\pagefile.sys
Thats my pc and the download refers to i386 which I think is the expensive intel.
Will this work on my pc.
And another question, my clock is a few seconds slow, I sorta guessed the Date() object gets the time when an instance is created. Where does it get the time from; directly from a website via my ISP, or indirectly from the server the page came from.
I'm guessing that the time comes from the server the page is located, and since that is in USA, their is a delay from the server getting the time and clock receiving it
CSS
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted May 15, 2008
" the download refers to i386 which I think is the expensive intel."
Sorry.
i386 is shorthand for "Intel 80386 or better". ( http://en.wikipedia.org/wiki/80386 ) It's 21-year old technology. Trust me, it runs on *anything* that claims "x86 compatability". A Pentium is a "586", a Pentium II is a "686" etc.
Sorry.
Yes, it'll work on your machine. (AMD Athlon 1800+? Just guessing from the ID string. If it is it's the same as the machine I gave my Mum four years or so ago, except hers runs Linux... )
CSS
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted May 15, 2008
"Trust me, it runs on *anything* that claims "x86 compatability"."
Except, of course, an 8086, 80186 or 80286. But you won't see those outside museums these days.
CSS
Pirate Alexander LeGray Posted May 15, 2008
It don't work. Says it's for XP Professional, had to change browser to download it because IE wouldn't allow the download, wait ages because of crummy ISP that advertise 3.6Mbs, but you only get that for the first microsecond. Then windows, not my dog 'antispyvarious' wouldn't let me open the help file, from what bit I could see in the installation wizard requires XP professional so go no further, same as java GUI, for the rich only.
IE has changed since the SP3 download, it's much worse now and puts up yellow banners with this download has been blocked for your protection, click here for more options, so I click there and nothing happens. I downloaded a 19mb help file, clicked on it after my dog had a sniff, and nothing. It's as if it wasn't there. Right click, options/open then nothing.
CSS
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted May 15, 2008
Something's not right, then, because I installed that successfully under Windows 2000.
CSS
Pirate Alexander LeGray Posted May 15, 2008
Windows is not right, it's slower now, I get banners displayed now, my antispy doesn't make a murmer anymore. Somethings different and use to get some sort of reaction when trying to open a file. Now nothing except all other options, the help file has been deleted, that worked.
CSS
Pirate Alexander LeGray Posted May 15, 2008
I can't work on the server, my memory isn't good enough, and trying just now I did a simple php file, viewed it then deleted, but before deletion got cut off. I've had enough of this crap, all I wanted to do was write a web page in an attractive way, accessible to any with ability.
Now I feel like jacking it all in, if anybody was interested they can read what's up there already, which I find difficult to follow even with eight years experience in higher education.
What a game.
CSS
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted May 15, 2008
There must be something badly wrong with your machine, because the dump you posted earlier showed that you have a Gigabyte of RAM fitted and are only currently using half of it. It's possible to run the Apache server, PHP etc. on a 128MB machine.
I think you should do some serious virus/spyware scans. I recommend http://housecall.trendmicro.com - it's free, it's safe and the only downside is that you need to stay online until it has completed.
CSS
Pirate Alexander LeGray Posted May 15, 2008
I got it installed, disregarding the wizard that it's for XP professional. Typed 127.0.0.1 and got nothing. I did a scan earlier today with Kasperski, iswift, detail and heuristics. This takes hours and all the virus's I got during sp3 download are disinfected.
Its the SP3 thats at fault. On install mine rebooted to reveal 2 dos boxes running the scrolling messages 'parameter error' before they disapeared.
Don't know how to use this 300mb kit you suggested, I'm not an engineer and I don't know anything about servers.
CSS
Pirate Alexander LeGray Posted May 15, 2008
Right, got that bit. You have to have the server running to get to the site. But I am in firefox now and everything has speeded up a lot. So it's maybe my crummy internet connection, IE or both.
I've complained about these to the OFT and OFcom because If you went to a shop to buy a 28" tv and got a 7" delivered it would be illegal. But these just say clean the sim card or unplug it and plug it in again when you know by the very behaviour the connection is at fault, metering out downloads to too many from too few stations.
It's more like what I'm looking for.
CSS
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted May 16, 2008
Yup, you need to start the server. I installed mine as a "Service" so it always runs at startup - it doesn't use any noticeable CPU unless you're requesting pages from it, and it's really handy to be able to test things quickly without having to fire up a command prompt first.
Oh, and in case you didn't notice, a *lot* of that 300MB download is documentation, in the form of "MAN pages".
Basically, with that running you have a full, professional-level developer's kit at your disposal. Enjoy.
CSS
Pirate Alexander LeGray Posted May 16, 2008
How does the xampp site work? Is it like a mirror, fetching a page from my pc and sending it back to me. Because the download speed is seemingly instantaneous. I wish my webhost was as fast.
CSS
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted May 17, 2008
No. Anything at 127.0.0.1 is located on, and fetched directly from, your hard drive. It's not visible to the "outside world" - 127.0.0.1 is also known as the "loopback interface" or "/localhost".
All that XAMPP is is a "bundle" of about a dozen freely available packages rolled together with a single installer for your convenience. That's another reason why it's so big; there's a degree of duplication of files between packages, but the terms of the license require the package to be supplied "complete".
CSS
Pirate Alexander LeGray Posted May 18, 2008
My page, the second one called page one took 40secs to download. Most of the new stuff is in php. Is that a problem with the server, since it downloads in 127.0.0.1 in 0.5 secs.
CSS
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted May 18, 2008
The PHP stuff makes use of your processor. When you're doing it on your own machine you have exclusive use of a 1300MHz CPU; on a "free" host you have a 1/50th or 1/100th share of a 500MHz CPU. Hence the speed differential.
On a "paid-for" host you will most probably have something like a 1/30th share of a 1GHz CPU. It'll still be nowhere near as fast as running things locally on your own machine, though, so the moral is always to test things in the environment you plan to deploy them in.
CSS
Pirate Alexander LeGray Posted May 18, 2008
That table works fine for everything except IE. Things have changed abit now because I use firefox with firebug that reveals all manner of things. I view the page on my computer and see instantly the effects of changes.
With Opera I have direct access to the validator, so this is in the background and I also find safari quite pleasant to use to surf the web.
IE only gets a look in because my main mailbox is accessed through it, otherwise by now it will have been given marching orders.
Key: Complain about this post
CSS
- 101: Pirate Alexander LeGray (May 15, 2008)
- 102: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (May 15, 2008)
- 103: Pirate Alexander LeGray (May 15, 2008)
- 104: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (May 15, 2008)
- 105: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (May 15, 2008)
- 106: Pirate Alexander LeGray (May 15, 2008)
- 107: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (May 15, 2008)
- 108: Pirate Alexander LeGray (May 15, 2008)
- 109: Pirate Alexander LeGray (May 15, 2008)
- 110: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (May 15, 2008)
- 111: Pirate Alexander LeGray (May 15, 2008)
- 112: Pirate Alexander LeGray (May 15, 2008)
- 113: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (May 16, 2008)
- 114: Pirate Alexander LeGray (May 16, 2008)
- 115: Pirate Alexander LeGray (May 16, 2008)
- 116: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (May 17, 2008)
- 117: Pirate Alexander LeGray (May 18, 2008)
- 118: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (May 18, 2008)
- 119: Pirate Alexander LeGray (May 18, 2008)
- 120: Pirate Alexander LeGray (May 18, 2008)
More Conversations for The H2G2 Programmers' Corner
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."