Forum Moderators: coopster
I'm fairly new to the idea of creating websites, but I have a decent programming background.
I've managed to get the whole html and CSS thing going..and I'm fairly literate with it now.
The next step is to introduce dynamic content using a database... after some research I realised that the apache/php/mysql option seemed the best...however, I am having some problems understanding how the apache piece fits in!?
I installed Apache using (localhost/localhost/myemail) and it seems to be installed ok. But what now? What am I expecting to see? How do I use this to start creating some OFFLINE mySQL databases...so that I can get to the fun part and start with the PHP scripting? Am I missing the point here?
I am also having trouble "starting a service" - or whatever that means? I don't have an "Apache.exe" in my "C:\Program Files\Apache Software Foundation\Apache2.2\bin" directory?
I also can't seem to see the "It's Working" thing on localhost address.
I realise this is a pretty broad question...but I would really like a better understanding of it all. If anyone can help I would really appreciate it!
** (update) - I updated the httpd.conf file to point to my HTML directory(where I write/test my websites) in the 'DocumentRoot' and 'Directory' statements.... but when I try to install the service, it says httpd: could not reliably determine the server's fully qualified domain name, using 192.168.1.3 for Servername" - and now I cannot start the service!? **
thanks..
[edited by: Protospleen at 10:35 am (utc) on April 27, 2009]
If I drill down into each directory...it shows me the corresponding website.
:)
yeah sounds like you're on the right track-- for a dev server you usually have apache listening on port 80 of localhost or loopback (127.0.0.1) -- to actually see the rendered pages, after the php server bit has done its thing, you have to go through apache (by typing in [localhost...] or whatever into your web browser), simulating what a visitor will see in a real world situation.
What you're seeing with the "ftp" view is an apache directory listing-- you probably need to change the DirectoryIndex line in your apache conf-- this line tells apache what a valid index page is-- you may need to add index.php to the list in order for it to read the index (and therefore the site) properly.
Good luck.
My next challenge is how to integrate the PHP scripting into my html documents, so that I can read the database entries I have created, and display them as dynamic content in the page.
I haven't found any examples of this scenario, and I'm not sure if I need to do all the php scripting INSIDE my html doc, or if I need to keep the scripts separate, and reference them from the html.
I'll get there...slowly..