php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11624 memory error
Submitted: 2001-06-23 02:53 UTC Modified: 2001-06-23 15:01 UTC
From: Beech dot 7 at osu dot edu Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.0.6 OS: Thanks
Private report: No CVE-ID: None
 [2001-06-23 02:53 UTC] Beech dot 7 at osu dot 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".

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-23 02:58 UTC] Beech dot 7 at osu dot 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 03:44 UTC] Beech dot 7 at osu dot edu
[error] [client 65.24.178.139] Premature end of script headers: c:/php/php.exe
 [2001-06-23 03:46 UTC] Beech dot 7 at osu dot 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["  "] = "&nbsp;&nbsp;";
    $trans["   "] = "&nbsp;&nbsp;&nbsp;";

    $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:48 UTC] Beech dot 7 at osu dot 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:49 UTC] Beech dot 7 at osu dot edu
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.
 [2001-06-23 03:56 UTC] Beech dot 7 at osu dot edu
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.
 [2001-06-23 04:06 UTC] Beech dot 7 at osu dot edu
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.
 [2001-06-23 06:06 UTC] sniper@php.net
Does this happen with PHP 4.0.6 ?

 [2001-06-23 14:40 UTC] Beech dot 7 at osu dot edu
It works now, thanx.  All i have to do now if figure out how to get the input working.
 [2001-06-23 15:01 UTC] sniper@php.net
Fixed -> closed.

 [2003-06-18 07:20 UTC] mangesh_gudms at yahoo dot com
how was the bug solved. could anyone tell me
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC