Forum Moderators: phranque

Message Too Old, No Replies

new server - lost server parsed ssi -

         

iggy99

11:48 pm on Mar 29, 2006 (gmt 0)

10+ Year Member



hi everybody - been out of the loop for a while...

getting back into things

we have a new leased web server

i have total ssh access to box

for 5 years - 4 different web servers we have successfully used htaccess to add handler and parse html pages to use includes

we have done this to include files and well as to serve wep pages with data based on user agents

htaccess is 'working' on this web site ( i had to modify http.conf for the site to accept htaccess - otherwise we got internal server error)

ok here goes

this htaccess file will no longer get the job done - the ssi is not parsed and the ssi tag is viewable on web page view source

htaccess

Options Includes +ExecCGI
AddType text/x-server-parsed-html .html .htm

DirectoryIndex /index.html

and the ssi tag that is no longer parsed
<!--#include virtual="/folder1/file-counter.cgi?site=one"-->

the folder and file are good and in the web site tree

now i change htaccess file to this

Options Includes +ExecCGI
AddType text/html .html
AddHandler server-parsed .html

with same ssi tag
<!--#include virtual="/folder1/file-counter.cgi?site=one"-->

file is now parsed but we get this error displayed on web page "[an error occurred while processing this directive] "

ok so i go to web server log file and find this error message

ErrorDocumen$[Wed Mar 29 17:05:14 2006] [error] [client my ip removed] missing directive name$ name in parsed document

how do i bring ssi in parsed html back to life?

we are using unix server with blue quartz server software

many thanks for help - this has been killing me :)

moltar

12:21 am on Mar 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It seems like the problem is not with SSI, but with the script you are trying to include. Try running the script directly in the browser to make sure it works.

iggy99

12:57 am on Mar 30, 2006 (gmt 0)

10+ Year Member



thank you for the thought...

this is not just the file - also effects 'if' ...
this htaccess

Options Includes +ExecCGI

AddType text/x-server-parsed-html .html .htm

<!--# if expr="\"$HTTP_USER_AGENT\"!= /Mozilla¦MSIE¦Opera¦Lynx¦WebTV¦NCSA Mosaic/" -->

info here info here whatever we need here goes here

<!--#endif -->

this does not parse at all anymore but change htaccess as outlined above we get errors as stated above...

i do not get it...

iggy99

1:12 am on Mar 30, 2006 (gmt 0)

10+ Year Member



moltar thank you for the suggestion to look at the cgi file -

i see it is corrupted - Premature end of scrip headers

so this tells me we are parsing the virtual file just fine and the error message is strictly regarding

<!--# if expr="\"$HTTP_USER_AGENT\"!= /MozillaŠMSIEŠOperaŠLynxŠWebTVŠNCSA Mosaic/" -->

info here info here whatever we need here goes here

<!--#endif -->

this is causing this display in webpage "[an error occurred while processing this directive]"

and this error in web server error_log "missing directive name in parsed document"

how do i get this 'if' working again?

many thanks

moltar

1:36 am on Mar 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Remove the space between "#" and "if" and make it <!--#if ...

iggy99

3:31 am on Mar 30, 2006 (gmt 0)

10+ Year Member



:) :) :)

My hero for the day!

this htaccess

AddType text/html .html
AddHandler server-parsed .html
Options Indexes FollowSymLinks Includes

now works with

changes you suggested

i had to do same to closing tag...

<!--#endif -->

i would really like to know how - why...

i have used this the 'old' way for many years on many unix - apache boxes...

how is this explained?

a great many thanks...

Iggy

iggy99

3:42 am on Mar 30, 2006 (gmt 0)

10+ Year Member



why do you think this server refuses to accept/ recognise "AddType text/x-server-parsed-html .html .htm" in htaccess file for other successful occasion of use?

jdMorgan

4:43 am on Mar 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



"AddHandler server-parsed .html .htm" would be valid, but I have never seen "AddType text/x-server-parsed-html .html .htm" used anywhere.

Jim

iggy99

5:16 am on Mar 30, 2006 (gmt 0)

10+ Year Member



i think it is used by many...

in fact i think i picked it up here some 5 years ago...

see this google search ...

[google.com...]

iggy99

4:16 pm on Mar 30, 2006 (gmt 0)

10+ Year Member



Hello,
The server is running Apache/2.0.52 (BlueQuartz)