Link to home
Start Free TrialLog in
Avatar of Barthax
BarthaxFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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.
Avatar of Barthax
Barthax
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

No errors in event log, either...
SOLUTION
Avatar of pmrussell892
pmrussell892

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pmrussell892
pmrussell892

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Barthax

ASKER

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?
Avatar of Barthax

ASKER

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
what extension does you php script have on it?

ie

.php
.php3
.php4
.sphp
Avatar of Barthax

ASKER

.php.

Problem is fixed now, thanks. :)