Title: CGI Error With Pages
Last modified: August 18, 2016

---

# CGI Error With Pages

 *  [slamb0513](https://wordpress.org/support/users/slamb0513/)
 * (@slamb0513)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/)
 * I have pages on my site that once I published were given the URLs of [http://www.twomomsdaycare.com/?p=2](http://www.twomomsdaycare.com/?p=2)
   for example. When this link is clicked, all it does is redirect back to the home
   page. When I use permalinks, the blog posts themselves work fine, but the pages
   throw the following CGI Error.
 * CGI Error
    The specified CGI application misbehaved by not returning a complete
   set of HTTP headers.
 * Can someone help me with this?

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/cgi-error-with-pages/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cgi-error-with-pages/page/2/?output_format=md)

 *  Thread Starter [slamb0513](https://wordpress.org/support/users/slamb0513/)
 * (@slamb0513)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613032)
 * Anyone? When I don’t use permalinks, I get URLs created that look like the following:
 * [http://www.twomomsdaycare.com/?page_id=2](http://www.twomomsdaycare.com/?page_id=2)
 * All that link does is take you back to the home page.
 * If I modify the URL myself in the address bar to add index.php before the ? so
   it reads [http://www.twomomsdaycare.com/index.php?page_id=2](http://www.twomomsdaycare.com/index.php?page_id=2)
   then everything links fine.
    Does anyone know what file and where in the code
   these links are generated so I can physically add the index.php before the ?
 * Any help would be really appreciated.
 *  Thread Starter [slamb0513](https://wordpress.org/support/users/slamb0513/)
 * (@slamb0513)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613043)
 * Bueller? Bueller? Anyone? Anyone?
 *  [drmiketemp](https://wordpress.org/support/users/drmiketemp/)
 * (@drmiketemp)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613044)
 * Actually the question to ask is why CGI is coming into play. WP is a php script,
   not cgi.
 * Best bet would be to get with your host and see if it’s something on their end.
 *  [omnivore](https://wordpress.org/support/users/omnivore/)
 * (@omnivore)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613132)
 * I’ve never had this problem before. But it’s cropped up constantly since I installed
   WordPress version 2.3.1. It’s not a php problem, but it causes some serious problems
   on IIS apparently.
 *  [lionking06](https://wordpress.org/support/users/lionking06/)
 * (@lionking06)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613147)
 * ===
    replace code in your wp-includes/wp-db.php with the code below…
 * This fix is for 2.3 and 2.3.1
 * Feb 5, 2008
    [moderated code placed at [http://wordpress.pastebin.ca/893007](http://wordpress.pastebin.ca/893007)]
 *  [BrianF](https://wordpress.org/support/users/brianf/)
 * (@brianf)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613161)
 * FYI, this just worked for me to get WP 2.3.2 working too. Host is a Windows shop.
 *  [rahulrocx](https://wordpress.org/support/users/rahulrocx/)
 * (@rahulrocx)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613162)
 * This worked perfectly 4 me
    thnk u
 *  [ghenghiz](https://wordpress.org/support/users/ghenghiz/)
 * (@ghenghiz)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613163)
 * This fix the error but… it makes me to re-install wordpress!
 * is there any other way?
 *  [mrbim](https://wordpress.org/support/users/mrbim/)
 * (@mrbim)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613164)
 * Indeed this works …
 * I am running:
    -Windows 2008 Standard edition (full) -PHP 5.2.5 with FastCGI -
   MySQL 5.0.45 -WP 2.3.2
 * I don’t see why WordPress has difficulties installing. I have installed Joomla
   and Invision Power Board without any problems.
 * Thanks for the code!
 *  [martin6](https://wordpress.org/support/users/martin6/)
 * (@martin6)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613168)
 * Hi,
 * I am running the similar problem here. When I go to the url that suggested above“
   [http://wordpress.pastebin.ca/893007&#8221](http://wordpress.pastebin.ca/893007&#8221);,
   it returns blank page.
 * Can anyone let me know where to modify the codes?
 * Thanks
 * Martin
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613169)
 * This link works for me:
    [http://wordpress.pastebin.ca/893007](http://wordpress.pastebin.ca/893007)
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613170)
 * Connecting the dots… [http://trac.wordpress.org/ticket/5951](http://trac.wordpress.org/ticket/5951)
 *  [martin6](https://wordpress.org/support/users/martin6/)
 * (@martin6)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613171)
 * Hi,
 * Thanks for the reply. I am still unable to see anything on that link:
    [http://wordpress.pastebin.ca/893007](http://wordpress.pastebin.ca/893007)
   which returns blank page.
 * I used both firefox and IE but see the same result.
 * Any suggestion will be greatly appreciated.
 * Regards
 * Martin
 *  [swhitley](https://wordpress.org/support/users/swhitley/)
 * (@swhitley)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613173)
 * I ran into the same CGI problem. I’ve been running multiple versions and instances
   of WordPress with the same host for two years without issue, but the install 
   failed for 2.3.3.
 * I updated wp-db.php with the code above and it worked.
 *  [stefanrusek](https://wordpress.org/support/users/stefanrusek/)
 * (@stefanrusek)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/#post-613174)
 * I have a wordpress 2.3.3 install running on IIS. When I enable permalinks with
   dates and article names, then page, tags, and categories give the CGI error. 
   If I choose the permalink option /index.php/archives/%post_id%, then all pages
   give the CGI error. The above fix seems to fix the problem when you get a CGI
   error during installation, but it has no effect on already working installs that
   fail when the permalink options are changed.

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/cgi-error-with-pages/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cgi-error-with-pages/page/2/?output_format=md)

The topic ‘CGI Error With Pages’ is closed to new replies.

## Tags

 * [cgi error](https://wordpress.org/support/topic-tag/cgi-error/)
 * [page error](https://wordpress.org/support/topic-tag/page-error/)
 * [permalinks](https://wordpress.org/support/topic-tag/permalinks/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 30 replies
 * 25 participants
 * Last reply from: [jayglo83](https://wordpress.org/support/users/jayglo83/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/cgi-error-with-pages/page/2/#post-613226)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
