Bug #11624 Updated: memory error
| From: | Beech dot 7 at osu dot edu | Date: | Sat, 23 Jun 2001 07:49:56 +0000 |
| Subject: | Bug #11624 Updated: memory error | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-57731@lists.php.net to get a copy of this message | ||
ID: 11624
User Update by: Beech.7@osu.edu
Status: Open
Bug Type: Reproducible crash
Operating system: What I think...
PHP Version: 4.0.5
Description: memory error
Because it happens with both submit and whatever send the polling data I think it may have to be in
the function.php file. Regretfully neither my friend nor I know php THAT well.
Previous Comments:
---------------------------------------------------------------------------
[2001-06-23 03:48:29] Beech.7@osu.edu
<?
include("functions.php");
if (! isset($HTTP_POST_VARS["op"]))
$op = strtolower($HTTP_GET_VARS["op"]);
else
$op = strtolower($HTTP_POST_VARS["op"]);
switch($op) {
case "":
printHeader("$site_title - Submit News");
printMessage("Submit News", "Got a hot story? Fill in the details here and
submit it for review. An
unruly mob of $site_title editors and readers will poke, prod, prick, and
preen
your submission and, if the general consensus is that it doesn't suck, it
just might
get posted to the front page. Remember to check your spelling, grammar, and
links!");
printPostNews(0);
printFooter();
break;
case "preview":
printHeader("$site_title - Preview Submission");
printPostNews(1);
printFooter();
break;
case "post":
postNews($userinfo["user_id"], $HTTP_POST_VARS["topic"],
$HTTP_POST_VARS["section"], $HTTP_POST_VARS["title"],
$HTTP_POST_VARS["department"], $HTTP_POST_VARS["text"],
$HTTP_POST_VARS["text2"], $HTTP_POST_VARS["format"], 1);
printHeader("$site_title - Submission Posted");
printMessage("Submission Posted", "Your submission has been posted to the
queue. $site_title editors and readers can now view it, rate it, and decide whether or not they
think it deserves to show up on the front page. Thanks!");
printFooter();
break;
}
?>
---------------------------------------------------------------------------
[2001-06-23 03:46:39] Beech.7@osu.edu
<?
/*******************************************
*
* Customizable Settings
*
********************************************/
/* Site Settings */
$site_url = "http://totalentropy.org/";
/* Full URL of this site WITH TRAILING SLASH (i.e., "http://wonko.com/") */
$site_path = "/"; /* Relative path to the site's root
directory under the domain */
$site_title = "PHPSlice"; /* Title of the site */
$site_logo = "logo.jpg"; /* Filename of the site's logo (should be
located in /images) */
$site_button = "http://www.totalentropy.org/images/mysite.gif";
/* 88x31 button for this site */
$site_desc = "Lazy == Good."; /* Description of the site */
$admin_name = "Einstein"; /* Name of the site administrator (you) */
$admin_email = "beech.7@osu.edu"; /* Email address of the site administrator */
/* Anonymous User Settings */
/* (these have no effect yet) */
$anon_nick = "Anonymous Poo"; /* Nickname of the anonymous user */
$anon_access = 5; /* Access level of the anonymous user */
$anon_id = 1; /* User ID of the anonymous user */
/* Theme Settings */
$themes = array();
$site_theme = "PHPSlice"; /* Name of the default theme for this site */
$themes["PHPSlice"] = "phpslice.php"; /* Themes array usage: $themes[<theme
name>] = "<template file>"; */
/* Database Settings */
$db_hostname = "localhost"; /* Name/IP of the SQL server */
$db_username = ""; /* Username with access to the database */
$db_password = ""; /* Password for the specified user */
$db_name = "phpslice"; /* Name of the database to use */
$db_type = 2; /* Type of database to use
1 = Microsoft SQL Server 7.0/2000
2 = MySQL
*/
/*******************************************
*
* Initialization
*
********************************************/
/* Load the db functions for the database specified by $db_type */
switch($db_type) {
case 1: /* MSSQL */
include("lib/db_mssql.php");
break;
case 2: /* MySQL */
include("lib/db_mysql.php");
break;
/* not in this release
case 3:
include("lib/db_pgsql.php");
break;
case 4:
include("lib/db_msql.php");
break;
*/
}
/* Load the layout template */
//if (isset($HTTP_COOKIE_VARS["theme"]))
// $layout = $HTTP_COOKIE_VARS["theme"];
//else
$layout = $site_theme;
include("lib/templates/".$themes[$layout]);
/*******************************************
*
* Miscellaneous functions
*
********************************************/
// Check if the user has access to this page; if not, redirect to front
function checkAccess($level) {
global $userinfo, $site_url;
if (!$userinfo["access"] >= $level) {
header("Location: $site_url");
exit;
}
}
// Check if the user is logged in; if not, redirect to front
function checkAuth() {
global $userinfo, $site_url;
if ($userinfo["user_id"] == 1) {
Header("Location: $site_url");
exit;
}
}
function fixQuotes($string) {
$string = str_replace("'", "''", $string);
return $string;
}
/* Strip all invalid HTML and PHP tags from the given string, convert quotes, etc. */
function makeNice($string) {
/* List of allowed tags */
$allowed =
"<a>,<b>,<blockquote>,<br>,<code>,<div>,<em>,<hr>,<i>,<li>,<ol>,<p>,<pre>,<strike>,<strong>,<sub>,<sup>,<tt>,<u>,<ul>";
$string = strip_tags($string, $allowed);
return $string;
}
/* Stricter version of the above, strips EVERYTHING it possibly can */
function makeReallyNice($string) {
$trans = get_html_translation_table(HTML_ENTITIES);
$trans["&"] = "&";
$trans[" "] = " ";
$trans[" "] = " ";
$string = strtr($string, $trans);
return $string;
}
/*******************************************
*
* Handle poll votes
*
********************************************/
if (isset($HTTP_POST_VARS["poll"])) {
$pid = $HTTP_POST_VARS["pid"];
$vote = $HTTP_POST_VARS["vote"];
postVote($userinfo["user_id"], $pid, $vote, $REMOTE_ADDR);
}
/*******************************************
*
* Handle theme changes
*
********************************************/
if (isset($HTTP_POST_VARS["themeop"]))
setcookie("theme", $HTTP_POST_VARS["theme"], time() + 63072000);
?>
---------------------------------------------------------------------------
[2001-06-23 03:44:56] Beech.7@osu.edu
[error] [client 65.24.178.139] Premature end of script headers: c:/php/php.exe
---------------------------------------------------------------------------
[2001-06-23 02:58:44] Beech.7@osu.edu
i believe this is one of the scripts that may be causing an error, but i find nothing.
<?
include("functions.php");
if (! isset($HTTP_POST_VARS["op"]))
$op = strtolower($HTTP_GET_VARS["op"]);
else
$op = strtolower($HTTP_POST_VARS["op"]);
switch($op) {
case "":
printHeader("$site_title - Submit News");
printMessage("Submit News", "Got a hot story? Fill in the details here and
submit it for review. An
unruly mob of $site_title editors and readers will poke, prod, prick, and
preen
your submission and, if the general consensus is that it doesn't suck, it
just might
get posted to the front page. Remember to check your spelling, grammar, and
links!");
printPostNews(0);
printFooter();
break;
case "preview":
printHeader("$site_title - Preview Submission");
printPostNews(1);
printFooter();
break;
case "post":
postNews($userinfo["user_id"], $HTTP_POST_VARS["topic"],
$HTTP_POST_VARS["section"], $HTTP_POST_VARS["title"],
$HTTP_POST_VARS["department"], $HTTP_POST_VARS["text"],
$HTTP_POST_VARS["text2"], $HTTP_POST_VARS["format"], 1);
printHeader("$site_title - Submission Posted");
printMessage("Submission Posted", "Your submission has been posted to the
queue. $site_title editors and readers can now view it, rate it, and decide whether or not they
think it deserves to show up on the front page. Thanks!");
printFooter();
break;
}
?>
---------------------------------------------------------------------------
[2001-06-23 02:53:49] Beech.7@osu.edu
I get the below error anytime anyone tries to submit either news or tries to vote on my site
(www.totalentropy.org). Regretfully I am not able to find the precise script at the moment (as it
is 3 am and i am fscking tired). Best I can say is that it ALWAYS happens. Thanks.
The instruction at "0x10091ceb" referenced memory at "0x00000000". The memory
could not be "read".
---------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view the rest of the comments,
please view the bug report online.
Full Bug description available at: http://bugs.php.net/?id=11624