Forum Moderators: phranque

Message Too Old, No Replies

SSI doesn't work again.

I have set it up and it worked yesterday, but now...

         

damlag

3:58 pm on Jul 19, 2004 (gmt 0)

10+ Year Member



Could You help me.
Yesterday I have configured my httpd.conf file and finally my SSI worked. Everything was great. But today when I try to run my file it pops up a download window and propmpts to download or open a file. When I click open it shows the file correctly, but a address bar lookslike :
C:\WINDOWS\Temporary Internet Files\Content.IE5\8XEJSP6N\filename[1].html.
Why is that. Are those changes in httpd.conf file are somehow temporary?

damlag

4:58 pm on Jul 19, 2004 (gmt 0)

10+ Year Member



Actually, not only SSI doesn't work. When I try to type any file even simple .html, it prompts me to save or open the file. What could that be? Yesterday it was fine.

jdMorgan

5:13 pm on Jul 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check your server headers [webmasterworld.com]. Your server is probably returning an incorrect MIME-type for the requested resources.

Verify that any AddType or AddHandler directives that you added are correct.

Jim

damlag

3:26 pm on Jul 20, 2004 (gmt 0)

10+ Year Member



Ok I have reinstalled apache 1.3.29 and configured httpd.conf file as follows:

......
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
........

........
<IfModule mod_dir.c>
DirectoryIndex index.html index.shtml
</IfModule>
........

........
# To use server-parsed HTML files
#
AddType text/html .shtml
AddHandler server-parsed .shtml
........

And still doesn't work. Now it doesn't prompt to save or open the file. It shows the file but doesn't show the include.

gergoe

5:31 pm on Jul 20, 2004 (gmt 0)

10+ Year Member



Do you have mod_include enabled (AddModule and/or LoadModule)?

damlag

8:19 pm on Jul 20, 2004 (gmt 0)

10+ Year Member



Yep, I have added those, but still nothing.

I have 2 files in htdocs

one index.html and it contains:
<!--#include virtual="myfile.html" -->

the other myfile.html and it contains some fluff.

Doesn't show anything. I tried to rename to .shtml although conf. file should accept .html extensions, but still nothing.

I used many tutorials and articles and they all tell pretty much the same. I don't know how but it worked few days ago. And doesn't work now.
It works ok with .php includes, but I want SSI not php.

gergoe

11:15 am on Jul 21, 2004 (gmt 0)

10+ Year Member



What shows up in the html source if you request the index.html file? If you see the ssi directives within the file then the file is not parsed properly. I suggest you to change the extension of the file to shtml (you may want to add index.shtml to the DirectoryIndex then), enable the server-info content handler and check the mod_include related information on the page and finally check out the error log there could be some entries which is connected to this problem some way.

damlag

4:07 pm on Jul 22, 2004 (gmt 0)

10+ Year Member



Thanx for help george, but I finally found the way out.

I don't understand why I didn't succeed earlier. So here's what I've done, maybe for newbies like me it will help :

Changed

Options Indexes FollowSymLinks Multiviews

to:

-------------
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options Indexes FollowSymLinks Includes
--------------

There are couple of ares of "options" in the httpd.conf file, probably that was little confusing, if You change at least one wrong line, SSI may not work.

Then changed
----------------
#
# To use server-parsed HTML files
#
#AddType text/html .shtml
#AddHandler server-parsed .shtml

to

#
# To use server-parsed HTML files
#
AddType text/html .shtml
AddHandler server-parsed .shtml .html
------------------

Important, just add .html after "AddHandler server-parsed .shtml". In many articles read that I should add .html after "AddType text/html .shtml", but that's wrong. At least for me SSI's didn't work.

I think that's pretty much all You have to do if You're configuring apache under windows 98 SE like I did.

Good luck to all.