www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Micah Brening <SilentWizardL...@hotmail.com>
Subject mod_cgi/9830: PHP tries to post data into MySQL, and Apache shows an error
Date Fri, 15 Feb 2002 04:24:20 GMT

>Number:         9830
>Category:       mod_cgi
>Synopsis:       PHP tries to post data into MySQL, and Apache shows an error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Feb 15 02:00:03 PST 2002
>Originator:     SilentWizardLord@hotmail.com
>Release:        1.3.23
Windows XP Pro, PHP4, MySQL 3.23.47, Apache 1.3.23 binary for win32
PHP4, MySQL, and Apache are all three installed on my computer with Windows XP.  Each were
tested and work enough to prove it is installed proporly.  When I take information from a
form and insert it into a MySQL database using PHP, apache shows the error:
"The server encountered an internal error or misconfiguration and was unable to complete your
The Error log says:
"Premature end of script headers: c:/php/php.exe"
I had my httpd.conf file checked out, and no mistakes were found.
I contacted some people who work with php, and they say it must be a fault in the server.
The code I used is as follows:

	$db = mysql_connect("localhost", "root");
	$result = mysql_query("SELECT * FROM accounts",$db);
	if ($myrow = mysql_fetch_array($result))
			if (($myrow["username"] == $username) && ($cnt == 0))
				echo "<script language='JavaScript'>alert('That username is already registered\nPlease
try a different name');history.back();</script>";
		while ($myrow = mysql_fetch_array($result));
		if ($cnt == 0)
			$sql = "INSERT INTO accounts (username,password,ipadd) VALUES ('$username','$password1','$ippi')";
$result = mysql_query($sql);

 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message