ID:               24788
 User updated by:  christoph at chcnet dot net
 Reported By:      christoph at chcnet dot net
 Status:           Open
 Bug Type:         CGI related
 Operating System: win2k advanced server
 PHP Version:      4.3.2
 New Comment:

it's a bug anyhow, because PHP shouldn't quit without saying at least
"hey, there was an error! fix it".... But it simply doesn't work...


Previous Comments:
------------------------------------------------------------------------

[2003-07-24 05:31:52] christoph at chcnet dot net

I use the c:\php\php.exe version (this is the one, which is installed
automatically with the windows installer). the bug occurs not in all
cases but only in those, I posted a sample about...

I said, that the program obviously doesn't crash (as I don't get a Dr.
Watson and there don't remain dead processes).
BUT: In case, there is an error in the script (which hopefully isn't,
because it is running on 4.3.1 dev version on my production environment
WITHOUT any problem). Only on my test server, which I set up with the
newest stable php version 4.3.2 from this website this nasty error
occurs. I changed only a few settings of the distributed php.ini and
changed the error level from E_ALL to E_ALL ~ E_NOTICE
but that doesn't help anyhow...

------------------------------------------------------------------------

[2003-07-24 04:38:40] [EMAIL PROTECTED]

It doesn't crash. Are you sure you're using the correct binary? (CGI,
not CLI?) Check the version with 'php -v'


------------------------------------------------------------------------

[2003-07-24 03:27:25] [EMAIL PROTECTED]

Ups, you say PHP crashes? That of course shouldn't happen

------------------------------------------------------------------------

[2003-07-24 03:24:28] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

You cannot use spaces in URLs.

------------------------------------------------------------------------

[2003-07-24 03:20:24] christoph at chcnet dot net

Description:
------------
When calling my scripts like that:

/path/script.php?parm1=1&parm2=3 ....

via Javascript

<script language="javascript">
window.open("/path/page.php?parameter=123&clientname=some name", data)
</script>

IIS returns a screen:

CGI Error: The cgi application misbehaved by returning wrong
HTTP-Headers. Those are:


(nothing here...)

Obviously php in version 4.3.2 under IIS 5 on Win2k (SP4) advanced
server crashes.

setting error reporting to E_ALL doesn't show any hint, php simply
disappears without sending anything, and IIS prints the above mentioned
error message.

No zombie processes (php.exe) remain in the system, as the application
obiously quits correctly so I don't even get a message window, that
php.exe crashed (I have visual studio installed).

Is this a configuration issue (I haven't found nothing so far), because
the PHP version I use on my production machine works without errors.

Yes, I use $_GET and $_POST instead of using global variables (although
I have it enabled, because an older system, written in php requires
it)



Reproduce code:
---------------
function show_documents($docid) {
    print $docid;
}
function update_documents($docid) {
        global $db;
        if ($_POST['parm1']=="") $_POST['parm1'] = 0;
        if ($_POST['parm2']=="") $_POST['parm2'] = 0;
        print "updating...";
        $sql = "update table set parm1=${_POST['parm1']};";
        mssql_query($sql, $db) or die ("ERROR!");
        ?>
        <script>
        window.open(<?php print
"\"documents.php?parm1=${_POST['parm1']}&parm2=${_POST['parm2']}\"";
?>,"data")
        </script>
        <?php
}


switch ($mode) {
        case "updatedoc": update_documents($docid); break;
        default: show_documents($docid); break;
}


Expected result:
----------------
calling the script from a form providing parm1 and parm2 does on
4.3.1-dev:

1) print updating.... and redirect the webpage to the same script
without parameter mode=updatedoc (this is for Updates and inserts in
SQL, so that the insert statement is not called 2x (and also the
update)

The update script is called correctly, but when 


2) open the same script documents.php?docid=123
   should print 123


Actual result:
--------------
CGI Error... Application misbehaved by not returning a complete set ot
HTTP headers:




(here is nothing else, so PHP didn't write anything....


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24788&edit=1

Reply via email to