Chances are you've not put the commands in the correct place, instead just
copy and pasted them into the config
file.

LoadModule php4_module C:\PHP\sapi\php4apache.dll
This has to be in the same place as all the other LoadModule commands. If
you look through your httpd.conf file for Apache, you will see a whole load
of LoadModules with #'s in front of them. You need to place the above line
at the end of that list.

If you then scroll down a bit the next section should be 'AddModule'. In
this section, you have to put the line
AddModule mod_php4.c
at the bottom of the list. Both commands are needed to properly load PHP.

Once that is done, you will need to run a search for
'# AddType allows you to tweak mime.types without actually editing it, or
to'
Below that line should be a series of AddType commands. Again, you need to
put
AddType application/x-httpd-php .php
at the end of the list.

AddType application/x-httpd-php-source .phps
is an optional feature, I personnally do not use it as I do not want people
to be able to view my source code. However it is up to you. If you do
include it, put it in the same section as the other file.

If that doesn't solve your problem, or you've done all that already, then
remember you need to restart Apache for it to take effect. Also check that
php is installed in the path you've set in httpd.conf (In this case
C:\PHP\). Also check that C:\PHP\sapi\php4apache.dll is present in the
correct folder, and that the following two files are in the SAME directory
as php4apache.dll :

php4ts.dll
php4ts.lib

Good Luck you two, let me know how it goes

Stephen


----- Original Message -----
From: "Zavier Sheran" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 03, 2003 5:14 PM
Subject: [PHP-INST] php not executed, mime type problem?


> I installed PHP 4.3.0 and Apache 1.3.27 on XP Pro.
>
> When I try to access a .php file with the browser, it offers it for
> download.
>
> Yep, I have this in my httpd.conf:
>
> LoadModule php4_module C:\PHP\sapi\php4apache.dll
> AddType application/x-httpd-php .php
> AddType application/x-httpd-php-source .phps
>
>
> I browsed the archives and this issue seems common and  goes back for
years
> on Linux/Windows and a variety of php 4.x and apache 1.3.x and 2.x
versions.
> Nobody, in this time period of years, came up with a solution that solved
> the problem of the poster.
>
> I spent the last hours trying to get it work to no avail. I had it working
2
> years ago on a Win 2K machine. Now this...
>
> Does anybody actually know what wrong (Rasmus??)? It's all setup according
> to manual and double and quadruple checked.
>
> All's fine when I execute on the command prompt. I can access al .html and
> .jpg .gif files via browser.
>
>
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to