SJG1976 wrote:Finally got round to installing XAMPP
Good first steps, Steve...
SJG1976 wrote:And have set up a Dummy Copy fom Laptop A where the weather software runs to Laptop B where the XAMPP SofAtware is.
Are the two computers connect to a local network? That would make it easier if both computers were on the same (internal) network - drives on one computer could become a 'mapped' drives on the other computer...
SJG1976 wrote:I've out a copy of my vp1 website onto here now, for testing.
For some reason, when I try going to the
http://localhost I dont get anything
The question is 'where have you copied the templates (files) required for the creation of the web site"? I, obviously have your answer - in an area that is not accessible by the server software...
A quick lesson on server software... For safety reasons, only one of the server directory (and sub-directories) can be accessed through a browser or a FTP software, the remaining directories being invisible to any browsers/FTP software. For XAMPP, by default, the Apache server software will only give access to the 'htdocs' 'web' directory ('web' as in accessible from a browser or an FTP software). So, if you have installed XAMPP on your 'C' drive, then the 'web' directory would be 'C:\xampp\htdocs'. Any templates (files) used for the production of a web page have to be located inside that directory.
But, before you start installing everything into the 'C:\xampp\htdocs' directory, I will tell you to IMMEDIATELY STOP! Many many many years ago, as I started getting involved with the Internet, I had an excellent instructor who kept repeating the same important advice "do not install any of the web templates into the root directory"!
The root directory is the top-most directory a software or, in the case of a web server, the top-most directory a browser can access. By default, with the XAMPP package (and the default setting of the Apache server), the root directory is called/named 'htdocs'.
May I suggest that you immediately create a new sub-directory, such as 'vp1' for example - the directory tree structure will thus be 'C:\xampp\htdocs\vp1' - all the templates and directories you have copied over from you other computer will now have to be moved into the 'vp1' sub-directory.
Once you have moved all the templates (and the required sub-directories) into the 'vp1' directory, then you can point your browser to
SJG1976 wrote:Now for the fun bit, wipe all the old website and start a fresh....
Should I just re-download the Saratoga templates, and start from there?
DO NOT DO THAT - deleting everything and starting anew is NOT the solution to solving a problem, any problems!!
One does not learn anything by starting again and again - one learns something by trying to find a solution to what is causing the problem, not by deleting everything and starting again - the solution to the problem could be as simply the wrong name being used, a missing semi-colon, as you will soon find out with PHP...
In order to better learn PHP, I STRONGLY recommend that you activate the PHP debugging functions by placing the following at the beginning of every PHP templates (files):
Code: Select all
<?php
#
# templatename.php - Last modified: 15 Jul 2012 @ 12h34 <== time the template was last modified
#
##############################################################################################
# Template Group Name
##############################################################################################
#
# Project: Weather Templates
# Module: templatename.php
# Purpose: Purpose of the template
# Authors: Author's name <author_sitename.com>
#
# Copyright: (c) 2012 Author's Name
#
##############################################################################################
#
//error_reporting(E_NOTICE);
//error_reporting(E_ERROR);
error_reporting(E_ALL);
//error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
//error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', 1);
//ini_set('log_errors', 1);
//ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
#
##############################################################################################
?>
The above bit of code/text is multi-purpose, such as identifying the template, its purpose, the last time it was modified, and the original author(s) and whomever has been involved with the development of the template.
The above bit of code/text also activates the full debugging functions of PHP (in the line "error_reporting(E_ALL);") - once the code of the template is correct (such as not showing any error whatsoever) then the debugging functions of PHP can be modified to either "error_reporting(E_ERROR);" (preferred function) or "error_reporting(E_NOTICE);" (not that informative).