Fresh Hoary install, php files not recognized

Albin Blaschka albin.blaschka at sbg.ac.at
Thu Mar 24 07:42:11 UTC 2005


Tony schrieb:
> I performed a clean install of Hoary on my iBook (which was previously
> running LAMPhp on Warty).  After installing Apache and PHP4, I created
> the phpinfo() to look at the setup.  But when I try to view the file
> with Firefox, it does not recognize .php files and gives me an "Open
> with", "Save to Disk" window.
> 
> Is there an additional setting in Apache that must be set to recognize
> .php files?
> 
> Tony K.
> 

Hello,
You have to check the following entries in the file httpd.conf -

If it's Apache 1.3 (that's what I use...)
There is the section LoadModules, there should be something like:

LoadModule php5_module        libexec/libphp5.so

(PHP 4 change the 5 to 4...)

*and*
You need the following line:

AddType application/x-httpd-php .php .shtml # whatever file-extension
                                             # your php-scripts have...


For Apache 2 I think it's quite the same, but here it's maybe worth 
having a look to
http://www.php.net/manual/en/install.unix.apache2.php

HTH!

Albin

-- 
---------------------------------------------------------------------
| Albin Blaschka, Mag. rer.nat
| Fachbereich für Organismische Biologie, Universität Salzburg
| Hellbrunnerstr. 34, A - 5020 Salzburg, Österreich
|
| It's hard to live in the mountains, hard, but not hopeless!
---------------------------------------------------------------------




More information about the ubuntu-users mailing list