Fix – Website shows “an error occurred while processing this directive”
I came across this maddening error, when I had a website I needed to archive. I spidered the website, had a local copy that looked good, and uploaded the website. But, now the website had “an error occurred while processing this directive” right where some important content existed (the sidebar).
As it turns out, the error is from SSI – server side includes. I had
<!--#comment-->
sprinkled liberally throughout the code. And yes, it was a wordpress blog I intended to archive. The wordpress theme had rendered the code after the SSI, so it would work fine while in wordpress, but would not upload correctly.
Solution:
change
<!--#comment-->
to
<!-- comment-->
Totally easy fix, once you know.
Hope that helps,
–Ben
Sources: Bluehost Forum


about 2 years ago
Wow! Thank you so much! This was driving me absolutely mad. And, ya, totally works!
about 1 year ago
Thanks a ton!
about 10 months ago
WOW! Thank GOD this worked! Thank you for posting this! Totally fixed my problem. Thank God for the internet! FEW!
about 2 years ago
No problem. Glad you found it useful.
–Ben
about 1 year ago
You saved me!!!!
about 1 year ago
Your awesome, this was exactly what my problem was. Kinda silly that a comment could throw an error but small price to pay to fix it. Thanks a million.
about 1 year ago
Totally agree. Like you said, at least the fix isn’t too painful.
about 1 year ago
Wow – thank goodness I found your post! I was thinking my hosting account wasn’t up-to-date when in reality it was an easy “replace all” solution – thanks so much for posting this!
about 1 year ago
Yes. That one drove me nuts. Glad you could use it.
–Ben
about 1 year ago
wow
it works like a charm
i have tried another solutions but still had the trouble
thanks a lot
about 1 year ago
thanks..! such an easy fix…
about 1 year ago
Ben,
YOUTHEMAN!!!
…..hours trying to figure this out. My comments were referencing CSS statements (duh).
Thanks a million.
Jay
about 1 year ago
WOW..thats a BIG help men!! Thumbs UP!!
The error was killing me and glad that i found u..
what a relief..thanks bRo..
about 1 year ago
No problem. Total pain in the neck, but easy fix.
–Ben
about 1 year ago
Amazing! Thanks a million!
about 1 year ago
OTG I found this!! I’ve been stuck on this for about 2 weeks now… thank you!!!!!! <3
about 1 year ago
Yikes! Those are the most frustrating bugs. Glad I could help.
–Ben
about 1 year ago
Thanks,
Super easy fix. That error scared me because my validation was just fine. They need to fix that.
about 1 year ago
Totally agree.
about 1 year ago
Many thanks Ben! I spent almost an hour trying solve this.
Jeff- from Philippines
about 1 year ago
Totally know the feeling. Glad it saved you a few minutes.
about 1 year ago
Completely overlooked this and didn’t even consider it a possibility. Thanks, Ben! Definitely keep this page up for #-loving developers to come.
about 1 year ago
Thanks!!
about 1 year ago
Thanx…..this is grt….its make me mad…so thnx a lot…
about 11 months ago
You just saved me an additional hour of beating my head against the wall. Just wish I found this sooner.
Many thanks!
Adam
about 11 months ago
Thx a lot !
about 10 months ago
First, allow me to say thank you for taking the time to post this fix. I had a similar situation with using the comment sequence. The site validated perfectly and no one at GoDaddy could see a problem. I hand code everything myself, so I began to try to find the problem through trial and error and brute logic. The site ran perfectly locally and GD could only tell me that there was a problem with the code. Since it validated using every tool I could find, I was lost. Then, after a month of going mad I stumbled on your posting. Poof! The problem disappeared. Apparently the sequence<!–# is unacceptable to Linux servers, and perhaps others. I have posted the fix in the GD forum and called them to put it in their notes. Thanks a million. Can't begin to tell you what a relief it was to get rid of the mystery error. Thanks again.
about 10 months ago
While trying to submit it, it keeps getting rewritten, but you know what I mean.
about 10 months ago
I had a php file with comments like:
// ### query database
After removing the hash marks, the page loaded–thanks a bunch!
about 10 months ago
hey buddy, what file do i find the code in?
about 10 months ago
your are the man, good solution, I were a week searching for one solution, I tasted avery thing, .htaccess with SSI inclution, etc many thing, I don’t imagine that the solution were so easy, thanj you a lot
about 10 months ago
Thank you so very much! That was driving me bonkers – I tried deleted, adjusting, renaming the php files and nothing was working. Then you come along and fixed everything!
*this has been bothering me for a few days! thank you!
about 9 months ago
Ben – I am not a geek level techie but can program get around stuff. Now, all I am doing is downloading a CSV from a website. (Web scraping). It was working fine till yesterday but it gives me this error today. I am not a server side person and in this case I am just doing simple screen scraping. How do I fix this? Here is the website and all I do is HTTPFiledownload.
http://iso-ne.com/sys_ops/op_frcstng/7day_frcst/index.html
about 9 months ago
Ok, but what file did ou all found the wrong comment?
Let me know please.
Thanks
about 5 months ago
In any html file. You just can’t have the hash marks in a comment tag.
This saved me too, was driving me crazy for a good 3 hours then I decided to google it.
about 7 months ago
Thanks.
Great Fix comes from easy fix…
about 6 months ago
hours-days maybe spent trying to fix this error. it seems to be more related to the space needing to be there than the hash or a period. TYTYTYTY!!!!!
about 5 months ago
Ok, like a few other people here I need a little more information. Please! What file or files? Where do I begin to look for these comments?
Thank you
about 3 months ago
WOW! like sooo many people who have had this error, I would like to thank you very much for this quick fix. It was also driving me mad too!
Cheers
Ray
about 2 months ago
Great! thank you sir! this issue was driving me nuts…
about 2 months ago
8 hours of going crazy! Thank you
about 2 months ago
Thanks so much! Solved my problem! My error was displaying on the homepage so I made the change on the php file for my homepage. My problem also looked like this: which I changed to and it worked!
about 2 months ago