Jump to content

Notice: Use of undefined constant dbname - assumed 'dbname' in ...


Recommended Posts

At the beginning i thought its something in the script. Turned out, that it happens to many other scripts i tried to  run.

Apache1.3.33

PHP 4.3.10

PHPMyAdmin 2.6.1

MySQL 4.1.9

Mayebe im just using old scripts, that don's support this php version?

Any ideas how to fix it? :-\ ???

Thanks!

Kill Monster Script from http://www.chipmunk-scripts.com/

<?php
parse_str("$QUERY_STRING");

$db = mysql_connect("localhost", "root", "pwd") or die("Could not connect.");
if(!$db) 
die("no db");
if(!mysql_select_db("km",$db))
	die("No database selected."); 
if(!get_magic_quotes_gpc())
{
  $_GET = array_map('mysql_real_escape_string', $_GET); 
  $_POST = array_map('mysql_real_escape_string', $_POST); 
  $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
else
{  
   $_GET = array_map('stripslashes', $_GET); 
   $_POST = array_map('stripslashes', $_POST); 
   $_COOKIE = array_map('stripslashes', $_COOKIE);
   $_GET = array_map('mysql_real_escape_string', $_GET); 
   $_POST = array_map('mysql_real_escape_string', $_POST); 
   $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
?>

Error was:

Notice: Undefined variable: QUERY_STRING in c:\program files\easyphp1-8\www\mmorpg\test\km2\connect.php on line 2

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\program files\easyphp1-8\www\mmorpg\test\km2\connect.php:2) in c:\program files\easyphp1-8\www\mmorpg\test\km2\index.php on line 4

 

Or

 

Pwngame script from http://www.chipmunk-scripts.com/

Error

Notice: Undefined index: pwngame in c:\program files\easyphp1-8\www\mmorpg\test\pwngame\index.php on line 4

Index.php:

<?php
session_start();
include "connect.php";
$username=$_SESSION['pwngame'];
$getuser="SELECT * from eatyou_login where eatname='$username'";
$getuser2=mysql_query($getuser) or die("Could not get user");
$getuser3=mysql_fetch_array($getuser2);
?>
<link rel='stylesheet' href='style.css' type='text/css'>
<?php
if(isset($_SESSION['pwngame']))
{
  print "<table class='maintable'>";
  print "<tr valign='top'><td width=25%>";
  include "left.php";
  print "</td>";
  print "<td width=75%>";
  //main table
  print "<table width=90% class='maintable'>
  <tr class='headline'><td>Main screen</td></tr>";
  print "<tr class='mainrow'><td>";
  print "This is your main user control panel, from here you change your password and change your avatar. To pwn people, point them to this URL:<br> $path/pwn.php?ID=$getuser3[eatid]<br><br>";
  print "You have pwned $getuser3[score] people so far.<br><br>";
  print "<A href='topscores.php'>Top 100 pwners</a>";
  print "</td></tr></table></td>";
  print "</table><br><br>";
  print "<center><font size='1'>Script produced by © <A href='http://www.chipmunk-scripts.com'>Chipmunk Scripts</a></font></center>";
}
else
{
  print "<table class='maintable'>";
  print "<tr valign='top'><td width=100%>";
  print "You are not logged in.";
  print "</td></tr></table>";

}
?>

And yea, both of them are fresh downloads with no modifications, except the configuration

Hope it's the right code ;D

Thanks

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.