• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1973
  • Last Modified:

Apache, PHP and Windows XP

I had this working last week and previously on other machines... and I'm about to remove & re-install for a second time since!

I've got Apache 1.3 installed, PHP 4.3.7 (and MySQL as it happens...but that's not part of the problem) on a Windows XP machine.  It's just my workstation & I use it for testing web sites before making them live.

Every time I go to use a php page, I get an error in the main Apache error log:

[Fri Mar 18 16:36:22 2005] [warn] mod_mime: analyze_ct: cannot get media type from 'x-mapp-php4'

... and the php page does nothing.

I have a test page (test.php) with simply:

<?php
  phpinfo();
?>

... and I get a blank page back in the browser and the entry in the error log.  I have a shed-load of other php pages that perform the same, but figured I'd point out the simplest here.

Pertinent entries in the httpd.conf:

---------------------
LoadModule php4_module "C:/Program Files/php/sapi/php4apache.dll"
AddModule mod_php4.c

<IfModule mod_dir.c>
    DirectoryIndex index.php index.html
</IfModule>

<IfModule mod_mime.c>
    ....
    AddType application/x-httpd-php      .php
    ....
</IfModule>
---------------------

As you can see PHP is set up in the C:\Program Files\php directory & the cli version works a treat.  The php.ini is in the %SYSTEMROOT% and the php4ts.dll is in the %SYSTEMROOT%\SYSTEM32.

I've tried adding the following line to the mod_mime.c section of httpd.conf also, but with no change to the symptoms after a restart of Apache (killed the logs to be sure!):

    AddType application/x-mapp-php4      .php

Any ideas why it's all not gelling together?  Unless there's a snappy answerer (I'm just about to go home for the weekend), I won't be looking at the matter until Monday (GMT) morning.
0
Barthax
Asked:
Barthax
  • 4
  • 3
2 Solutions
 
BarthaxAuthor Commented:
No errors in event log, either...
0
 
pmrussell892Commented:
Since you only use the server you might want to try out XAMPP for windows from http:///www.apachefriends.org

They have a nice package with an automated installer.
0
 
pmrussell892Commented:
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
gerodimCommented:
Try my best too
 WAMP5 (windows apache mysql php5 package)

www.wampserver.com
0
 
BarthaxAuthor Commented:
OK, uninstalled Apache, MySQL & deleted the php folder.  Deleted php.ini from the Windows directory & php4ts.dll from the System32 directory.  Installed WAMP into C:\wamp (from the URL given) using the default settings apart from the DocumentRoot and did not install the example web pages.  I setup the default root & Virtual Hosts as mentioned above.

I get the error: [Mon Mar 21 15:24:48 2005] [warn] mod_mime: analyze_ct: cannot get media type from 'x-mapp-php4'

I've checked the registry and grepped the website for the text "mapp" - neither is found.  Have check the .php associations and they are still with Dreamweaver MX.

This is obviously something that goes beyond the install of Apache, MySQL & PHP.  Any tests or suggestions otherwise?
0
 
BarthaxAuthor Commented:
You are looking at a 24-carat dumb ass!

Grep of course, doesn't grep hidden files & .htaccess is a *nix-style hidden file... In the .htaccess, you guessed it... is:

AddType x-mapp-php4 .php

Many thanks for your time. :D
0
 
pmrussell892Commented:
what extension does you php script have on it?

ie

.php
.php3
.php4
.sphp
0
 
BarthaxAuthor Commented:
.php.

Problem is fixed now, thanks. :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now