vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now! HACKER SAFE certified sites prevent over 99.9% of hacker crime.
ne nw
New vBSEO Discount Level for Network Builders Meet vBSEO Team in New York (Nov. 3rd & 4th) vBSEO 3.2.0 GOLD Has Landed Success with vBSEO = 600ore Web Visitors + $1400 in a Day! Crawlability Inc. Files for SEO Technology Patent
se sw

mod_fastcgi.c is a little b***

This is a discussion on mod_fastcgi.c is a little b*** within the Bug Reporting forums, part of the vBSEO SEO Plugin category; I'm running php 4.4.2 under mod_fastcgi, and it works great except that mod_fastcgi.c has this stupid code in it: Code: ...

Go Back   vBulletin SEO Forums > vBSEO SEO Plugin > Bug Reporting

Enhancing 80 million pages.

Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read
  #1  
Old 04-22-2006, 04:31 AM
Junior Member
 
Join Date: Nov 2005
Posts: 13
mod_fastcgi.c is a little b***

I'm running php 4.4.2 under mod_fastcgi, and it works great except that mod_fastcgi.c has this stupid code in it:

Code:
if (strcasecmp(name, "Status") == 0) {
            int statusValue = strtol(value, NULL, 10);

            if (hasStatus) {
                goto DuplicateNotAllowed;
            }
            if (statusValue < 0) {
                fr->parseHeader = SCAN_CGI_BAD_HEADER;
                return ap_psprintf(r->pool, "invalid Status '%s'", value);
            }
            hasStatus = TRUE;
            r->status = statusValue;
            r->status_line = ap_pstrdup(r->pool, value);
            continue;
        }
A regular apache handler will let you set r->status as many times as you please, and will just keep the last one when it sends headers out to the client. However, mod_fastcgi.c chokes and croaks with a 500 error if you try to set the status more than once. The end result is that scripts that work fine under mod_php give a 500 error with php/mod_fastcgi.

In particular, vbseo makes mod_fastcgi spit out this little gem when it tries to send a 404:

FastCGI: comm with server "/var/www/fcgi-php/php" aborted: error parsing headers: duplicate header 'Status'

This can be fixed in the vbseo php code by making sure that it doesn't set the Status more than once. However, this fastcgi pickyness breaks tons of other php scripts too (like wordpress)

I got it working by hacking mod_fastcgi.c as follows:
Code:
            if (hasStatus) {
               /* goto DuplicateNotAllowed; */
            }
This has been reported as a bug to the php developers here:
PHP Bugs: #33225: PHP sends multiple Status headers

Their response is "don't do that then." (don't send status headers twice, then), and they closed the bug report as bogus. So, vbseo is technically broken under php/mod_fastcgi (because mod_fastcgi.c is a little b***)

Dunno if you guys want to fix your code or not, in any case I'm reporting my workaround for other mod_fastcgi people.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 04-22-2006, 06:48 AM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,432
Blog Entries: 1
Re: mod_fastcgi.c is a little b***

Hello,

interesting, thank you for your feedback (and workaround for mod_fastcgi users).

However, I believe that vBSEO doesn't send "Status: 404" header more than once. Does it happen with ANY not found URL request or in certain conditions only?
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 04-22-2006, 03:52 PM
Junior Member
 
Join Date: Nov 2005
Posts: 13
Re: mod_fastcgi.c is a little b***

It happens every time that vbseo tries to handle a 404 when "File Not Found" request handling is set to send 404 http code.

Is it possible that you send a 200 earlier in the code, and then send a 404 later? (that's what wordpress does)

It's being discussed in the open php bug: PHP Bugs: #36705: Location header results in duplicate Status header ([f]cgi only)

(I added that comment on that about how to fix fcgi)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 04-22-2006, 04:36 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,432
Blog Entries: 1
Re: mod_fastcgi.c is a little b***

Thanks.
(I believe that this problem will not happen with new vBSEO )
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 04-22-2006, 04:49 PM
Junior Member
 
Join Date: Nov 2005
Posts: 13
Re: mod_fastcgi.c is a little b***

Quote:
Originally Posted by Oleg Ignatiuk
Thanks.
(I believe that this problem will not happen with new vBSEO )
That's great!

off topic: how in the world does this site get vbulletin to grab the titles of external pages for links in posts? If it's an available plugin, i want it!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 04-22-2006, 04:56 PM
Keith Cohen's Avatar
vBSEO Staff
vBSEO Total Customer SupportBig Board Administrator
 
Real Name: Keith Cohen
Join Date: Jul 2005
Location: Raleigh, NC USA
Posts: 6,264
Blog Entries: 1
Re: mod_fastcgi.c is a little b***

Quote:
Originally Posted by scruby
That's great!

off topic: how in the world does this site get vbulletin to grab the titles of external pages for links in posts? If it's an available plugin, i want it!
That's a new feature of the forthcoming vBSEO 2.4.5.
__________________
Keith Cohen / Crawlability Inc.
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.


My Personal Sites: My Blog | GPS Discussion Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:41 AM.


Powered by vBulletin Version 3.8.0 Beta 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.5 ©2008, Crawlability, Inc.