Page 1 of 2

Localhost doc - Critique please?

Posted: Sat Nov 17, 2007 8:33 pm
by Jonah Bron
Hi,

I made a doc on how to setup a localhost on one's comp. I sent it to a moderator (Everah) to be posted under "Tutorials", who suggested I post it here for critique. Well?

http://nucleussystems.com/blog/network/localhost.php

Posted: Sat Nov 17, 2007 10:37 pm
by califdon
Good idea. I noticed that the folder name of your Apache installation and its location in a Windows directory tree is quite different from the default installation that I used when I installed Apache on Windows a year or two ago. It may require a bit of research to find out what it currently is, and perhaps you should mention that the location and folder name might be different, depending on when Apache was installed, or maybe where you obtained the download.

Posted: Sun Nov 18, 2007 7:46 pm
by Jonah Bron
Thanks for the critique. I did those suggestions, and also did some changes to increase it's general readability. Anybody else?

Posted: Sun Nov 18, 2007 8:42 pm
by califdon
It's interesting that our installation directories for both Apache and PHP are so different. Perhaps because of the versions. I used the defaults in all cases, since I had no knowledge of any reason to do it differently. My Apache was installed in C:\Program Files\Apache Group\Apache\ (my old Apache 1.2 or whatever it is) and C:\Program Files\Apache Group\Apache2\ and my PHP installed in C:\PHP\ (not under Program Files). So be sure you either know for sure that the current versions install the way you described, or mention that it might be different, as you did for Apache.

It's a good effort and I think some people will find it very helpful.

Posted: Sun Nov 18, 2007 9:56 pm
by s.dot
I think when you download php, a php.ini file is not available. I think there's two, php.ini-recommended and php.ini-dist, of which you have to rename one of them to just php.ini.

I didn't see that mentioned.

Posted: Sun Nov 18, 2007 11:58 pm
by Christopher
I think the title of the tutorial should be changed to make it clear that it is about setting up Apache and PHP to run as localhost on Windows. On Unix it is a different procedure.

Posted: Tue Nov 20, 2007 5:43 pm
by Jonah Bron
is the php.ini-recommended and php.ini-dist on unix? I ask, because when I installed php, (windows) there was no renaming or anything. :?

I changed the title, as you suggested, arborint. Thanks so far. :)

Posted: Wed Nov 21, 2007 2:11 pm
by s.dot
PHPyoungster wrote:is the php.ini-recommended and php.ini-dist on unix? I ask, because when I installed php, (windows) there was no renaming or anything. :?

I changed the title, as you suggested, arborint. Thanks so far. :)
Not sure. But, on windows, you have to rename.

Posted: Sun Nov 25, 2007 12:23 pm
by Jonah Bron
Hmm. Okay, I'll put that in. Thanks.

Posted: Sun Nov 25, 2007 12:58 pm
by CoderGoblin
Personally I would just download and install Xampp :wink:

Posted: Sun Nov 25, 2007 7:04 pm
by superdezign
CoderGoblin wrote:Personally I would just download and install Xampp :wink:
Then you miss out on being able to understand how to set up Apache and PHP, which is useful to know, especially when applying for jobs as a PHP developer.

Posted: Sun Nov 25, 2007 10:20 pm
by CoderGoblin
Whilst this is true, for any tutorial, mention should be given to alternatives. Just looking at the title with "localhost" suggests a testing environment which normally you want set up quickly and the same each time if you need to recreate it. More detail would be required for a live system regarding things like security settings etc. Having installed Apache and PHP on both Linux and windows loads of times I now go for the easiest method when needing a testing environment.

Getting basic information such as that provided by phpinfo() is always a useful thing to know, not least to check which php.ini is actually being used if you have a couple scattered around.

Posted: Sun Nov 25, 2007 10:37 pm
by s.dot
superdezign wrote:
CoderGoblin wrote:Personally I would just download and install Xampp :wink:
Then you miss out on being able to understand how to set up Apache and PHP, which is useful to know, especially when applying for jobs as a PHP developer.
Very, very true. If I had setup a preconfigured apache/php/mysql, I would'nt have known anything when I went to edit files and change configurations. Reading all of the setup files and what they do is a huge +. I'd keep your tutorial as is, I wouldn't even put in links to alternative "bundle" packages, as suggested. Everything is about learning! and there's no better way to learn than doing everything manually.

Posted: Sun Nov 25, 2007 11:39 pm
by CoderGoblin
scottayy wrote:Everything is about learning! and there's no better way to learn than doing everything manually.
Agree in principal but the tutorial introduction states....
tutorial wrote:This page goes through the steps of installing APACHE web server, and PHP.
not "whilst there are alternative methods this will step you through the process to enable you to understand what is going on...".

I know it's a case of symantics but an important one. Are we trying to get something working here or teach. If we are trying to teach at the same time, a simple "Do this followed by this" doesn't work without some additional background information. At its simplest level this additional information could be links to other web sites containing the necessary information. I guess to sum up my feelings, in it's current state this is a simple guide rather than a tutorial.

Examples of additional information required include...
What is the purpose of the php.ini file and what is it responsible for ?
What sort of things are extensions ?
What is localhost (some mention of IP address 127.0.0.1 etc here would be useful) ?
tutorial wrote:Now, try some PHP!..
should actually include a php file example that should work e.g.

Code: Select all

<?php phpinfo(); ?>
as I have been suprised at how often people try to test with complex php code which has errors and think the installation is wrong when they get a blank page..

Whilst it may be obvious to many that this is a "testing" environment, to beginners it may not be and this should be mentioned.

Hope I'm not putting you off PHPyoungster. We need more people like you to add useful tutorials.

Posted: Mon Nov 26, 2007 2:50 pm
by Jonah Bron
Receiving info..processing...beep...beep...processing complete

:cry: you don't like it? (snif snif)

I'm trying to make this sort of a preperational tut for the ultimate: Setting up a web host (once I get a server comp. and figure it out). I will do what you said, CoderGoblin, and add the <?php phpinfo(); ?>, and the fact that there are other alternatives. Thanks. 8)