<<<I need some help to set up the Apache server >>>

Hi everybody I’m new hear to web designing, I’m currently trying to finish installing the Apache server. I went through all the steps from the book “Build Your own Database Driven web site using php & Mysql” by Kevin Yank up to page 19. On page 18 step 8. It says I should pull up the Apache Service Monitor window. Then at the bottom I should see “Apache/2.211 (Win32) PHP/5.2.9-1” (which means I installed it correctly). Instead when I go to the apache icon at the tool box at the bottom of the computer and try to start apache. I get a error message saying “The requested operation has failed”. When I right click and go to the Apache monitor, at the bottom I only see Apache/2.211.

I’m lost and don’t know what to do. Help would be much appreciated.


WELCOME to SitePoint’s Apache forum!

Now, that’s an open question with too many possible answers to guess at here.

HOWEVER, it’s likely that you’ve missed some configuration steps, e.g., modify PATH, Disable IIS (if you got the monitor, you probably did that already) but the most likely problem is that Apache either isn’t looking for PHP (did you add the AddType and Load Module for PHP?) or can’t find your PHP installation (use quotes in the LoadModule if there are spaces in your WinDoze path).

Not being there to help, I’d recommend that you RECHECK all your work against a checklist using Kevin’s Chapter 1 as a guide. I don’t believe that he used to have the “disable IIS” so that may not be there but IIS captures Port 80 before Apache can so they don’t coexist nicely. I’ve STOPPED IIS and used its properties (in services.msc) to tell it NOT to load with Windows. Other than that, Kevin’s guide does cover all the configuration tasks you need to perform.



Skype sometimes also uses port 80.

To disable it open up Skype and go to Tools > Options > Advanced > Connections > disable “Use port 80 and 443 as alternatives for incoming connections”.

Then close Skype and start it again to make sure it closes port 80.

Thanks dklynn

Your advice worked. I frogot to put the “.” in the “php5apache2_2.dll” part that messed me up. Thanks for your advice.

Hello everybody,

I’m trying to work my first php website with apache server. I saved the file to the web root directory of my local web server. Just like it told me to do on page 50 on “How to build your own database driven web site using php & mysql” by Kevin Yank. When I put “http://localhost/today.php into the browser I get “ Not Found The requested URL /today.php was not found on this server.” I’m not sure what the problem is, but I don’t think my OS (operationg system) is acknowledging php files, because when I save today.php on the deskstop and click on it I get “Microsoft digital image 2006”.

a 404 error is not due to your OS not recognizing PHP files.

You’ve put your today.php in the wrong location. Check the filepath for your webroot to figure out where it should go.

I agree. If the server doesn’t know what to do with a certain file extension, it won’t give you a 404, it’ll have a different error. I have experienced where php file-handler isn’t set, and apache will then download the file rather than serving it. I’m not sure if that’s the case across the board with non-defined file handlers.

I double checeked to make sure I put the file in the web root directory. The php file is in the correct web root directory. Any other suggestions ??

[list][]What does your Apache access log have to say for itself
]What does your httpd.conf say for the DocumentRoot
[*]What do you get with http://localhost/

  1. My Apache server is running. I’m logged on to the apache server.
  2. The web root is (C:\Program Files\Apache Software Foundation\Apache2.2\htdocs)
  3. I get a page saying “It works”

The errata for the book has several corrections to the book that may impact how things work for you.

The errata link that you gave me are for problems in the book if one has PHP 5.3. I have PHP 5.2.13.

Or anyone else,

How can set up the PHP file handler?? Mayby I have to set it up thats why my page isn’t working.

If you have WHM access you can do it like this tutorial shows you:

Or you can do it in .htaccess if you don’t have WHM access, but that takes more knowledge. I would recommend you talk to your host, in that case.

Or with something like this added to your .htaccess:

# let's enable php (non-cgi, aka. 'module') for EVERYTHING..'
AddType application/x-httpd-php5 .htm .html .php .blog .comment .inc

ALL the configuration items (for Apache to use PHP) is in Kevin’s book. Therefore, I refer you back to your book for the LoadModule and AddType statements for your httpd.conf.