ID:               25567
 Updated by:       [EMAIL PROTECTED]
 Reported By:      alex dot baron at tusk dot com dot au
 Status:           Bogus
 Bug Type:         IIS related
 Operating System: Windows XP
 PHP Version:      4.3.3
 New Comment:

I meant your webserver's logs..



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

[2003-09-17 02:38:26] alex dot baron at tusk dot com dot au

sorry I dont seem to be able to start logging
in the php.ini file I have set the following:

error_reporting  =  E_ALL
display_errors = on
display_startup_errors = on
log_errors = error_log
error_log = "c:/php/phplog.txt"

What have i done wrong? its not producing any text files.

Thanks for you time
A

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

[2003-09-17 01:46:04] [EMAIL PROTECTED]

Check your logs, there is something wrong with your system / setup.


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

[2003-09-17 01:35:47] alex dot baron at tusk dot com dot au

Yes i have read that entry 

but the problem still happens and the code now has

header("Location:
http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/".$relative_url."newslisting.php");

and is still producing the error also if I leave the system alone for a
while and then use it the submisson works but if I try a second time it
falls over again.

thanks
A

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

[2003-09-17 01:22:36] [EMAIL PROTECTED]

RFTM: http://www.php.net/header and about the relative vs. absolute
urls on header("Location..")

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

[2003-09-16 23:09:34] alex dot baron at tusk dot com dot au

Description:
------------
Hi bug fixing type people,

I have a php form posting to a php file that then places the data into
mysql. the issue happens when the page is redirected to the homepage
the error is

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

if you hit the refresh the page loads.

Iam running XP no SP's and have the latest stable relese of PHP on my
machine downloaded from snap.php.net and the iis is 5.1 mysql is
version 4.0.13-nt

also i installed the .net frame work but have uninstalled it since.
code that previously work seem to no longer function producing the same
error.

thanks for your time
Alex

Reproduce code:
---------------
this is the code iam still learning :

<?

        include "../includes/dbconnect.php";

        // this is processed when the form is submitted
        // back on to this page (POST METHOD)
        
        if (!is_null($key = key($_POST))) {

                // double-up apostrophes
                $description = addslashes($_POST['description']);
                $subject = addslashes($_POST['subject']);
                $date = addslashes($_POST['date']);
                $date = split("-",$date);
                $date = "$date[2]-$date[1]-$date[0]";
                // setup SQL statement
                $SQL = "INSERT INTO tblnews (description, subject, date)
VALUES ('$description','$subject','$date')";

                // execute SQL statement
                $result = mysql_db_query($db,$SQL,$cid);
                // check for error
                if (is_null($result)) {
                
                        echo "ERROR: " . mysql_error() . "\n$SQL\n";
                
                }else{

                        header("Location: newslisting.php");
                        exit;
                }
        }
?>

Expected result:
----------------
submit it to the database and return to the listings page



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


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

Reply via email to