Forum Moderators: coopster & phranque

Message Too Old, No Replies

SSI in a header file called by a perl script

parse pages called by a perl script on apache server

         

mckcd

2:08 am on Aug 17, 2003 (gmt 0)

10+ Year Member



I have ssi in a header file but now that I have added a perl script which calls the html for the header apache won't parse the file.

Any help?

Thanks. =-]

jatar_k

4:19 pm on Aug 17, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I think a little more info is required mckcd.

What is the extension on the file?
Did you change the extension on the file?
Does apache know to parse for perl in files with that extension?
Which file won't it parse, the header or the original page trying to include the header?
Are there any error messages?

mckcd

2:26 am on Aug 19, 2003 (gmt 0)

10+ Year Member



Sorry for the lack of info.

  • The extension of the file is html (server is set to parse html for includes).

  • I have also tried changing the extension of the file to shtml and txt (both are also set to be parsed by apache and all three extensions work fine as a virtual include in an hmtl file).

  • Apache is also set to parse files with a cgi extension which is the extension of the application.

  • It won't parse the header.html file

  • No errors in the log and no error messages.
  • myself

    7:47 am on Aug 19, 2003 (gmt 0)

    10+ Year Member



    You have file header.html. When the user goes to some URL the server starts perl script. That perl script prints some contents to stdout. Among other html code the script prints the contents of header.html. You wish that SSI directives within header.html would be parsed.

    Does this describes your idea? Is so then:

    Apache cannot parse SSI directives that are in the output of the script. Web-server just sends it (output) to the user. You can solve the problem if you will install Apache 2.0.

    With Apache 1.3 you either have to parse SSI directoties yourself (it is easy!) or you may read header.html via http somelike this:


    use LWP:Simple;
    my $header = get ("http://server.some/inc/header.html");
    print $header;

    I think parsing file in script is better solution.