Any ideas

[php]
Notice: Use of undefined constant host - assumed ‘host’ in /opt/lampp/htdocs/config.php on line 3

Notice: Use of undefined constant user - assumed ‘user’ in /opt/lampp/htdocs/config.php on line 4

Notice: Use of undefined constant pass - assumed ‘pass’ in /opt/lampp/htdocs/config.php on line 5

Notice: Use of undefined constant name - assumed ‘name’ in /opt/lampp/htdocs/config.php on line 6

Notice: Use of undefined constant host - assumed ‘host’ in /opt/lampp/htdocs/config.php on line 9

Notice: Use of undefined constant user - assumed ‘user’ in /opt/lampp/htdocs/config.php on line 9

Notice: Use of undefined constant pass - assumed ‘pass’ in /opt/lampp/htdocs/config.php on line 9

Notice: Undefined variable: tru in /opt/lampp/htdocs/setup.php on line 58

Notice: Use of undefined constant sup - assumed ‘sup’ in /opt/lampp/htdocs/setup.php on line 60

Notice: Use of undefined constant nor - assumed ‘nor’ in /opt/lampp/htdocs/setup.php on line 61

Notice: Use of undefined constant location - assumed ‘location’ in /opt/lampp/htdocs/setup.php on line 66

Notice: Use of undefined constant img - assumed ‘img’ in /opt/lampp/htdocs/setup.php on line 67

Notice: Use of undefined constant user - assumed ‘user’ in /opt/lampp/htdocs/setup.php on line 70

Notice: Use of undefined constant html - assumed ‘html’ in /opt/lampp/htdocs/setup.php on line 71

Notice: Use of undefined constant news - assumed ‘news’ in /opt/lampp/htdocs/setup.php on line 72

Notice: Use of undefined constant game - assumed ‘game’ in /opt/lampp/htdocs/setup.php on line 73

Notice: Use of undefined constant stat - assumed ‘stat’ in /opt/lampp/htdocs/setup.php on line 74

Notice: Use of undefined constant censor - assumed ‘censor’ in /opt/lampp/htdocs/setup.php on line 75

Notice: Use of undefined constant banned - assumed ‘banned’ in /opt/lampp/htdocs/setup.php on line 76

Notice: Use of undefined constant paypal - assumed ‘paypal’ in /opt/lampp/htdocs/setup.php on line 77

Notice: Use of undefined constant logs - assumed ‘logs’ in /opt/lampp/htdocs/setup.php on line 78

Notice: Use of undefined constant bannedip - assumed ‘bannedip’ in /opt/lampp/htdocs/setup.php on line 79

Notice: Use of undefined constant contracts - assumed ‘contracts’ in /opt/lampp/htdocs/setup.php on line 80

Notice: Use of undefined constant transactions - assumed ‘transactions’ in /opt/lampp/htdocs/setup.php on line 81

Notice: Use of undefined constant board - assumed ‘board’ in /opt/lampp/htdocs/setup.php on line 84

Notice: Use of undefined constant clist - assumed ‘clist’ in /opt/lampp/htdocs/setup.php on line 85

Notice: Use of undefined constant city - assumed ‘city’ in /opt/lampp/htdocs/setup.php on line 86

Notice: Use of undefined constant crew - assumed ‘crew’ in /opt/lampp/htdocs/setup.php on line 87

Notice: Use of undefined constant invite - assumed ‘invite’ in /opt/lampp/htdocs/setup.php on line 88

Notice: Use of undefined constant mail - assumed ‘mail’ in /opt/lampp/htdocs/setup.php on line 89

Notice: Use of undefined constant pimp - assumed ‘pimp’ in /opt/lampp/htdocs/setup.php on line 90

Notice: Use of undefined constant revenge - assumed ‘revenge’ in /opt/lampp/htdocs/setup.php on line 91

Notice: Use of undefined constant cron - assumed ‘cron’ in /opt/lampp/htdocs/setup.php on line 92

Notice: Use of undefined constant bank - assumed ‘bank’ in /opt/lampp/htdocs/setup.php on line 93

Notice: Use of undefined constant forum_post - assumed ‘forum_post’ in /opt/lampp/htdocs/setup.php on line 94

Notice: Use of undefined constant forum_postext - assumed ‘forum_postext’ in /opt/lampp/htdocs/setup.php on line 95

Notice: Use of undefined constant forum_smile - assumed ‘forum_smile’ in /opt/lampp/htdocs/setup.php on line 96

Notice: Use of undefined constant forum_topic - assumed ‘forum_topic’ in /opt/lampp/htdocs/setup.php on line 97

Notice: Use of undefined constant market - assumed ‘market’ in /opt/lampp/htdocs/setup.php on line 98

Notice: Use of undefined constant transactions - assumed ‘transactions’ in /opt/lampp/htdocs/setup.php on line 99

Notice: Undefined variable: tru in /opt/lampp/htdocs/setup.php on line 109

Notice: Undefined variable: tru in /opt/lampp/htdocs/setup.php on line 112

Notice: Undefined variable: tru in /opt/lampp/htdocs/setup.php on line 131

Notice: Undefined index: code in /opt/lampp/htdocs/setup.php on line 134

Notice: Undefined variable: trupimpn in /opt/lampp/htdocs/setup.php on line 138

Notice: Undefined variable: totalprofit in /opt/lampp/htdocs/setup.php on line 143

Notice: A session had already been started - ignoring session_start() in /opt/lampp/htdocs/setup.php on line 868[/php]

everything is nice because on other servers this script is working but on linux mint 15 and xampp 1.8.3 is not

any ideas whats wrong

All constans are written like ‘constant’

Please add the code, without it trying to help is just guesswprk

My guess is that you use arrays and mistakingly write $array[key] instead of $array[‘key’]

Ie
$config[host] should be $config[‘host’]

The notice is thrown because you refer to constants that do not exist

im trying understand the php

my test subject is nulled script mypimpscript v3 and its nulled.
so i tried in romsuu.host-ed.me
its linux os and have php5 and have mysql parameters
Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.1.68-cll-lve - MySQL Community Server (GPL)

everything works okay :slight_smile:
so i wondered to try it on linux mint 15 at home the nulled and bought version

i have the ip address opened for remote access (if that helps)
just need to help for understanding php script and its inner beauty (why is php behavior like that)

if you need a passwords or anything just ask in pm

i installed the bought version of mypimpscript v3 im scared that it will do the same thing(installed and tried its the same)
checked both versions php files and they were identical only difference was the licence key

Is this script even remotely up to date? Is it maintained any more or was it shut down some time in 2010/2011? I tried entering a single quote in the user name field in the login form and got an SQL error. In 10/10 cases that mean you do not want that php script publically available…
http://romsuu.host-ed.me/pimp.php?pid=rOMSUU&rnd='1

no i dont want this script to be public just need to learn some php code in that case
and i bought from raven http://ravan.info/ this script is meant to be public but the problem is if this script will do this trick too then its no use on linux because i ran ravan and mypimp script on windows a worked fine only thig what became mistery on windows was cronjobs and mypimpscript need cronjobs in right dir

maybe i have wrong config in php.ini or something ?

mypimpscript needs php 4 minimum
ravan mafia script need php4 and above

look at these bugs on 62.65.54.138

fresh linux install today morning

lampp is running on 62.65.54.138/lampp
the whole xampp folder :slight_smile:

second what i need

is to setup my linux like its host-ed server

The hosted setup probably just hides notices and warnings, it is not recommended for development use as you should fix errors/notices/warnings, not ignore them.

so the best solution is to open the code and browser at the same time and fixing these problem live
constant @ the config.php is done like you suggested

$config[host] should be $config[‘host’]

best support and help ever :slight_smile: thanks JimL

Yes its always best to fix whatever errors youve got. Please be warned this seems like a so-so quality script, so you may be in for a huge amount of work fixing it.

You should also do something about your local web server. You should turn off dir listing, lock phpmyadmin to localhost or at least require a login to use phpmyadmin.

im not worried about phpmyadmin and stuff :slight_smile:

because i can always install over and over again :slight_smile:

but i dont understand this code and error

Notice: Undefined variable: tru in /opt/lampp/htdocs/setup.php on line 109

and code is [php]if(($tru) && (!mysql_fetch_row(mysql_query(“SELECT round FROM $tab[game] WHERE round=$‘tru’ AND starts<$time AND ends>$time;”))))[/php]

whats wrong in there

also giving on

Notice: Undefined variable: true in /opt/lampp/htdocs/setup.php on line 112

[php]if($true){[/php]

Notice: Undefined variable: tru in /opt/lampp/htdocs/setup.php on line 131

[php]if($tru){ $id = mysql_fetch_array(mysql_query(“SELECT id FROM $tab[pimp] WHERE code=’$trupimpn’;”));[/php]

Notice: Undefined index: code in /opt/lampp/htdocs/setup.php on line 134

[php]$userid = mysql_fetch_array(mysql_query(“SELECT id FROM $tab[user] WHERE code=’$_SESSION[code]’;”));[/php]

Notice: Undefined variable: trupimpn in /opt/lampp/htdocs/setup.php on line 138

[php]$id2 = mysql_fetch_array(mysql_query(“SELECT id FROM $tab[user] WHERE code=’$trupimpn’;”));[/php]

Notice: Undefined variable: totalprofit in /opt/lampp/htdocs/setup.php on line 143

[php]$jackpot = ($totalprofit*$jackpotper/100);[/php][/code]

You are aware that you might be running the webserver using your own user id, so if I can control mysql/php I can control your file system, and even execute stuff…?

Aanyway. All the errors you posted are because the script try to use a variable that is not set.

so i start writing the code but did a mistake some were

getting error

Notice: Undefined variable: name in /opt/lampp/htdocs/staff.php on line 8

Notice: Undefined variable: admin_array in /opt/lampp/htdocs/staff.php on line 8

Warning: in_array() expects parameter 2 to be array, null given in /opt/lampp/htdocs/staff.php on line 8
lalallaa
Notice: Undefined variable: name in /opt/lampp/htdocs/staff.php on line 13

Notice: Undefined variable: admin_array in /opt/lampp/htdocs/staff.php on line 13

and the code is here

[php]<?php require("safe.php"); ?>

<?php if (in_array ($name, $admin_array)){ ?> Some html admins only. <? } ?> lalallaa <?php if (array($name, $admin_array)){ echo "Something for admin only"; } ?> <?php if(isset($_POST['Add_admin'])){ if(empty($_POST['admin'])){ echo "You didn't enter a name."; }else{ if (in_array($_POST['admin'], $admin_array)) { echo "This person is already a admin."; }else{ $sql = "SELECT name FROM users WHERE name='".mysql_real_escape_string($_POST['admin'])."'"; $query = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_object($query); $admin_name = htmlspecialchars($row->name); if(empty($admin_name)){ echo "This users doesn't exist"; }else{ if(empty($admins)){ $result = mysql_query("UPDATE sitestats SET admins='".mysql_real_escape_string($admin_name)."' ,admins_ip='".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."' WHERE id='1'") or die(mysql_error()); $admins = $admin_name; }else{ $new_admin = $admins."-".$admin_name; $new_ip = $admins_ip."-".$_SERVER['REMOTE_ADDR']; $result = mysql_query("UPDATE sitestats SET admins='".mysql_real_escape_string($new_admin)."' ,admins_ip='".mysql_real_escape_string($new_ip)."' WHERE id='1'") or die(mysql_error()); $admins = $new_admin; } echo "You added ".$admin_name." as new admin."; }// if empty field. }// if exist check. }// if already in check. }// if isset. if(isset($_POST['Remove_admin'])){ if(empty($_POST['admin_name'])){ echo "You didn't select a person to demote from admin."; }else{ if (!in_array($_POST['admin_name'], $admin_array)) { echo "This person isn't a admin."; }else{ $new_admin = ""; foreach( $admin_array as $key => $value){ if($value != $_POST['admin_name']){ if(empty($new_admin)){ $new_admin = $value; }else{ $new_admin = $new_admin."-".$value; } } } $new_ip = ""; foreach( $admin_ip_array as $key => $value){ if($value != $_POST['admin_name']){ if(empty($new_ip)){ $new_ip = $value; }else{ $new_ip = $new_ip."-".$value; } } } $result = mysql_query("UPDATE sitestats SET admins='".mysql_real_escape_string($new_admin)."' ,admins_ip='".mysql_real_escape_string($new_ip)."' WHERE id='1'") or die(mysql_error()); $result = mysql_query("UPDATE users SET state='0' WHERE id='".mysql_real_escape_string($new_admin)."'") or die(mysql_error()); $admins = $new_admin; echo "You removed ".$_POST['admin_name']." from his admin position."; }// if no friend selected. }// if not in friendslist. }// if isset. ?> <td colspan="4" align="center" <?php
if(empty($admins)){
echo "There are no admins.";
}else{

$admins_list = explode("-", $admins);

foreach( $admins_list as $key => $value){
echo “<input name=“admin_name” type=“radio” value=”".$value."" onfocus=“if(this.blur)this.blur()”>".$value."";

}
}// if no friends.
?>







Admins
Name:

MOD List:
Names of Mods will appear here
Name:

Hdo List:
Names of HDOs will appear here
Name:
?> [/php]

and require file ise here

[php]<?php include_once(“connect.php”);

if(isset($_SESSION[‘user_id’])) { // checks for id in session

$sql = "UPDATE users SET lastactive = NOW() WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'";
 		
mysql_query($sql); // updates the last activity of user
	
           
if ($_SESSION['login_time'] < strtotime('-1 minutes')) {
// logs user out after 15 minutes and redirects to login and ends session
	
	header("Location: index.php");
	exit();
	session_destroy();

$sql = “SELECT * FROM users WHERE id=’”.mysql_real_escape_string($_SESSION[‘user_id’])."’";
$query = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_object($query);
$id = htmlspecialchars($row->id);
$userip = htmlspecialchars($row->userip);
$name = htmlspecialchars($row->name);
$sitestate = htmlspecialchars($row->sitestate);
$password = htmlspecialchars($row->password);
$mail = htmlspecialchars($row->mail);
$money = htmlspecialchars($row->money);
$exp = htmlspecialchars($row->exp);
$rank = htmlspecialchars($row->rank);
$health = htmlspecialchars($row->health);
$points = htmlspecialchars($row->points);

// This select the information from sitestats so that it is easy access in the game. It select it from id one because that’s the only id that should be there.
$sql = “SELECT * FROM sitestats WHERE id=‘1’”;
$query = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_object($query);
$admins = htmlspecialchars($row->admins);
$mods = htmlspecialchars($row->mods);
$hdo = htmlspecialchars($row->hdo);
$admins_ip = htmlspecialchars($row->admins_ip);
$mods_ip = htmlspecialchars($row->mods_ip);

$admin_array = explode("-", $admins);
$mods_array = explode("-", $mods);
$hdo_array = explode("-", $hdo);
$admin_ip_array = explode("-", $admins_ip);
$mods_ip_array = explode("-", $mods_ip);

}
}
?>

[/php]

database ise here

[php]-- phpMyAdmin SQL Dump
– version 4.0.4.1
http://www.phpmyadmin.net

– Host: localhost
– Generation Time: Oct 24, 2013 at 10:44
– Server version: 5.6.12
– PHP Version: 5.5.3

SET SQL_MODE = “NO_AUTO_VALUE_ON_ZERO”;
SET time_zone = “+00:00”;

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;
/
!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
/
!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
/
!40101 SET NAMES utf8 */;


– Database: j

CREATE DATABASE IF NOT EXISTS j DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE j;



– Table structure for table replys

CREATE TABLE IF NOT EXISTS replys (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(20) NOT NULL DEFAULT ‘’,
message text NOT NULL,
tid int(11) NOT NULL DEFAULT ‘0’,
date varchar(50) NOT NULL DEFAULT ‘’,
topictype char(1) NOT NULL DEFAULT ‘1’,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13421 ;



– Table structure for table sitestats

CREATE TABLE IF NOT EXISTS sitestats (
id int(1) NOT NULL AUTO_INCREMENT,
admins text NOT NULL,
mods text NOT NULL,
admins_ip text NOT NULL,
mods_ip text NOT NULL,
hdo text NOT NULL,
ranks text NOT NULL,
wealth text NOT NULL,
cars text NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3024 ;



– Table structure for table topics

CREATE TABLE IF NOT EXISTS topics (
id int(11) NOT NULL AUTO_INCREMENT,
title varchar(50) NOT NULL DEFAULT ‘’,
message text NOT NULL,
name varchar(20) NOT NULL DEFAULT ‘’,
date varchar(50) NOT NULL DEFAULT ‘’,
topicstate char(1) NOT NULL DEFAULT ‘0’,
locked char(1) NOT NULL DEFAULT ‘1’,
type varchar(1) NOT NULL DEFAULT ‘1’,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2237 ;



– Table structure for table users

CREATE TABLE IF NOT EXISTS users (
id int(11) NOT NULL AUTO_INCREMENT,
userip varchar(50) NOT NULL DEFAULT ‘’,
signup_ip varchar(255) NOT NULL,
login_count varchar(10) NOT NULL DEFAULT ‘0’,
login_ip text NOT NULL,
name varchar(50) NOT NULL DEFAULT ‘’,
account_type char(1) NOT NULL DEFAULT ‘1’,
password varchar(50) NOT NULL DEFAULT ‘’,
sitestate char(1) NOT NULL DEFAULT ‘0’,
signup varchar(255) NOT NULL DEFAULT ‘’,
money varchar(20) NOT NULL DEFAULT ‘1500’,
exp varchar(20) NOT NULL DEFAULT ‘0’,
rank char(2) DEFAULT ‘0’,
health char(3) NOT NULL DEFAULT ‘100’,
points varchar(10) NOT NULL DEFAULT ‘0’,
mail varchar(100) NOT NULL DEFAULT ‘’,
lastactive varchar(255) NOT NULL,
profile text NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3024 ;


– Dumping data for table users

INSERT INTO users (id, userip, signup_ip, login_count, login_ip, name, account_type, password, sitestate, signup, money, exp, rank, health, points, mail, lastactive, profile) VALUES
(3023, ‘127.0.0.1’, ‘’, ‘0’, ‘127.0.0.1’, ‘romsu’, ‘1’, ‘c5433fd0a51d91b09d942cb9be6482b4’, ‘0’, ‘’, ‘1500’, ‘0’, ‘0’, ‘100’, ‘0’, ‘[email protected]’, ‘’, ‘’);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT /;
/
!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /;
/
!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;[/php]

any ideas or help :slight_smile:

You have to figure out why the variables are not set. Check if you actually get the response you expect from the server, check that the name and admin variables contain the info you intend (in the require file). somewhere something is going wrong.

Sponsor our Newsletter | Privacy Policy | Terms of Service