It is currently Sun Apr 30, 2017 8:53 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: SSI problem
PostPosted: Sun Feb 01, 2009 5:00 pm 
Newbie
Newbie

Joined: Sun Feb 01, 2009 4:50 pm
Posts: 2
Could please someone explain to me what is wrong with my question to FreeHostia support. I feel like we are talking in different languages. What would be right question to ask them to fix my problem? Or may be someone here could fix it?

Thank you!

----------------
Hi,

I am using SSI ("file") in the file /www/n1wq.freehostia.com/ham/index.htm
However the server seems to ignore SSI directives. Adding .htaccess file with "Options +Includes" or "Options +IncludesNoExec" is causing Server 500 error.

I have free account, but SSI seem to be allowed for free accounts.

Thank you!
----------------
Hello,

Thank you for contacting our Technical Support Department.

SSI is allowed. But you can't use Options Apache directive within a .htaccess file. Use of Options is forbidden.

----------------
If SSI are allowed, why the server is ignoring them? When I am opening my page http://n1wq.freehostia.com/ham/ and looking at the page source, I can see SSI code there, like this:

<H1><B><font color="red">N1WQ</font></B></H1>
<!--#include file="ssi/LogUpdated.ssi" -->
</td>

The server is supposed to replace #include directive with the contents of the "file" clause, however it is not doing it, but simply ignores the directive.

The html code is correct, it works on other servers supporting SSIs.

Thank you!
--------------
Hello,

Please access your site in the browser and press the buttons "Ctrl" and "U".Then you will see your site source code and your tags in it:

<H1><B><font color="red">N1WQ</font></B></H1>
<!--#include file="ssi/LogUpdated.ssi" -->
</td>

-----------------


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 02, 2009 11:26 am 
Moderator
Moderator

Joined: Tue Feb 27, 2007 12:18 am
Posts: 521
I have never used SSI before as i tend to use php, but should the file extension be .shtml and not .htm?

_________________
http://www.mjmclocks.co.uk


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 02, 2009 3:34 pm 
Newbie
Newbie

Joined: Sun Feb 01, 2009 4:50 pm
Posts: 2
Thank you for the great idea!

Yes, it works with .shtml extension! It is a pity their support does not know it.

It worked with .htm with other hosting provider, so I would never suspect that could be a problem here.

Thank you again!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 02, 2009 11:26 pm 
Moderator
Moderator

Joined: Tue Feb 27, 2007 12:18 am
Posts: 521
Its not the sort of thing people are overly familiar with. The support people are here to sort out problems with accounts and servers, not file extensions and code. Its unusual to say the least that a host would allow .htm for .shtml files. It goes against naming conventions for starts.

Anyway, glad that it got sorted.

Josh

_________________
http://www.mjmclocks.co.uk


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 03, 2009 4:27 am 
Getting Started
Getting Started

Joined: Tue Nov 25, 2008 11:54 pm
Posts: 61
Location: Canada
To add to everyone else's posts...
As far as I understand, some servers can deal with includes in .html or .htm files, while other ones need to use .shtml or .shtm. It depends on the server and the host's preference with it... yeah so your other host could definitely have had it so that you can use SSI with .htm but not every host is the same.

Edit: woo, I'm not a "newbie" anymore on this forum

_________________
[won't be online much for a few months]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 03, 2009 3:57 pm 
Regular
Regular

Joined: Sun Apr 15, 2007 5:14 pm
Posts: 308
Location: Barrie On Ca
well .shtml is the proper way, i would never think to try it any other way.

not knocking them, but by rights, the other webhost is kind of allowing you to do it wrong, which is kind of how these problems start.

:)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 03, 2009 8:37 pm 
Getting Started
Getting Started

Joined: Tue Nov 25, 2008 11:54 pm
Posts: 61
Location: Canada
Yeah I agree with you. Then you set all your file extensions wrong and then when you come here you have to redo all the file extentions

_________________
[won't be online much for a few months]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 25, 2009 8:07 pm 
Newbie
Newbie

Joined: Wed Mar 25, 2009 7:39 pm
Posts: 2
SSI requires extra work for the server, so you really need some mechanism for signalling that a page should be checked for SSI directives.

The .shtml trick is one easy way to signal to the server that SSI will be used. This techique works on all servers that support SSI

Apache allows another technique, using file permissions to signal that a page could include SSI directives. If you're on a Linux machine (like freehostia uses) each file has a permission setting. The default setting for web pages is 644, meaning only you can change the page, but anybody can read it. Regular pages are not set to be considered executable files.

You can change the permission of a file to 755 (use the file tool from the control panel) and use the apache xbithack directive to inform apache that "runnable" html files are actually SSI files.

This is useful when you already have a site with an html extension and you want to convert it to include formats without breaking existing links.

Unfortunately freehostia does not seem to support this directive, and Windows-based servers generally do not either, as Windows doesn't use the same permissions mechanism.

The support guy did a pretty decent job, really. He did find the second-most common problem. Most servers that allow SSI only allow a very specific set of commands (and include is one of them.)

Please see my examples here:

http://www.aharrisbooks.net/xfd/book_8/chapter_4/

(be sure to look at the source separately. Viewing the source of the shtml file gives you the source after the SSI has completed, and you won't see the include directives.

_________________
HTML / XHTML / CSS All in One for Dummies
http://www.aharrisbooks.net/xfd

PHP6 / MySQL Programming for the Abs. Beg
http://www.aharrisbooks.net/ph3ed

Game Programming - the L Line
http://www.aharrisbooks.net

(all hosted on freehostia)


Top
 Profile  
 
 Post subject: SSI problem
PostPosted: Sun Sep 26, 2010 9:30 am 
Newbie
Newbie

Joined: Sun Sep 19, 2010 6:30 am
Posts: 2
Location: South Derbyshire
Isnt virtual supposed be used, not include? I thought include was for php files, while virtual was to execute SSI and cgi scripts?


Top
 Profile  
 
 Post subject: SSI problem
PostPosted: Thu May 12, 2011 11:18 pm 
Newbie
Newbie

Joined: Tue Mar 01, 2011 1:18 pm
Posts: 2
Location: Ireland
I wanted a simple web server so I could work on my web site and have a common header/foot .... and maybe a few other common items. SSI <--#include ...> looked like the appropriate solution. Alas I can not get any SSI directive to work. I admit that the cause of the problem is my gross ignorance and plead for help for anyone who might have mercy on me.

Code:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ]  Moderators: Support Team, Moderators

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Hosting | Domains | Servers | Extras | Order | Support | Contacts | FreeHostia © 2011