LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Index.php (on Server) offered for download rather than being interpreted? (https://www.linuxquestions.org/questions/linux-server-73/index-php-on-server-offered-for-download-rather-than-being-interpreted-782960/)

AndreasM 01-18-2010 07:54 AM

Index.php (on Server) offered for download rather than being interpreted?
 
Hello,
I have SLES10 SP3 with Apache2 in version 2.2.3 and php5.

I have a virtual host configuration with one vhost.
The /etc/apache2/listen.conf:

Code:

NameVirtualHost 10.145.21.186:80

Listen 10.145.21.186:80
Listen 127.0.0.1:80

The vhost is configured thru
/etc/apache2/vhosts.d/_web-ims.conf

In _web-ims.conf:

Code:

Include /etc/apache2/conf.d/*.conf
This directory (/etc/apache2/conf.d) also contains the php-config-file php5.conf which now gets interpreted (I suppose):
Code:

<IfModule mod_hph5.c>
        AddHandler application/x-httpd-php .php4
        AddHandler application/x-httpd-php .php5
        AddHandler application/x-httpd-php .php
        AddHandler application/x-httpd-php-source .php4s
        AddHandler application/x-httpd-php-source .php5s
        AddHandler application/x-httpd-php-source .phps
        DirectoryIndex index.php4
        DirectoryIndex index.php5
        DirectoryIndex index.php
</IfModule>

Actually things are working OK.

However, ON THE SERVER php only gets interpreted by the FireFox browser when called upon localhost:
http://localhost/web-ims/index.php
//Works fine.

When called thru the IP:
http://10.145.21.186/web-ims/index.php
//then index.php is offered for Download ???


BUT when I call
http://10.145.21.186/web-ims/index.php
FROM ANOTHER CLIENT-COMPUTER, for example my windows computer with XP, using Internet Explorer, then it works!
So, does s.o. have any idea why the same call that does work on another client does not work on the Server? And why does the call with localhost on the server work?

Is that a bug in the FireFox-Browser or where do I have to tell him that he should interpret the php-code also from the IP and not only from loccalhost?

Thank you for letting me know.

Andreas

willl_d 01-18-2010 08:46 AM

change

<IfModule mod_hph5.c>


to

<IfModule mod_php5.c>

AndreasM 01-19-2010 03:58 AM

Hi,
that was just an error in publishing in the forum.
It is correct in the file on the server.
Sorry about that.

The error persists.

Sincerely

Andreas


All times are GMT -5. The time now is 02:43 AM.