Forums

CGI Script Error? (42 posts)

  1. ekrubonline
    Member
    Posted 4 months ago #

    I don't get it. I've never seen a problem like this, and I guess this is why I know I'm still green. I set up my config file, and then I got this error before the installer ran:

    CGI Error
    The specified CGI application misbehaved by not returning a complete set of HTTP headers.

    Can anyone tell me what this might be? Check me online at
    http://www.carigblog.com/index.php

  2. Kafkaesqui
    Moderator
    Posted 4 months ago #

    It looks to be an issue with the (IIS) server your site is on, which is obviously running PHP in CGI mode. I would contact your host with the error.

  3. ekrubonline
    Member
    Posted 4 months ago #

    I checked just now with the server team - they said nothing seems to be wrong. I'll get them to check the IIS.

    Is there anything else I can try?

    (Interesting though... I installed a lot of these blogs - never had a problem!)

  4. ekrubonline
    Member
    Posted 4 months ago #

    Ok... We reset IIS, and still nothing. What Next? Sigh...

  5. Kafkaesqui
    Moderator
    Posted 4 months ago #

    This is not an issue of having to reset the server:

    http://help.globalscape.com/help/purecms3/Error_Message__CGI_Error-The_specified_CGI_application_misbehaved_by_not_returning_a_complete_set_of_HTTP_headers.htm
    http://bugs.php.net/bug.php?id=25863

    For a quick check of PHP on the server, create a PHP document (say test.php) with just the following in it:

    <?php
    phpinfo();
    ?>

    Upload that doc to your server and access it through your web browser. If it generates the same error...

  6. MichaelH
    Moderator
    Posted 4 months ago #

    Seen this on a number of different hosts and the only thing I've been able to suggest is to consider changing over to a linux based host.

    This happens on NT IIS servers running FastCGI. The phpinfo runs fine. 2.3.2 returns the CGI error, and 2.3.1 will display the initial installation screen (not properly formatted) asking for the blog/email info but after enter that information, it will return "HTTP Error 404 - File or directory not found. Internet Information Services (IIS)"

    Here's an example phpinfo experienced recently:
    ------------------------------

    PHP Version 5.1.4
    System 	Windows NT D100 5.2 build 3790
    Build Date 	May 4 2006 10:30:29
    Configure Command 	cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
    Server API 	CGI/FastCGI
    Virtual Directory Support 	enabled
    Configuration File (php.ini) Path 	C:\WINDOWS\php.ini
    PHP API 	20041225
    PHP Extension 	20050922
    Zend Extension 	220051025
    Debug Build 	no
    Thread Safety 	enabled
    Zend Memory Manager 	enabled
    IPv6 Support 	enabled
    Registered PHP Streams 	php, file, http, ftp, compress.zlib
    Registered Stream Socket Transports 	tcp, udp
    Registered Stream Filters 	convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.*
    
    Zend logo This program makes use of the Zend Scripting Language Engine:
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
        with Zend Extension Manager v1.0.11, Copyright (c) 2003-2006, by Zend Technologies
        with Zend Optimizer v3.2.2, Copyright (c) 1998-2006, by Zend Technologies
  7. dhbarr
    Member
    Posted 4 months ago #

    I'm experiencing ( possibly related? ) problems with a similar setup ( http://wordpress.org/support/topic/150672 ).

    Do you have available the result of phpinfo(INFO_MODULES); for a WIN/IIS6 system WITHOUT fastCGI that's known to work?

    What I mean is, the previous post seemed to imply that it is FastCGI that's causing the headache -- is that a gut feeling, or do we know for sure?

    TIA,
    -dhbarr.

  8. stealf
    Member
    Posted 4 months ago #

    I had a similar problem with my installation, but I resolved it by following the tip from CGI Error with pages.

  9. MichaelH
    Moderator
    Posted 4 months ago #

    @dhbarr -- didn't mean to imply it was FastCGI causing the problem but the 4 or 5 times I've checked the phpinfo on problem sites, FastCGI was in use.

  10. dhbarr
    Member
    Posted 4 months ago #

    @MichaelH:
    I'm going to give it a try today. I'll leave EVERYTHING else the same, except modify WordPress to not use FastCGI at all, but rather the default php handling method.

    I have a hunch that there's a version issue somewhere in the php-mysql-fastcgi triangle, based on this post:
    http://www.iis.net/articles/view.aspx/IIS7/Hosting-Web-Applications/PHP/PHP-Applications-on-IIS---WordPress

    Today I'll try disabling FastCGI first, down-revving MySQL next, down-revving PHP after that, and finally walking backward through WordPress releases as a last resort. Hopefully ONE of these options will clear up the mystery.

  11. dhbarr
    Member
    Posted 4 months ago #

    @MichaelH:
    Change that "4 or 5 times I've checked the phpinfo on problem sites" to "5 or 6 times". :)

    I changed IIS6 for that particular website to use php5isapi.dll instead of fcgiext.dll, and presto!

    Some combinations of IIS6, PHP5, and FastCGI simply do not work -- apparently this is FastCGI's fault, which isn't entirely surprising since it's only a tech preview.

    This fix is to use php5isapi.dll instead.

    Thanks Again,
    -dhbarr.

  12. MichaelH
    Moderator
    Posted 4 months ago #

    Thanks for that information dhbarr!!

    So guess this is something a host would typically have to change for a user?

  13. DrFrasierCrane
    Member
    Posted 4 months ago #

    Dunno if this helps this particular user, but it helped me personally...

    I use Easy-CGI for my host provider and was running into this same error when I went to upgrade from 2.3.1 to 2.3.2. Easy-CGI allows you to use either PHP v4.4.4 or 5.2.4. Through their configuration menus, I discovered I was using 4.4.4 - once I changed it to 5.2.4, the error message went away. So something must be different between how Easy-CGI has 4.4.4 vs. 5.2.4 configured.

  14. MichaelH
    Moderator
    Posted 4 months ago #

    Here's an explanation for dhbarr about how he solved the problem (see above) Thanks David.

    Under %systemroot%/inetserv/fcgiext.ini I snipped out the reference to this particular subsite. I then added the PHP ISAPI Web Services Extension to this particular subsite, and set php5isapi.dll as the .php handler instead of fcgiext.dll for this subsite only. See steps 3.1 and 3.2 from this link if you're not typically a Windows guy : http://www.peterguy.com/php/install_IIS6.html

  15. cperabo
    Member
    Posted 3 months ago #

    I fretted over this for about 2 days. I'm a "wannabe" tech guy, but can't quite follow all the technical jargon. Form what I understood, it's a compatibility issue anyhow and that my particulary configuration didn't work.

    I'd installed WordPress many times on many servers and never encountered this problem.

    What I did (and it worked) was simply install WordPress 2.3.1. I had to hunt around a bit to find that version, but Presto! it works.

  16. MichaelH
    Moderator
    Posted 3 months ago #

    Trying WordPress 2.3.1 has not worked, at least on the several hosts I've had a occasion to try...

    While 2.3.1 may not display the CGI error, it will display the installation screen in an unproperly formatted mode, allow you to enter the Blog title and Your email fields, but when you click on the Install WordPress button, it will display an error page with the message "The page could not be found...(HTTP Error 404 - File or directory not found. Internet Information Services (IIS))"

  17. MichaelH
    Moderator
    Posted 3 months ago #

    Another comment here -- tried commenting out line 163 in wp-includes/wp-db.php and retried the installation. Doing that resolved the CGI error message display, but it displayed the installation screen in an unproperly formatted mode, allowed entry of the Blog title and Your email fields, but when clicking on the Install WordPress button, it displayed an error page with the message "The page could not be found...(HTTP Error 404 - File or directory not found. Internet Information Services (IIS))"

  18. adminreports
    Member
    Posted 3 months ago #

    Make sure your temp and sessions directory is writable by NETWORK.

    Best way to cure it is to create C:\Inetpub\Temp and C:\Inetpub\Sessions and edit php session save path to the new sessions directory and temp to the new temp directory. Restart IIS to read the new config. This should stop the problem.

    Another thng is make sure
    cgi.force_redirect is set to 0 ,cgi.rfc2616_headers = 1, cgi.fix_pathinfo is set to 1.

  19. atreliu
    Member
    Posted 3 months ago #

    I can't change server side, so I fixed this problem simply rewrite the wp-include/db.php like suggested here.

    But now the problem can be showed again on the next upgrade..

  20. MichaelH
    Moderator
    Posted 3 months ago #

    Saw recently with one host, www.hostnexus.com, that with their Plesk control panel, they allowed PHP, via a check box, to run as an ISAPI extension. WordPress 2.3.3 installed just fine.

  21. MichaelH
    Moderator
    Posted 2 months ago #

    Connecting the dots... http://trac.wordpress.org/ticket/5951

  22. bricin
    Member
    Posted 2 months ago #

    What is unclear is why 2.3.3 is failing but earlier versions worked just fine. "Upgrading" to a Linux host isn't an option if you also run other non-Linux applications on the server.

    On the same server 2.2.1 works correctly.

  23. gbdg
    Member
    Posted 2 months ago #

    I have encountered this issue as well on a Windows 2003 server. I operate the server (I am the host) and moving to Linux is not going to happen.

    - I can run phpinfo - no problem - PHP is running fine.

    - I have several (earlier version) instances of wordpress running on my server so I know WP is easy to install and use on Windows.

    - I note that whatever code was posted at this location no longer exists, so it is unclear what that solution looked like.

    - I have installed version 2.3.1 on this subject site and it worked just fine. Why does 2.3.3 have a problem, and does anyone have a definitive solution?

    Thanks!

  24. df94
    Member
    Posted 1 month ago #

    I second @gbdg
    http://wordpress.pastebin.ca/893007no longer has the code we need

    can someone show us the code please?

  25. vanyoos
    Member
    Posted 1 month ago #

    Ditto...I would also love to see the code we need.

  26. df94
    Member
    Posted 1 month ago #

    also, not only Installation of 2.3.3 will have this problem, but also 2.3.1 + permlink will have the same error msg

    meaning I can install 2.3.1 and make wordpress up-n-running, but if I enable permlink, then visit a post using its permlink, I will hit the same error as OP

  27. jsnielsen
    Member
    Posted 1 month ago #

    I would love to see the code too, or a fix, cause I'm having the same problem :)

  28. jsnielsen
    Member
    Posted 1 month ago #

    Any light at the end of the tunnel ?

    I checked with my site hoster, my site is running standard CGI, although on IIS.

    I would really REALLY like either a solution or a workaround, as Wordpress is completely useless meanwhile.

    Possibly even a downgrade, or you guys making an older working version available for download ?

  29. jsnielsen
    Member
    Posted 1 month ago #

    Bump

  30. jsnielsen
    Member
    Posted 1 month ago #

    Bump. And I'll keep bumping every day, until someone either comes up with an answer, a workaround or a permanent fix ;)

Reply »

You must log in to post.

About this Topic