Re: problem reading php in browser
| From: | Rasmus Lerdorf | Date: | Wed, 20 Sep 2000 20:32:14 +0000 |
| Subject: | Re: problem reading php in browser | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-2479@lists.php.net to get a copy of this message | ||
> I just installed PHP4 on my server. Now when my browser views a file
>
> ending in .php, .php3, .php4, .phps the browser rather than displaying the
>
> file wants to download the file. It will however display a .phtml file. If
>
> the file is index.phtml it only gets displayed if it is referenced on the
> URL line. (www.xxx.xxx/index.phtml). I assume that the problem is with one
> of my configuration files, httpd.conf or php.ini. What might I look for or
>
> try?
>
>
> In the http.conf file I have configured:
> LoadModule php4_module /usr/lib/apache/libphp4.so
> AddModule mod_php4.c
> DirectoryIndex index.php index.phtml ....
> <IfModule mod_php4.c>
> AddIcon /icons/php4.gif .php3 .php4 .php .phtml
> </IfModule>
> <IfModule mod_php4.c>
> AddIcon /icons/phps.gif .phps
> </IfModule>
> <IfModule mod_php4.c>
> AddType application/x-httpd-php .php .php3 .phtml
> AddType application/x-httpd-php-source .phps
> </IfModule>
>
>
> Note that when the browser tries to download the file it says:
> application/x-httpd-php3
Do you have an "AddType application/x-httpd-php3" line anywhere in your
config? If not, it sounds like you did not restart your server, or you
could be editing the wrong httpd.conf file.
-Rasmus