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 3 years ago
you are the master! thank you so much!!!
about 4 years ago
Thank you, thank you, thank you.
The problem appears to me with a Bootstrap site with just Html and JQuery.
NO php, SSI or whatsoever language.
Site was still working but have the error message written on the menu bar! :-0
Thank you for the forth time
about 7 years ago
Oh, yeaahhh! Ben, you really-really savior man!
about 7 years ago
thx bro!
about 7 years ago
Thank you!
about 7 years ago
This was exactly what I needed. Thank you so much!
about 8 years ago
Thank you Ben!
about 8 years ago
Thank you so much Ben. I had the problem with one bootstrap theme. I could not figure out what going on. I’m very surprised that was so stupid thing blocking all jquery movement. Thanks again.
about 8 years ago
thanks a lot
about 8 years ago
Thanks a lot ….This is really an easy fix !
about 8 years ago
Brilliant.
about 8 years ago
Thanks a ton Mr. Ben !!! I was going to be admitted in a mental hospital. This is really an easy fix !
about 9 years ago
Thanks alot. You have the only solutions in whole of google indexed pages. Thanks
about 9 years ago
You just saved me hours of work! As soon as I read
<!–#
needs to be
<!–
I freaked out, knew exactly what comment I used the number symbol in, and deleting/backspacing the # out of the comment fixed it!
about 5 years ago
I think Inkscape, Gimp and Expression all serve different purposes. I prefer Inkscape for vector graphics, and GIMP for bitmap/photo maionulatnip. I think some of Gimp’s interface quirky-ness is because it tries to emulate Adobe Photoshop, and so is intuitive to those familiar with that. I find Expression appropriate for page design and layout, and relatively simple and intuitive. All just weapons in your armoury.
about 9 years ago
a clarification i think i might need is do i have to go around all the files of my installation and remove anywhere i see the # sign?
about 9 years ago
Wow! Wow! Thanks so much!!
about 9 years ago
Can you please tell me in what file that is in? This is driving me crazy. Please help! Please help!
about 9 years ago
It will generally be in the file you are accessing (ie the one in the URL bar), but if you use include language, then it could also come from an included file.
Hope that helps!
about 9 years ago
Thanks so much, would never have thought of this fix!
about 9 years ago
Thanks, It works for me!!!!
about 10 years ago
THANK YOU!
I have spent an interminable amount of time off and on trying to figure out that stupid error. This solved it!
about 10 years ago
about 10 years 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 10 years ago
8 hours of going crazy! Thank you
about 10 years ago
Great! thank you sir! this issue was driving me nuts…
about 10 years 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 10 years 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 10 years 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 10 years ago
Thanks.
Great Fix comes from easy fix…
about 10 years ago
Ok, but what file did ou all found the wrong comment?
Let me know please.
Thanks
about 10 years 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 10 years 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 10 years 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 10 years 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 years ago
hey buddy, what file do i find the code in?
about 10 years ago
I had a php file with comments like:
// ### query database
After removing the hash marks, the page loaded–thanks a bunch!
about 10 years ago
While trying to submit it, it keeps getting rewritten, but you know what I mean.
about 10 years 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 years ago
Thx a lot !
about 10 years 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 10 years ago
Thanx…..this is grt….its make me mad…so thnx a lot…
about 10 years ago
Thanks!!
about 11 years 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 11 years ago
Many thanks Ben! I spent almost an hour trying solve this.
Jeff- from Philippines
about 11 years ago
Totally know the feeling. Glad it saved you a few minutes.
about 11 years ago
Thanks,
Super easy fix. That error scared me because my validation was just fine. They need to fix that.
about 11 years ago
Totally agree.
about 11 years ago
OTG I found this!! I’ve been stuck on this for about 2 weeks now… thank you!!!!!! <3 🙂
about 11 years ago
Yikes! Those are the most frustrating bugs. Glad I could help.
–Ben
about 11 years ago
Amazing! Thanks a million!
about 11 years 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 11 years ago
No problem. Total pain in the neck, but easy fix.
–Ben
about 11 years ago
Ben,
YOUTHEMAN!!!
…..hours trying to figure this out. My comments were referencing CSS statements (duh).
Thanks a million.
Jay
about 11 years ago
thanks..! such an easy fix…
about 11 years ago
wow
it works like a charm
i have tried another solutions but still had the trouble
thanks a lot 😀
about 11 years 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 11 years ago
Yes. That one drove me nuts. Glad you could use it.
–Ben
about 11 years 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 11 years ago
Totally agree. Like you said, at least the fix isn’t too painful.
about 11 years ago
No problem. Glad you found it useful.
–Ben
about 10 years ago
You saved me!!!!
about 11 years ago
Wow! Thank you so much! This was driving me absolutely mad. And, ya, totally works!
about 11 years ago
Thanks a ton!
about 10 years ago
WOW! Thank GOD this worked! Thank you for posting this! Totally fixed my problem. Thank God for the internet! FEW!