Reply
Error Processing SHTML Includes
Old 07-08-2009, 08:04 PM Error Processing SHTML Includes
Experienced Talker

Posts: 30
Trades: 0
May have been answered before but search did not find it ... sorry if it's a duplicate.

Have website (on BlueHost) with one shtml navigation include on each page that used to work (last week) but now get error: [an error occurred while processing this directive] on each page (rest of page loads OK).

Talked to BH support and he said it must be a problem on my end but I haven't made any changes in weeks.

Any ideas?
html911rap is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 07-08-2009, 08:39 PM Re: Error Processing SHTML Includes
andrei155's Avatar
CEO of BLD Hosting

Latest Blog Post:
Cpanel Update
Posts: 1,340
Name: Andrei
Location: Canada
Trades: 6
How are you including the file?
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting - Web Hosting | Web Hosting Blog
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 07-08-2009, 09:07 PM Re: Error Processing SHTML Includes
Experienced Talker

Posts: 30
Trades: 0
<!--#include virtual="/~dvmvacco/navinc.shtml" --> hasn't changed in more than a year.
html911rap is offline
Reply With Quote
View Public Profile
 
Old 07-08-2009, 10:01 PM Re: Error Processing SHTML Includes
andrei155's Avatar
CEO of BLD Hosting

Latest Blog Post:
Cpanel Update
Posts: 1,340
Name: Andrei
Location: Canada
Trades: 6
Could you try this, and see if it solves your problem:

Code:
 <?include('/~dvmvacco/navinc.shtml');?>
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting - Web Hosting | Web Hosting Blog
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 07-08-2009, 10:19 PM Re: Error Processing SHTML Includes
Experienced Talker

Posts: 30
Trades: 0
Tried it ... no error but no navigation tabs either .. acted like it didn't recognize (process) the include.
html911rap is offline
Reply With Quote
View Public Profile
 
Old 07-08-2009, 10:32 PM Re: Error Processing SHTML Includes
andrei155's Avatar
CEO of BLD Hosting

Latest Blog Post:
Cpanel Update
Posts: 1,340
Name: Andrei
Location: Canada
Trades: 6
If navinc.shtml is in the same directory as whatever file it's being included in, please try the following:

Code:
<?include('navinc.shtml');?>
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting - Web Hosting | Web Hosting Blog
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 07-08-2009, 10:53 PM Re: Error Processing SHTML Includes
Experienced Talker

Posts: 30
Trades: 0
Again ... no error but no nav tabs

Verified that code was there (using FireFTP addon) but using Web Developer and viewed the generated source code ... the new line of code was not processed. Was like code wasn't even there.
html911rap is offline
Reply With Quote
View Public Profile
 
Old 07-08-2009, 11:33 PM Re: Error Processing SHTML Includes
andrei155's Avatar
CEO of BLD Hosting

Latest Blog Post:
Cpanel Update
Posts: 1,340
Name: Andrei
Location: Canada
Trades: 6
Mind showing me the page?

There are two things that can be done in this situation:

1) The easy way out. Open up .htaccess and type the following:
Code:
AddType application/x-httpd-php .html .php
2) Create a blank php file. In the PHP file, call the original document with the following:

Code:
<?php
include('index.html');
?>
This way, the php inside of the HTML document would be rendered. I use this type of coding for my own website. The advantage is that you can break up your current file (say index.html) into pieces... Header, Footer, Body. With every new page you want to create, all you'd need to do is switch the body include. Here's an example:

Index.php:

Code:
<?php

include('overall_header.html');

include('index.html');

include('overall_footer.html');

?>
As you can see, there is a footer, header and a body. Index.html being the body. When coding these seperate HTML documents, you must rmember that you are including them into one (in the end). Therefore, you would not have three header, and body tags ( <body>, </body> found in HTML documents), but rather one that may start in the header and end in the footer!

The advantage to this type of coding would be that if you needed to make a change to...say your header - all you would have to do is edit your overall_header.html.

I'll prove this by showing an example of another file:

Shop.php:

Code:
<?php

include('overall_header.html');

include('shop.html');

include('overall_footer.html');

?>
As you can see, the only thing that has changed is the body include. So if I were to edit overall_header.html - both shop.php and index.php would show the changes. This is especially useful when you have more than a few hundred pages!

I'm sorry that I've travelled a bit off topic. Essentially, that should solve your problem. If you'd like to know more about this type of layout - please simply say so. I can go through the problem of having the same title on every page (as the title tag would be in "overall_header.html" and included in all pages..
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting - Web Hosting | Web Hosting Blog
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 07-08-2009, 11:34 PM Re: Error Processing SHTML Includes
andrei155's Avatar
CEO of BLD Hosting

Latest Blog Post:
Cpanel Update
Posts: 1,340
Name: Andrei
Location: Canada
Trades: 6
Note that 1 and 2 are two separate solutions - not two steps to the same solution.
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting - Web Hosting | Web Hosting Blog
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 07-09-2009, 12:23 AM Re: Error Processing SHTML Includes
Experienced Talker

Posts: 30
Trades: 0
#2 sounds good ... have some Q's (I'm behind the web/CSS/HTML/PHP/SHTML curve - even tho I've maintained a website - www.dvmvac.com - for a few years).
Think (?) I understand way the plain PHP would cause my shtml's to be rendered correctly. (Would that mean the .ext names of my files would have to change? Would 'users'
still get to the website the same way? Would the linkages then 'call' the .PHP files instead of the current .shtml's - eg I have an index.html, CommCern.shtml, CVacs1.shtml, FVacs1.shtml, etc ... would I than additionally have index.php, CommCern.php, CVacs1.php, FVacs1.php, etc )?

Can see the maintenance advantage to this method ... but still don't understand why my includes suddenly crapped out.

BH support said it was a cache prb on my PC ?? NOPE !!!

If (hah - WHEN) I have problems with this, can I ask you for help (I'll try to solve it on my own ... but I'm not an expert).
html911rap is offline
Reply With Quote
View Public Profile
 
Old 07-09-2009, 12:59 AM Re: Error Processing SHTML Includes
andrei155's Avatar
CEO of BLD Hosting

Latest Blog Post:
Cpanel Update
Posts: 1,340
Name: Andrei
Location: Canada
Trades: 6
Your includes may have been affected by a server setting change on BH's end. I too am receiving the errors on your website - so it's def. not your cache. If you go with Solution 2, your includes will work no problem if you use the method I outlined in my first few posts.

While you set up the rest of your site to match the structure I outlined in solution 2 - maybe you'll use solution 1 as a temporary fix (along with the includes I outlined in my first few posts).

Essentially, instead of being presented with index.html as the "home page" you will want index.php to be. This is because index.html will only be a "body" and not contain all of the elements a whole HTML document would. Index.php, however, calls header, footer, and body to thoroughly create the HTML document as whole, and in full. Again, this is accomplished via the includes.

In order to allow index.php to be the "home page" (that is, to be the first page loaded when someone visits your website) you'll have to enter the following in your .htaccess file:

Code:
DirectoryIndex index.php index.html
Priority is given to items the more left they are. This means that index.php is given priority over index.html as a "directory Index" or rather "home page".

When linking to your new pages, you would create the links so that they point to the .php files, as they are the ones that draw the document as a whole. If you were to point at the .html file (body), you would only view a piece of the HTML document (only the body, no header and no footer. Usually CSS information is entered in the header, so your body would also be portrayed "styless").

I'm here to help, simply post your questions.
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting - Web Hosting | Web Hosting Blog

Last edited by andrei155; 07-09-2009 at 01:01 AM..
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 07-09-2009, 09:04 PM Re: Error Processing SHTML Includes
Experienced Talker

Posts: 30
Trades: 0
So I'll try to go with solution 1 initially (as a temp fix) while setting up and testing solution 2.

Suspect it's exactly as you said, BH changed the .htaccess and the support person I was speaking with didn't realize (or more likely didn't know what was required).

From your updates it looks like all my current .SHTML files can be (ie should be) changed to .HTML's and there should be a .PHP file for each page (there are only 30-40 pages in the entire website). Is that correct?

Thank you for your help ! ... And should there be further questions, is the best course to open another 'thread' in this forum?
html911rap is offline
Reply With Quote
View Public Profile
 
Old 07-09-2009, 10:15 PM Re: Error Processing SHTML Includes
andrei155's Avatar
CEO of BLD Hosting

Latest Blog Post:
Cpanel Update
Posts: 1,340
Name: Andrei
Location: Canada
Trades: 6
You don't have to change the .shtml files at all. You can simply include them as they are, and yes, each page would now require a PHP file.

Yup, I usually monitor this thread. This would be a great place to post up your questions .
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting - Web Hosting | Web Hosting Blog
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 07-09-2009, 11:14 PM Re: Error Processing SHTML Includes
Experienced Talker

Posts: 30
Trades: 0
Thank you again
html911rap is offline
Reply With Quote
View Public Profile
 
Old 07-09-2009, 11:42 PM Re: Error Processing SHTML Includes
Experienced Talker

Posts: 30
Trades: 0
OOPS - thought I was done - WRONG

Checked my website files (at BH via FTP) and .htaccess was exactly as you had indicated.

What to do now?
html911rap is offline
Reply With Quote
View Public Profile
 
Old 07-10-2009, 12:32 AM Re: Error Processing SHTML Includes
andrei155's Avatar
CEO of BLD Hosting

Latest Blog Post:
Cpanel Update
Posts: 1,340
Name: Andrei
Location: Canada
Trades: 6
Try both of the following:

Code:
AddHandler application/x-httpd-php .html .htm 
AddType application/x-httpd-php .html .htm
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting - Web Hosting | Web Hosting Blog
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 07-10-2009, 12:44 AM Re: Error Processing SHTML Includes
Experienced Talker

Posts: 30
Trades: 0
Added - but still no joy

I used Fireftp in FF3 to verify bcs didn't know any other way ... noth lines were there (had also added the DirectoryIndex line in prep for solution 2)
html911rap is offline
Reply With Quote
View Public Profile
 
Old 07-10-2009, 01:02 AM Re: Error Processing SHTML Includes
andrei155's Avatar
CEO of BLD Hosting

Latest Blog Post:
Cpanel Update
Posts: 1,340
Name: Andrei
Location: Canada
Trades: 6
Remove everything and just place:

Code:
 AddHandler application/x-httpd-php .html .htm
Also, just to confirm, What is the include code you are using?
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting - Web Hosting | Web Hosting Blog
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 07-10-2009, 01:15 AM Re: Error Processing SHTML Includes
Experienced Talker

Posts: 30
Trades: 0
Didn't work - same prb

<!--#include virtual="/~dvmvacco/navinc.shtml" -->


But goood news for solution 2 ... it works ! (of course, you knew it would) ... if you want to see what it's supposed to look like (and you have 2 extra mins) www.dvmvac.com/testsite and click on Question Form ... but don't try clicking on nav tabs yet.

Last edited by html911rap; 07-10-2009 at 01:46 AM..
html911rap is offline
Reply With Quote
View Public Profile
 
Old 07-10-2009, 08:29 AM Re: Error Processing SHTML Includes
andrei155's Avatar
CEO of BLD Hosting

Latest Blog Post:
Cpanel Update
Posts: 1,340
Name: Andrei
Location: Canada
Trades: 6
In place of

Code:
<!--#include virtual="/~dvmvacco/navinc.shtml" -->
please enter the following:

Code:
 <?php include('/~dvmvacco/navinc.shtml'); ?>
Enter that in the HTML document itself. Afterwords, be sure to enter the different .htaccess directives I have mentioned.

Code:
AddHandler application/x-httpd-php .html .htm 
AddType application/x-httpd-php .html .htm
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting - Web Hosting | Web Hosting Blog
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Reply     « Reply to Error Processing SHTML Includes

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.20941 seconds with 13 queries