View Full Version : Data and web pages
Pannonian
09-12-2011, 15:02
I want webpages that will grab data from an Access database based on user given data, and display the filtered data on the page. I have basic HTML, and from the looks of things I think I can grasp CSS and javascript without too many problems. I don't know anything else about web servers. I have 2 computers on Win XP Pro over a LAN which I can use and abuse. I don't expect heavy load.
Javascript can format data, but it works on the clientside, so while I can grab data from a local database to test, it's obviously not ideal or even good enough in the end. PHP seems to be one way of doing server side scripting, but it says it needs to be installed on a computer which already has a web server, which makes me wince. The only free web server software in the wiki list of most populars is lighttpd, and like every other such software, I wouldn't know where to start.
Any suggestions as to what to use and how to begin?
Tellos Athenaios
09-12-2011, 15:34
Javascript can format data, but it works on the clientside, so while I can grab data from a local database to test, it's obviously not ideal or even good enough in the end.
PHP seems to be one way of doing server side scripting, but it says it needs to be installed on a computer which already has a web server, which makes me wince.
But: how would you intend to run PHP scripts without a PHP interpreter? Or Perl without Perl? Or Python without... ? You get the idea. If you do not want to do anything that needs installing its own runtime + server module, your options are really limited to writing your own server (ouch), or CGI programs. And if the former made you wince, the latter should really make you scream...
The only free web server software in the wiki list of most populars is lighttpd, and like every other such software, I wouldn't know where to start.
Or Apache? You could even use IIS though that might not come with XP by default (it does with Vista or 7, and you can enable/disable it from the Control Panel).
Pannonian
09-12-2011, 16:06
But: how would you intend to run PHP scripts without a PHP interpreter? Or Perl without Perl? Or Python without... ? You get the idea. If you do not want to do anything that needs installing its own runtime + server module, your options are really limited to writing your own server (ouch), or CGI programs. And if the former made you wince, the latter should really make you scream...
I was naively thinking that the php interpreter could be a relatively lightweight application, self-contained in the php installer, that could read a webpage request, send the appropriate instructions to a given database, process the data, and return the filtered data.
Which web server software are free to trial, or better still, free to run with limited features? I don't need anything fancy as yet, just something that will install, and allow the php interpreter to run off it. Or if I have the wrong end of the stick entirely, can you explain how I can go about it with minimal fuss? Like I said, I have sweet FA experience of anything web-related higher up the food chain.
Tellos Athenaios
09-12-2011, 16:50
With Apache at least you have a combination of three things:
(1) HTTP server + stuff
(2) Bridge module between script & interpreter (libapache2-mod-php5 on Debian systems but will be bundled with the installer on Windows)
(3) PHP interpreter to execute PHP code.
The bridge module also integrates configuration (httaccess) and things for PHP so you can disable/enable things based on whether or not the request goes through the PHP module. How and when the interpreter is loaded is up to the combination of (1) and (2). But to the end user/admin that is pretty much invisible.
Anyway, if you want a relatively well tested HTTP server on Windows that doesn't cost you money, I'd go with Apache 2 and PHP 5.3.
http://windows.php.net/
http://httpd.apache.org/download.cgi
Tellos Athenaios
09-12-2011, 16:55
I was naively thinking that the php interpreter could be a relatively lightweight application, self-contained in the php installer, that could read a webpage request, send the appropriate instructions to a given database, process the data, and return the filtered data.
No what the installer will give you is a PHP interpreter + frontends (called SAPIs in PHP land). Here is roughly how the round trip works:
You: request http://localhost/script.php
Server + module: .php extension -> mime type -> configs -> must run this file and send its output instead
PHP interpreter: runs the script.php file -> sends output back to HTTP server
HTTP server: checks returned HTTP headers, depending on those sends the output (or redirect or whatever)
You: receive result from server.
Pannonian
09-12-2011, 17:36
OK, thanks for that. I'll give it a try and see how I get on.
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.