LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 01-18-2010, 08:54 AM   #1
AndreasM
LQ Newbie
 
Registered: Jan 2010
Posts: 13

Rep: Reputation: 1
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
 
Old 01-18-2010, 09:46 AM   #2
willl_d
LQ Newbie
 
Registered: May 2007
Location: Vienna, VA
Distribution: RHEL, Fedora, Ubuntu, AIX, Mint, Solaris
Posts: 14

Rep: Reputation: 1
change

<IfModule mod_hph5.c>


to

<IfModule mod_php5.c>
 
Old 01-19-2010, 04:58 AM   #3
AndreasM
LQ Newbie
 
Registered: Jan 2010
Posts: 13

Original Poster
Rep: Reputation: 1
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the default webpage configuration from index.php to index.htm, etc meema Linux - Server 4 08-22-2008 10:06 PM
Apache 404 index.php not Found but index.php exists at document root mark84 Linux - Server 20 07-27-2008 02:55 AM
Ubuntu Dapper + apache2 + php5 = download index.php dfwcomputer Ubuntu 1 10-23-2006 10:28 PM
Suse 9.3/apache2/php4 - Firefox tries to download index.php, other *php pages work stefanlasiewski Suse/Novell 1 01-18-2006 07:12 PM
Php is not getting interpreted? swatward Programming 1 07-31-2005 04:48 PM


All times are GMT -5. The time now is 05:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration