Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Error in CGI Application

  1. #1
    Join Date
    Jun 2003
    Posts
    160
    Rep Power
    0

    Default Error in CGI Application

    I have installed PHP, but when I to access a PHP script file via my browser, I get the error:


    cgi error:
    The specified CGI application misbehaved by not
    returning a complete set of HTTP headers.
    The headers it did return are:

    My webserver is IIS 4 and I am using this script for login and logging out a user.

  2. #2
    Join Date
    Jun 2003
    Posts
    160
    Rep Power
    0

    Default Re:Error in CGI Application

    What do you think could of caused the problem?

  3. #3
    Join Date
    Feb 2003
    Posts
    3,184
    Rep Power
    0

    Default Re:Error in CGI Application

    are you sure you follow the instruction completely? I installed my version of php on apache. ISS should be too hard though maybe you overlooked one of the steps in the read me file.

    I however can suggest another way to install it (if all else fails). read the setup again.

  4. #4
    Join Date
    Jun 2003
    Posts
    160
    Rep Power
    0

    Default Re:Error in CGI Application

    I've read it over and over and went thru the steps again. Every time the user logins or logouts I get that error.

  5. #5
    Join Date
    Jul 2002
    Posts
    818
    Rep Power
    0

    Default Re:Error in CGI Application

    Are you sure the page exists? No, seriously. The only time I get that error is if I mistyped a URL or mis-spelt a link. Check to make sure that the link has the exact name as the page.

    If you get this error on a certain page/link, but you can view other '.php' files, then that's probably the problem.

  6. #6
    Join Date
    Jun 2003
    Posts
    160
    Rep Power
    0

    Default Re:Error in CGI Application

    It's the right url it's pointing to. I checked that. I still don't know what could be the prob.

  7. #7
    Join Date
    Jul 2002
    Posts
    818
    Rep Power
    0

    Default Re:Error in CGI Application

    Can you view other PHP files or do they all give that error?

  8. #8
    Join Date
    Jun 2003
    Posts
    160
    Rep Power
    0

    Default Re:Error in CGI Application

    yea i can view the other files. It only happens when I try to login or click logout

  9. #9
    Join Date
    Jul 2002
    Posts
    818
    Rep Power
    0

    Default Re:Error in CGI Application

    Well like I said, I've never encountered that error in any other form than that which I've stated.

    If you're not afraid of me stealing your code you can send me the delinquent pages from your application. I'll see if I can debug it and post the fix.

  10. #10
    Join Date
    Jun 2003
    Posts
    160
    Rep Power
    0

    Default Re:Error in CGI Application

    These is the code for the logout.php

    <?php
    session_start();
       header('HTTP/1.0 401 Unauthorized');
       echo 'You are logged out...';
       session_register("current_u ser");
       session_register("agent&quo t;);
       session_register("agentname ");
       $current_user = "";
       $agentname = "";
       session_unset();
       session_destroy();  &n bsp;
    ?>

    =============================================

    This code actually calls the logout.php. It's html tho:

    <html>

       <head>
          <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
          <title>J amaicacars Administration</title>
          
          
          
       </head>

    <body bgcolor="white" TEXT="#000000" LINK="#000066" VLINK="#000066" alink="#000066">
       <center>  &nb sp;
          <table border="0" cellspacing="0" cellpadding="2" width="590">
            &n bsp;<tr>
            &n bsp;   <td>
            &n bsp;      <div align="left">
            &n bsp;       &nbs p; <font face="arial,ms sans serif" size="4"><b>Jamaicacars Administration</b></font>
            &n bsp;       &nbs p; <hr size="1">
            &n bsp;      </div>
            &n bsp;      <div align="right">
            &n bsp;       &nbs p; <font face="ms sans serif" size="1"><a href="./admin.php?action=addlisting">Add a Listing</a> | <a href="./admin.php">Manage All Listings</a> | <a href="./agenteditor.php">Manage Sellers</a> | <a href="../index.php">Jamaicacars Home</a> | <a href="../logout.php">Log Out</a></font></div>
            &n bsp;      
            &n bsp;   </td>
            &n bsp;</tr>
          </table>
          <P>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •