Unrecognized content type

Found a bug? Tell us!!
Post Reply
latcarf
Regular
Posts: 25
Joined: Tue Apr 12, 2005 1:21 am
Location: Silicon Valley, CA
Contact:

Unrecognized content type

Post by latcarf »

Hello,
I'm wondering if anyone might have any insight into this:

I am running two weblogs (seperate installs) both on Serendipity 0.7.1 running with Apache 2.0 and PHP 4.3.10 on Debian GNU/Linux.

http://latcarf.com/FFXI/
http://latcarf.com/locution/

The problem I'm having is that they both seem to return an unknown content type. The W3C markup validator (http://validator.w3.org/) and Google, don't recognize the content type (and therefore can't or won't parse the pages). The blogs show up fine in Firefox, IE, Safari, etc...

I believe my Apache/PHP is correctly set up as there are no problems with other installs (ie: phpSysInfo, phpMyAdmin, other handrolled PHP files and, standard HTML files), so this is why I'm wondering if it's a Serendipity issue. I didn't always have this problem, but it is not clear to me when it started.

I'm not sure how to further diagnose the problem. I'm hoping someone here at the forums can guide me a bit. I am an intermediate UNIX user and an intermediate web guy (well, maybe beginner to intermediate at least).

Thanks to anyone who takes the time to check this out. I appologize in advance if I am incorrectly pointing the finger at Serendipity - I love this weblog engine!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Unrecognized content type

Post by garvinhicking »

Hm, this is really strange. Validating my latest Serendipity 0.8-beta6 blog (blog.garv.in) makes no problem.

Investigating your site, the HTTP headers do exist correctly. Content-Type: text/html; charset=iso-8859-1 is exactly what it's supposed to look like.

I've also validated several other Serendipity installations without any problem, so I suppose it must be some strange error your server generates with the Validator. Can point me to a simple .html file on the same server, some file which has nothing to do with Serendipity?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
latcarf
Regular
Posts: 25
Joined: Tue Apr 12, 2005 1:21 am
Location: Silicon Valley, CA
Contact:

Post by latcarf »

Thanks for checking this out Garvin. Here are a couple links that have nothing to do with Serendipity. The first is a very simple test page and the second is the Apache test page.

http://latcarf.com/test.html
http://latcarf.com/apache2-default/

Thanks for taking time to look at this, I had only hoped another forum member would look at my issue - I couldn't have expected that the core developer would be looking at it for me. I thank you for that.

The only updates I'v done on Serendipity have been the 0.7.1 and the serendipity_event_spamblock update. If we've ruled out Serendipity, we can consider this topic closed.

Thanks!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Latcarf,

no problem at all. I enjoy looking into these things.

As you sure have noticed, the test.html validates properly in your browser.

To continue debugging this, I'd kindly ask you to save the HTML results of your startpage and just save them inside your serendipity directory as "test.html". Then try to validate this page. I've saved that file as http://garv.in/files/latcarf.html as well - that page validates (with errors), though!

If it works, we need to investigate the exact PHP headers that Serendipity emits. If it doesn't work, I'm afraid there is a problem with your webserver setup (but I wouldn't know the exact case then).

Ah, wait. I may just get the clue - could you edit your serendipity_genpage.inc.php file and remove the "/>" at the end of the <meta> Tags and just write ">" without the slash there? This may be a problem - but the meta tags also got fixed in Serendipity 0.8.

Just report back here, and let's see further. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
latcarf
Regular
Posts: 25
Joined: Tue Apr 12, 2005 1:21 am
Location: Silicon Valley, CA
Contact:

Post by latcarf »

Intersting...
could you edit your serendipity_genpage.inc.php file and remove the "/>" at the end of the <meta> Tags and just write ">" without the slash there
Ok, I did that - but it made no difference. So I did your other suggestion:
save the HTML results of your startpage and just save them inside your serendipity directory as "test.html"
I saved it in: http://latcarf.com/locution/test.html and guess what, it does not validate!
So then I saved a copy of that same file outside the Serendipity directory in: http://latcarf.com/test2.html and that does validate (just like the one you saved does).

So clearly there is a problem wth my server setup and specifically what I've done with the Serendipity directories.

I guess I'll look again at my .htaccess files, Apache directoy configurations, and symlinks... :?

Thanks for your time Garvin and rest assured Serendipity is working correctly! :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

That's an interesting problem. If you care, you can share your .htaccess and/or virtual host for the serendipity directory, maybe I can see what could cause the error. I think it may have something to do with the MIME Magic file or so.

Good luck!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
latcarf
Regular
Posts: 25
Joined: Tue Apr 12, 2005 1:21 am
Location: Silicon Valley, CA
Contact:

Post by latcarf »

Hi Garvin,

I removed my .htaccess file from the Serendipity directory and tried validating the test file inside the directory again (http://latcarf.com/locution/test.html). The content type was recognized this time.

Unfortunately, this only worked for the individual test html file that I put in the Serendipity directory. The startpage of Serendipity still is unrecognized. So... I'm just as stumped as I was in the first place. :?:

I don't have any virtual host config for this directory, just a directory block with only 'AllowOverride All' in it.

I'm happy to share my .htaccess file here. How should I go about doing that? Shall I just post it here, or upload it somewhere?

Oh - btw, do you still want that Angel Sanctuary DVD on your Amazon wish list? Anime makes a great way for my to repay your effort thus far! :D

-Latcarf
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Latcarf, please just post your .htaccess here. Use (code) and (/code) tags before and after your pasting (but use square brackets instead round brackets) :)

Did you leave the changes to genpage.inc about the wrong <meta>-Tags?

And, yes BTW - I still really do want to have that DVD *g* But don't feel pushed, I do the support out of fun. I don't expect those things :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
latcarf
Regular
Posts: 25
Joined: Tue Apr 12, 2005 1:21 am
Location: Silicon Valley, CA
Contact:

Post by latcarf »

Ok,
Here is the contents of my .htaccess file:

Code: Select all

# BEGIN s9y
ErrorDocument 404 /locution/index.php
DirectoryIndex /locution/index.php
php_value session.use_trans_sid 0
php_value register_globals off

RewriteEngine On
RewriteBase /locution/
RewriteRule ^archives/([0-9]+)\.html index.php?url=/archives/$1.html [L,QSA]
RewriteRule ^archives/([0-9]+)[_\-]short\.html index.php?url=/archives/$1-short.html [L,NC,QSA]
RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html index.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^feeds/(.*) index.php?url=/feeds/$1 [L,QSA]
RewriteRule ^unsubscribe/(.*)/([0-9]+) index.php?url=/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^approve/(.*)/(.*)/([0-9]+) index.php?url=approve/$1/$2/$3 [L,QSA]
RewriteRule ^delete/(.*)/(.*)/([0-9]+) index.php?url=delete/$1/$2/$3 [L,QSA]
RewriteRule ^admin$ serendipity_admin.php [L,QSA]
RewriteRule ^entries$ serendipity_entries.php [L,QSA]
RewriteRule ^archive$ index.php?url=/archive [L,QSA]
RewriteRule ^categories/([0-9]+) index.php?url=/categories/$1 [L,QSA]
RewriteRule ^(index|atom|rss|b2rss|b2rdf).(rss|rdf|rss2|xml)$ rss.php?file=$1&ext=$2
RewriteRule ^plugin/(.*) index.php?url=plugin/$1 [L,QSA]
RewriteRule ^index\.(html?|php.?) index.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule (.*\.html?) index.php?url=/$1 [L,QSA]

<Files *.tpl>
    deny from all
</Files>

<Files *.sql>
    deny from all
</Files>

<Files *.inc.php>
    deny from all
</Files>

<Files *.db>
    deny from all
</Files>

# END s9y
Nothing special here really... I did leave the meta tags fix in. I'm still perplexed by the fact that the straight html file works when htaccess is not present but Serendipity startpage still doesn't. I'm beginning to wonder if this is not an issue with the Debian Apache2 or PHP4 packages (although I haven't found any other reports of similar issues)... :?:
latcarf
Regular
Posts: 25
Joined: Tue Apr 12, 2005 1:21 am
Location: Silicon Valley, CA
Contact:

Post by latcarf »

I've given up on this issue! It is definitely not Serendipity's problem. I decided to revert back to Apache 1.3.33 from Apache2 and that fixed the issue.

I found one mention of this issue posted to W3.org's Validator Bugzilla DB - but alas, there was only recognition and no solution. Since switching back to Apache 1.3 fixed the issue for me, I'm happy.

Once again Garvin, thanks for helping me even though the issue was not yours. I appreciate your attention. Serendipity is one of my favorite open-source apps and I thank you guys for all your hard work!

I was going to send you that DVD, but your Amazon wish list is in German, and unfortunately, I don't read German. Is there any way I can get to the wish list in English? I still want to send that out to you for your work on my issue and on Serendipity in general.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Latcarf, thanks for reporting back in this issue! I wouldn've have thought that Apache2 was causing such trouble. Good to know!

And great you enjoy Serendipity, this is what we want :)

About my wishlist: Sadly Amazon does not offer the english interface language for german wishlists. I've often requested that, but they seem to be not willing to do that. An alternative would be to make a Paypal donation to 'paypal at supergarv -dot- de' ;-)

Best thanks and regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply