\n"; echo "\n"; echo " bugs of type "; show_types("Any"); echo "\n"; } function show_types($first_item) { echo " "; } function find_password($user) { $fp=fopen("/repository/CVSROOT/passwd","r"); while(!feof($fp)) { $line=fgets($fp,120); list($luser,$passwd,$junk) = explode(":",$line); if($user==$luser) { fclose($fp); return($passwd); } } fclose($fp); return(""); } function addlinks($text) { $text = htmlspecialchars($text); $new_text = ereg_replace("(http:[^ \n\t]*)","\1",$text); $new_text = ereg_replace("(ftp:[^ \n\t]*)","\1",$text); $new_text = ereg_replace("[.,]-=-\"","\"",$new_text); $new_text = ereg_replace("-=-\"","\"",$new_text); return $new_text; } if (isset($cmd) && $cmd == "Send bug report") { show_menu($status); echo "
\n"; mysql_pconnect("localhost","nobody",""); mysql_select_db("php3"); $ts=date("Y-m-d H:i:s"); mysql_query("INSERT into bugdb values (0,'$bug_type','$email','$sdesc','$ldesc','$php_version','$php_os','Open','','$ts','$ts','')"); $report = ""; echo("
\n");

    $ldesc = stripslashes($ldesc);
    $sdesc = stripslashes($sdesc);
    $report .= "From:             $email\n";
    $report .= "Operating system: $php_os\n";
    $report .= "PHP version:      $php_version\n";
    $report .= "PHP Bug Type:     $bug_type\n";
    $report .= "Bug description:\n";
    $report .= indent($ldesc, "    ");

    $html_report = ereg_replace("<", "<", $report);
    $html_report = ereg_replace(">", ">", $html_report);

    echo $html_report;

    echo("
\n"); if (Mail($destination, "Bug report: $sdesc", $report, "From: $email")) { echo("

Mail sent to $destination...

\n"); echo("Thank you for your help!\n"); } else { echo("

Mail not sent!

\n"); echo("Please send this page in a mail to " . "$email manually.\n"); } } elseif(isset($cmd) && $cmd=="Display Bugs") { show_menu($status); echo "
\n"; mysql_pconnect("localhost","nobody",""); mysql_select_db("php3"); echo "
\n"; if($status=="All" && $bug_type=="Any") { $result = mysql_query("SELECT * from bugdb order by id"); } elseif($status=="All" && $bug_type!="Any") { $result = mysql_query("SELECT * from bugdb where bug_type='$bug_type' order by id"); } elseif($status!="All" && $bug_type=="Any") { $result = mysql_query("SELECT * from bugdb where status='$status' order by id"); } else { $result = mysql_query("SELECT * from bugdb where status='$status' and bug_type='$bug_type' order by id"); } while($row=mysql_fetch_row($result)) { if($row[7]=="Open") { $col = "#ffbbaa"; } else { $col = "#aaffbb"; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; } mysql_freeresult($result); echo "
ID#StatusTypeVersionOSOriginatorDescription
".$row[0]." ".$row[7]." ".$row[1]."".$row[5]."".$row[6]." ".$row[2]." ".$row[3]." 
\n"; echo "
Submit a Bug Report
\n"; } else if(!isset($cmd) && isset($id)) { show_menu($status); echo "
\n"; mysql_pconnect("localhost","nobody",""); mysql_select_db("php3"); if(isset($modify) && $modify=="Edit Bug") { $ok=0; if($user!="cvsread") { $psw=find_password($user); if(strlen($psw)>0) { if(crypt($pw,substr($psw,0,2))==$psw) { $ts=date("Y-m-d H:i:s"); if($status=="Delete!") { mysql_query("DELETE from bugdb where id=$id"); } else { mysql_query("UPDATE bugdb set status='$status', comments='$comments', ts2='$ts', dev_id='$user' where id=$id"); } $ok=1; } } } if(!$ok) { echo "Sorry, incorrect user id/password pair.
\n"; Mail("rasmus@lerdorf.on.ca", "bugdb auth failure for $user/$pw", "", "From: bugdb"); } else { echo "Database updated!
\n"; } } $result = mysql_query("SELECT * from bugdb where id=$id"); if(mysql_numrows($result)>0) { $row = mysql_fetch_row($result); echo "

Bug id #$id

\n"; echo "\n"; if(!isset($edit)) { echo ""; echo ""; } else { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
Status:".$row[7]."Modify
Status:\n"; } echo "
From:".$row[2]."
Date:".$row[9]."
Type:".$row[1]."
OS:".$row[6]."
PHP Version:".$row[5]."
Short Desc.:".$row[3]."
\n"; $text = addlinks($row[4]); echo "
".$text."
\n"; if(!isset($edit)) { if(strlen($row[8])) { echo "[".$row[10]."] Updated by ".$row[11]."
\n"; $text=addlinks($row[8]); echo "
".$text."
\n"; } } else { echo "Developer Comments:
\n"; echo "
\n"; echo "CVS user id: \n"; echo "CVS password: \n"; echo "\n"; echo "\n"; } } else { if(isset($modify) && $status=="Delete!") { echo "

Bug id #$id has been deleted

\n"; } else { echo "

Sorry bug id #$id does not exist

\n"; } } mysql_freeresult($result); } else { show_menu($status); ?> Or use the form below to submit a new bug report.

Please make sure you have read our list of Frequently Asked Questions to see whether your problem may already be a known issue, and also check the bug database for any outstanding bug reports that match your bug.
Your email address:
PHP version:
Type of bug:
Operating system:
Bug description:
Please supply any information that may be helpful in fixing the bug:
  • A short script that reproduces the problem
  • The list of modules you compiled PHP with (your configure line)
  • A copy of your php3.ini file (if it might be relevant)
  • Any other information unique or specific to your setup