Jump to content

Archived

This topic is now archived and is closed to further replies.

steelmanronald06

WOW! This sucks!

Recommended Posts

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:

[quote]
Set [i]PATH[/i] 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
[/quote]

Here is what my httpd.conf file looks like:
[quote]
# 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"
[/quote]
[quote]
    #
    # 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
[/quote]

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!*

Share this post


Link to post
Share on other sites
It still isn't fixed, but I made progress. I moved all the lines together, like so:

[quote]
#LoadModule php5_module "C:/php/php5apache2.dll"

    AddType application/x-httpd-php .php

    #PHPIniDir "C:\php\"
[/quote]

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
[quote author=wildteen88 link=topic=107707.msg432579#msg432579 date=1158051087]
If you are using PHP with Apache2.2.x then thats your problem. PHP isnt compatible with Apache2.2.x.
[/quote]

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"?

Share this post


Link to post
Share on other sites
Go to the commandline and enter:

[quote]C:\Program Files\Apache Group\Apache2\bin\Apache.exe [b]-w -t -f [/b]"C:\Program Files\Apache Group\Apache2\conf\httpd.conf" -d "C:\Program Files\Apache Group\Apache2."[/quote]

That should tell you were and what the error is.

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 2.8.2.4.

http://www.wampserver.com/en/

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.