Jump to content


WOW! This sucks!

  • Please log in to reply
6 replies to this topic

#1 steelmanronald06

  • Staff Alumni
  • Advanced Member
  • 2,004 posts
  • LocationOk

Posted 12 September 2006 - 12:17 AM

Yeah, it has been SOOO long since I have installed php and apache on a windows box. :'(  Why can't some people just go with Linux?  LAP is so much easier to set up than WAP.  Anyways, here is my problem. I add the correct lines into my httpd.conf file and my apache won't start. Below are my stats:

Set PATH by using the Environment Variables in the System (Under Control Panel) to ;c:\php
My php is installed at C:\php
My apache is installed at:  C:\Program Files\Apache Group\Apache2
I'm installing PHP 5 (latest install)
I'm using Apache 2.2
I renamed php.ini-dist to php.ini in my C:\php folder

Here is what my httpd.conf file looks like:

# Example:
# LoadModule foo_module modules/mod_foo.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule headers_module modules/mod_headers.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
LoadModule php5_module "C:/php/php5apache2.dll"

    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    TypesConfig conf/mime.types

    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #AddType application/x-gzip .tgz
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php

    # Configure The Path To php.ini
    #PHPIniDir "C:\php\"

    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #AddHandler cgi-script .cgi

Those are just parts of it.  You will find the LoadModule in the first part and the AddType/php.ini path in the second one.  Just thought I would include a bit of extra so you could get a general idea of where they were placed. :)  Thanks.

*I hate WINDOWS!*

#2 steelmanronald06

  • Staff Alumni
  • Advanced Member
  • 2,004 posts
  • LocationOk

Posted 12 September 2006 - 12:24 AM

It still isn't fixed, but I made progress. I moved all the lines together, like so:

#LoadModule php5_module "C:/php/php5apache2.dll"

    AddType application/x-httpd-php .php

    #PHPIniDir "C:\php\"

Notice that LoadModule and PHPIniDir are both commented out.  If I uncomment them then my apache won't start.

#3 wildteen88

  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 12 September 2006 - 08:51 AM

If you are using PHP with Apache2.2.x then thats your problem. PHP isnt compatible with Apache2.2.x. You'll need to download either the latest CVS version of PHP, or download the php5apache2_2.dll from apachelounge.com to get PHP to work with Apache2.2.x

A better option would be to downgrade Apache to Apache2.0.x.

Your configuration is correct, its the compatiability issue with PHP and Apache2.2.x.

#4 effigy

  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 12 September 2006 - 01:11 PM

If you are using PHP with Apache2.2.x then thats your problem. PHP isnt compatible with Apache2.2.x.

I've been using PHP with Apache 2.2.2 for months and I haven't had a problem.

Should your PHPIniDir be uncommented and changed to "C:/php"?
Regexp | Unicode Article | Letter Database

#5 448191

  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 12 September 2006 - 01:46 PM

Go to the commandline and enter:

C:\Program Files\Apache Group\Apache2\bin\Apache.exe -w -t -f "C:\Program Files\Apache Group\Apache2\conf\httpd.conf" -d "C:\Program Files\Apache Group\Apache2."

That should tell you were and what the error is.

It's like asking Apache: -w -t -f ?? Why won't you start? :P

#6 R_P

  • Members
  • PipPipPip
  • Advanced Member
  • 98 posts

Posted 13 September 2006 - 04:38 PM

I [heart] WAP. Don't be a playa hata.  ;D

Kidding aside ... I've had to downgrade to Apache 2.0.x for PHP compatibility unless the newest release of Apache 2.2.x fixes the issue. Your httpd.conf seems to be just fine. BTW - apachelounge has some great stuff for WAP - mod_security is pretty tight.

Also, you shouldn't have to use the PHPIniDir directive as long as C:\Windows or C:\WINNT is in your system PATH (environmental variable). Or if php.ini is already in C:\php.
Pro in: Win2K3S | Apache2 | PHP5 | Perl5 | MySQL | MSSQL | Firefox | Photoshop
Student of: Ubuntu6 | Java | C | VB.NET | ASP.NET
Developer: Roddzilla Webstudios, Burrson CG, DVIDSHUB, The Four Nations
Student: Georgia Tech, Georgia Tech College of Computing

#7 dbrimlow

  • Members
  • PipPipPip
  • Advanced Member
  • 712 posts

Posted 02 October 2006 - 01:55 PM

Since you are trying to get LAP on Win, why not just go ahead and download WAMP?

It really is so much easier than configuring the conf/ini files yourself.

The new release of WAMP5 now comes with PHP 5.1.6, Apache 2.0.59, MySQL 5.0.24a and phpmyadmin


I am always amazed by no matter how much I know, I know I don't know as much as I thought I knew.  - D. Brimlow.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users