X
Tippen Sie hierhin, um die Version dieser Website für Mobilgeräte aufzurufen.

Hilfeforum

Is it possible that Firefox prevents serverside includes (SSI) from functioning?

Veröffentlicht

I am no doubt asking in the wrong place, but...I have Apache2 running on a linux locally. I believe I have set it up to support server-side includes. I have a cgi-bin perl script, hell.pl:

#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "Hello, world\n";
exit;

Under Firefox, I can generate the Hello World page through the url

xxx.xxx.xxx.xxx/cgi-bin/hell.pl

where xxx.xxx... is the apache2 server address.

But if I try to do that via the html file:

<HTML>
<HEAD></HEAD>
Test:<BR>
<BODY>
<!--#include virtual=/cgi-bin/hell.pl" -->
</BODY></HTML> 

All I get is page which is blank except for the "Test:" on line 1. The apache error and access logs show no relevant problems, as if the browser treats the serverside include as a comment.

I realize that the fault no doubt lies with the apache2 configuration, but I have studied and studied... and am now clutching at straws.

I am no doubt asking in the wrong place, but...I have Apache2 running on a linux locally. I believe I have set it up to support server-side includes. I have a cgi-bin perl script, hell.pl: <br /> <pre><nowiki>#!/usr/bin/perl print "Content-type: text/html\n\n"; print "Hello, world\n"; exit; </nowiki></pre> Under Firefox, I can generate the Hello World page through the url xxx.xxx.xxx.xxx/cgi-bin/hell.pl where xxx.xxx... is the apache2 server address. But if I try to do that via the html file: <br /> <pre><nowiki><HTML> <HEAD></HEAD> Test:<BR> <BODY> <!--#include virtual=/cgi-bin/hell.pl" --> </BODY></HTML> </nowiki></pre> All I get is page which is blank except for the "Test:" on line 1. The apache error and access logs show no relevant problems, as if the browser treats the serverside include as a comment. I realize that the fault no doubt lies with the apache2 configuration, but I have studied and studied... and am now clutching at straws.

Geändert am von cor-el

Ausgewählte Lösung

jerryerp wrote:

Is it possible that Firefox prevents serverside includes (SSI) from functioning?

I don't see how. A browser can only botch client-side scripting like Javascript.

jerryerp wrote:

I realize that the fault no doubt lies with the apache2 configuration [...]

By default, SSI is only interpreted for special file extensions like .shtml. See the “Configuring your server to permit SSI” section of the Apache tutorial for details on how to change this.

Diese Antwort im Kontext lesen 1

Mehr Details zum System

Installierte Plugins

  • npsitesafety
  • Shockwave Flash 11.4 r402
  • RealJukebox Netscape Plugin
  • RealNetworks(tm) RealPlayer Chrome Background Extension Plug-In
  • RealPlayer(tm) HTML5VideoShim Plug-In
  • RealPlayer(tm) LiveConnect-Enabled Plug-In
  • RealPlayer Download Plugin
  • Google Update
  • np-mswmp
  • Next Generation Java Plug-in 1.6.0_33 for Mozilla browsers
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • 4.1.10329.0
  • NPWLPG
  • GEPlugin
  • Adobe PDF Plug-In For Firefox and Netscape 8.3.1
  • The plug-in allows you to open and edit files using Microsoft Office applications
  • Office Authorization plug-in for NPAPI browsers
  • Delivery Network Acceleration by BitTorrent™
  • Windows Presentation Foundation (WPF) plug-in for Mozilla browsers

Anwendung

  • User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:16.0) Gecko/20100101 Firefox/16.0

Weitere Informationen

Gingerbread Man 403 Lösungen 1537 Antworten
Veröffentlicht

Ausgewählte Lösung

jerryerp wrote:

Is it possible that Firefox prevents serverside includes (SSI) from functioning?

I don't see how. A browser can only botch client-side scripting like Javascript.

jerryerp wrote:

I realize that the fault no doubt lies with the apache2 configuration [...]

By default, SSI is only interpreted for special file extensions like .shtml. See the “Configuring your server to permit SSI” section of the Apache tutorial for details on how to change this.

''jerryerp wrote:'' Is it possible that Firefox prevents serverside includes (SSI) from functioning? I don't see how. A browser can only botch client-side scripting like Javascript. ''jerryerp wrote:'' I realize that the fault no doubt lies with the apache2 configuration [...] By default, SSI is only interpreted for special file extensions like '''.shtml'''. See the “Configuring your server to permit SSI” section of the Apache tutorial for details on how to change this. * http://httpd.apache.org/docs/2.2/howto/ssi.html

Fragesteller

But not entirely. In the first instance, I tried the .shtml route suggested in the docs section by adding the Options, Addtype, and AddOutputFilters lines to the .htaccess file in /.htdocs and renamed hello.html to hello.shtml. At first, this simply created a page listing the hello.shtml file. Then I moved the configuration changes to the httpd configuration file and restarted apache. The result was the same as I reported earlier. Changing the hell.pl reference in hello.shtml and the file name in the cgi-bin directory to hell.shtml gave the same result.

Next I tried the XBitHack method to yield the result I reported earlier. It seems then that something hidden in my configuration file is the problem. Thanks anyway.

But not entirely. In the first instance, I tried the .shtml route suggested in the docs section by adding the Options, Addtype, and AddOutputFilters lines to the .htaccess file in /.htdocs and renamed hello.html to hello.shtml. At first, this simply created a page listing the hello.shtml file. Then I moved the configuration changes to the httpd configuration file and restarted apache. The result was the same as I reported earlier. Changing the hell.pl reference in hello.shtml and the file name in the cgi-bin directory to hell.shtml gave the same result. Next I tried the XBitHack method to yield the result I reported earlier. It seems then that something hidden in my configuration file is the problem. Thanks anyway.