Page 2 of 3
Posted: Wed Oct 01, 2003 3:33 pm
by adamk
Another thing about require and include(_once) is that the extension of the included file does not have to be any certain extension. You can leave the extensions .html as long as they have no PHP that you need parsed. If the two pages are pure html (no server side scripting I mean), then don't worry, the extension can stay the same.
Good luck with your future coding ventures.
Posted: Wed Oct 01, 2003 4:04 pm
by Berethorn
Thank you!

Posted: Wed Oct 01, 2003 6:01 pm
by Berethorn
I am not sure what to do with the download. I'm just using a home computer. My web server does have PHP, but I don't want to have to upload my pages every time I need to make a change. Especially when I'm still in the developement stage. Can I install PHP to my home computer? If so, how?
Posted: Wed Oct 01, 2003 6:13 pm
by JAM
http://se.php.net/downloads.php to download PHP.
But the hazzle comes when choosing the webserver. Most will recommend Apache, but it might require abit more editing and tweaking.
http://httpd.apache.org/.
You can also go with the Microsoft IIS server, but I've personally never used that.
Go for a try, read the manuals PHP has some good usercomments regarding installation) and get back to us if you have problems...
Posted: Thu Oct 02, 2003 4:39 am
by Derfel Cadarn
...and you'll need
Apache too, I suppose. Just to be able to test your scripts on your own PC.
Posted: Thu Oct 02, 2003 9:38 am
by jayr517
I have php, apache and mysql installed on my home computer (XP) and it only took me about an hour, at most, to setup all three. I haven't really done much editting of the Apache configs...they pretty much run fine without any intervention. I've had to tweak the php.ini a couple times, for some stuff I wanted, but other than that, it's pretty much just install and run.
It's kinda cool having my own little "intranet" too.
Posted: Thu Oct 02, 2003 9:43 am
by JAM
With "Editing and tweaking" I mean that a good host has all or nearly all extensions PHP supports loaded.
A default installation of Apache, PHP and Mysql lacks features as using mcrypt, the GD-libraries, Oracle, MSSql etc. etc.
If you are designing something that is to work at home as well as at your host, you likely need to start tweaking around in the php.ini you have at home.
Alot of people complains that "ths works at home, but not at my host" and that is often due to these facts (errorlevel reporting are set differently, include-dirs are different etc.)
Try this at your host, and at the newly installed at home.
Posted: Thu Oct 02, 2003 10:47 am
by Berethorn
Ok, I'll attemt to install, though I have no idea what I'm doing.
Posted: Thu Oct 02, 2003 12:00 pm
by Berethorn
I followed the install wizards for PHP 4 and Apache 2, and then I added some lines to the httpd.conf, but I don't know what to do now, and I didn't know what to enter when asked for my server (to replace localhost). And do I install for a module or CGI? And when It is installed, how do I view my pages - in IE?
Posted: Thu Oct 02, 2003 2:06 pm
by Berethorn
I think I have them installed properly now - but I can't change the web directory, i.e. the directory that comes up when I type
http://localhost/ on my browser. I want it to point to a folder on my desktop.
Posted: Thu Oct 02, 2003 2:32 pm
by volka
in your httpd.conf there is a property DocumentRoot which you have to change.
- open/edit httpd.conf
- find # DocumentRoot: The directory out of which you will serve your
- change DocumentRoot
- find # This should be changed to whatever you set DocumentRoot to.
- change <Directory "..previous value of DocumentRoot..">
But you might also simply place a link to the directory on your desktop
Posted: Thu Oct 02, 2003 4:07 pm
by Berethorn
I did that I'm afraid.

Posted: Thu Oct 02, 2003 4:33 pm
by jayr517
Did you stop and restart apache?
Posted: Thu Oct 02, 2003 4:35 pm
by Berethorn
Yes.

I'm going to re-install the whole thing again... Does it matter if the address has spaces (Documents and Settings).
Posted: Thu Oct 02, 2003 5:29 pm
by Berethorn
Success!!! I think the problem was I hadn't properly restarted Apache. You were right jayr517.
