help ik kan de fout niet vinden.....
danny74 - 11/02/2005 21:54 (laatste wijziging 11/02/2005 22:55)
Lid
ik krijg steeds de volgende foutmelding en ik kan hem niet vinden.
Fatal error: Call to undefined function: var_export() in /home/httpd/vhosts/websiteadres/httpdocs/_include-config.php on line 40
hieronder de code,
het gebeurt telkens als ik wat wil versturen of kopen.
het probleem doet zich telkens voor als ikgeld op de bank wil zetten of afnemen, wapens wil kijken of kopen, of sms versturen in de game criminal war...
deze game staat hier op een intern netwerk en deze foutmelding heb ik al vanaf begin.
<?php /* ------------------------- */
if(!(@mysql_pconnect("mijn info") && @mysql_select_db("criminals"))) {
print <<<ENDHTML
<html>
<head>
<title>[( Criminals )]</title>
<link rel="stylesheet" type="text/css" href="css-v1.css">
</head>
<body style="background: #AA3C3C; margin: 0px;">
<table width=100%>
<tr><td class="subTitle"><b>Database Error</b></td></tr>
<tr><td class="mainTxt">
Er is een fout opgetreden in de database
</td></tr>
</table>
</body>
</html>
ENDHTML;
exit;
}
session_start();
include("_include-funcs.php");
if(isset($_SESSION['login'])) {
$dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`signup`) AS `signup`,UNIX_TIMESTAMP(`online`) AS `online` FROM `[users]` WHERE `login`='{$_SESSION['login']}'");
$data = mysql_fetch_object($dbres);
}
if(((count($_POST) > 0 && !isset($_POST['omnilog'])) || ($_POST['omnilog'] == 1 && count($_GET) > 1)) && isset($OMNILOG)) {
$forwardedFor = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['HTTP_CLIENT_IP'];
$forwardedFor = preg_replace('/, .+/','',$forwardedFor);
$postVars = addslashes[i](var_export($_POST,TRUE));
if($postVars == "array (\n)" || (count($_POST) == 1 && isset[/i]($_POST['omnilog'])))
$postVars = "";
$getVars = addslashes(var_export($_GET,TRUE));
if($getVars == "array (\n)")
$getVars = "";
mysql_query("INSERT INTO `[omnilog]` VALUES(NOW(),'{$_COOKIE['login']}','{$_SERVER['REMOTE_ADDR']}','$forwardedFor','{$_SERVER['PHP_SELF']}','$postVars','$getVars')");
}
foreach($_POST as $key => $value) {
if(gettype($_POST[$key]) == "array")
foreach($_POST[$key] as $key2 => $value2)
$_POST[$key][$key2] = addslashes($_POST[$key][$key2]);
else
$_POST[$key] = addslashes($_POST[$key]);
}
foreach($_GET as $key => $value) {
if(gettype($_GET[$key]) == "array")
foreach($_GET[$key] as $key2 => $value2)
$_GET[$key][$key2] = addslashes($_GET[$key][$key2]);
else
$_GET[$key] = addslashes($_GET[$key]);
}
foreach($_COOKIE as $key => $value) {
if(gettype($_COOKIE[$key]) == "array")
foreach($_COOKIE[$key] as $key2 => $value2)
$_COOKIE[$key][$key2] = addslashes($_COOKIE[$key][$key2]);
else
$_COOKIE[$key] = addslashes($_COOKIE[$key]);
}
$clientIP = $_SERVER['REMOTE_ADDR'];
$forwardedFor = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['HTTP_CLIENT_IP'];
$forwardedFor = preg_replace('/, .+/','',$forwardedFor);
$dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `level`='-1' AND (`IP`='$clientIP' OR `IP`='$forwardedFor')");
if(mysql_num_rows($dbres) != 0) {
print <<<ENDHTML
<html>
<head>
<title>[( Criminals )]</title>
<link rel="stylesheet" type="text/css" href="css-v1.css">
</head>
<body style="background: #AA3C3C; margin: 0px;">
<table width=100% height=100%>
<tr><td class="subTitle"><b>Ban</b></td></tr>
<tr><td class="mainTxt">
Het IP waarmee je speelt is geband
</td></tr>
</table>
</body>
</html>
ENDHTML;
exit;
}
if(isset($UPDATE_DB)) {
$dbres = mysql_query("SELECT UNIX_TIMESTAMP(`time`) AS `time`,`name` FROM `[cron]`");
while($x = mysql_fetch_object($dbres))
$update[$x->name] = $x->time;
if(floor($update['hour']/3600) != floor(time()/3600)) {
$dbres = mysql_query("SELECT GET_LOCK('hour_update',0)");
if(mysql_result($dbres,0) == 1) {
$cron_pass = "secretcronpassword";
mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='hour'");
include("_cron_hour.php");
mysql_query("SELECT RELEASE_LOCK('hour_update')");
}
}
if(floor($update['day']/86400) != floor(time()/86400)) {
$dbres = mysql_query("SELECT GET_LOCK('day_update',0)");
if(mysql_result($dbres,0) == 1) {
$cron_pass = "secretcronpassword";
mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='day'");
include("_cron_day.php");
mysql_query("SELECT RELEASE_LOCK('day_update')");
}
}
if(floor($update['week']/604800) != floor(time()/604800)) {
$dbres = mysql_query("SELECT GET_LOCK('week_update',0)");
if(mysql_result($dbres,0) == 1) {
$cron_pass = "secretcronpassword";
mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='week'");
include("_cron_week.php");
mysql_query("SELECT RELEASE_LOCK('week_update')");
}
}
if(date('n',$update['month']) != date('n',time())) {
$dbres = mysql_query("SELECT GET_LOCK('month_update',0)");
if(mysql_result($dbres,0) == 1) {
$cron_pass = "secretcronpassword";
mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='month'");
include("_cron_month.php");
mysql_query("SELECT RELEASE_LOCK('month_update')");
}
}
if((date('G',time()) >= 16 && date('z',time()) != date('z',$update['horserace'])) || (date('G',time()) >= 21 && date('G',$update['horserace']) < 21)) {
$dbres = mysql_query("SELECT GET_LOCK('horserace_update',0)");
if(mysql_result($dbres,0) == 1) {
$cron_pass = "secretcronpassword";
mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='horserace'");
include("_cron_horserace.php");
mysql_query("SELECT RELEASE_LOCK('horserace_update')");
}
}
}
/* ------------------------- */ ?>
<?php /* ------------------------- */
<html>
<head>
<title>[( Criminals )]</title>
<link rel="stylesheet" type="text/css" href="css-v1.css">
</head>
<body style="background: #AA3C3C; margin: 0px;">
<table width=100%>
<tr><td class="subTitle"><b>Database Error</b></td></tr>
<tr><td class="mainTxt">
Er is een fout opgetreden in de database
</td></tr>
</table>
</body>
</html>
ENDHTML ;
}
include ( "_include-funcs.php" ) ;
if ( isset ( $_SESSION [ 'login' ] ) ) { $dbres = mysql_query ( "SELECT *,UNIX_TIMESTAMP(`signup`) AS `signup`,UNIX_TIMESTAMP(`online`) AS `online` FROM `[users]` WHERE `login`='{$_SESSION['login']} '" ) ; }
if ( ( ( count ( $_POST ) > 0 && ! isset ( $_POST [ 'omnilog' ] ) ) || ( $_POST [ 'omnilog' ] == 1 && count ( $_GET ) > 1 ) ) && isset ( $OMNILOG ) ) { $forwardedFor = ( $_SERVER [ 'HTTP_X_FORWARDED_FOR' ] != "" ) ? $_SERVER [ 'HTTP_X_FORWARDED_FOR' ] : $_SERVER [ 'HTTP_CLIENT_IP' ] ;
if ( $postVars == "array (\n )" || ( count ( $_POST ) == 1 && isset [ / i
] ( $_POST [ 'omnilog' ] ) ) ) $postVars = "" ;
if ( $getVars == "array (\n )" )
$getVars = "" ;
mysql_query ( "INSERT INTO `[omnilog]` VALUES(NOW(),'{$_COOKIE['login']} ','{$_SERVER['REMOTE_ADDR']} ','$forwardedFor ','{$_SERVER['PHP_SELF']} ','$postVars ','$getVars ')" ) ; }
foreach ( $_POST as $key => $value ) {
if ( gettype ( $_POST [ $key ] ) == "array" ) foreach ( $_POST [ $key ] as $key2 => $value2 )
$_POST [ $key ] [ $key2 ] = addslashes ( $_POST [ $key ] [ $key2 ] ) ; else
}
foreach ( $_GET as $key => $value ) {
if ( gettype ( $_GET [ $key ] ) == "array" ) foreach ( $_GET [ $key ] as $key2 => $value2 )
$_GET [ $key ] [ $key2 ] = addslashes ( $_GET [ $key ] [ $key2 ] ) ; else
}
foreach ( $_COOKIE as $key => $value ) {
if ( gettype ( $_COOKIE [ $key ] ) == "array" ) foreach ( $_COOKIE [ $key ] as $key2 => $value2 )
$_COOKIE [ $key ] [ $key2 ] = addslashes ( $_COOKIE [ $key ] [ $key2 ] ) ; else
}
$clientIP = $_SERVER [ 'REMOTE_ADDR' ] ;
$forwardedFor = ( $_SERVER [ 'HTTP_X_FORWARDED_FOR' ] != "" ) ? $_SERVER [ 'HTTP_X_FORWARDED_FOR' ] : $_SERVER [ 'HTTP_CLIENT_IP' ] ;
$dbres = mysql_query ( "SELECT `id` FROM `[users]` WHERE `level`='-1' AND (`IP`='$clientIP ' OR `IP`='$forwardedFor ')" ) ; <html>
<head>
<title>[( Criminals )]</title>
<link rel="stylesheet" type="text/css" href="css-v1.css">
</head>
<body style="background: #AA3C3C; margin: 0px;">
<table width=100% height=100%>
<tr><td class="subTitle"><b>Ban</b></td></tr>
<tr><td class="mainTxt">
Het IP waarmee je speelt is geband
</td></tr>
</table>
</body>
</html>
ENDHTML ;
}
$dbres = mysql_query ( "SELECT UNIX_TIMESTAMP(`time`) AS `time`,`name` FROM `[cron]`" ) ; $update [ $x -> name ] = $x -> time ;
$dbres = mysql_query ( "SELECT GET_LOCK('hour_update',0)" ) ; $cron_pass = "secretcronpassword" ;
mysql_query ( "UPDATE `[cron]` SET `time`=NOW() WHERE `name`='hour'" ) ; include ( "_cron_hour.php" ) ;
}
}
$dbres = mysql_query ( "SELECT GET_LOCK('day_update',0)" ) ; $cron_pass = "secretcronpassword" ;
mysql_query ( "UPDATE `[cron]` SET `time`=NOW() WHERE `name`='day'" ) ; include ( "_cron_day.php" ) ;
}
}
$dbres = mysql_query ( "SELECT GET_LOCK('week_update',0)" ) ; $cron_pass = "secretcronpassword" ;
mysql_query ( "UPDATE `[cron]` SET `time`=NOW() WHERE `name`='week'" ) ; include ( "_cron_week.php" ) ;
}
}
$dbres = mysql_query ( "SELECT GET_LOCK('month_update',0)" ) ; $cron_pass = "secretcronpassword" ;
mysql_query ( "UPDATE `[cron]` SET `time`=NOW() WHERE `name`='month'" ) ; include ( "_cron_month.php" ) ;
}
}
$dbres = mysql_query ( "SELECT GET_LOCK('horserace_update',0)" ) ; $cron_pass = "secretcronpassword" ;
mysql_query ( "UPDATE `[cron]` SET `time`=NOW() WHERE `name`='horserace'" ) ; include ( "_cron_horserace.php" ) ;
mysql_query ( "SELECT RELEASE_LOCK('horserace_update')" ) ; }
}
}
/* ------------------------- */ ?>
10 antwoorden
Gesponsorde links
freddyboeke - 30/11/1999 00:00
HTML beginner
de functie var_export() staat nergens beschreven
danny74 - 30/11/1999 00:00
Lid
euh moet die var_export dan verwijzen naar de databasernen zoja hoernsorry newby haha rnheb hem gekregen met wel 20 foutmeldingen de rest heb ik er allemaal uit behalve deze!!!rnrnalvast bedankt( ( (
Maarten - 30/11/1999 00:00
Erelid
Wel... var_export() is gewoon geen functie, en dat is het... wij weten niet wat die functie zou moeten doen, dus kunnen we hem ook niet maken.
danny74 - 30/11/1999 00:00 (laatste wijziging 30/11/1999 00:00)
Lid
ik heb al gekeken maar kan het dus niet vinden.rndus hierbij de _include-fucn..rnalvast tnxrnrn[code]rnphp ------------------------- rnrn function check_login() {rn if(isset($_SESSION['login'],$_SESSION['IP']) && $_SESSION['IP'] == $_SERVER['REMOTE_ADDR']) {rn if(! isset($_COOKIE['login'],$_COOKIE['validate'])) {rn $validate = md5(rand(0,1000));rn setcookie(login,$_SESSION['login'],time()+606024,,);rn setcookie(validate,$validate,time()+606024,,);rn }rn elsern $validate = $_COOKIE['validate'];rn mysql_query(REPLACE INTO `[online]`(`time`,`IP`,`login`,`validate`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','{$_SESSION['login']}','$validate'));rn return TRUE;rn }rn else {rn if(isset($_COOKIE['login'],$_COOKIE['validate'])) {rn $login = $_COOKIE['login'];rn $validate = $_COOKIE['validate'];rn $query = mysql_query(SELECT FROM `[online]` WHERE `login`='$login' AND `validate`='$validate' AND `IP`='{$_SERVER['REMOTE_ADDR']}' AND UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`time`) 606024);rn if($user = mysql_fetch_object($query)) {rn mysql_query(UPDATE `[online]` SET `time`=NOW() WHERE `login`='$login' AND `validate`='$validate' AND `IP`='{$_SERVER['REMOTE_ADDR']}' AND UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`time`) 606024);rn setcookie(login,$user-login,time()+606024,,);rn setcookie(validate,$validate,time()+606024,,);rnrn $_SESSION['login'] = $user-login;rn $_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];rn return TRUE;rn }rn else {rn unset($_SESSION['login']);rn unset($_SESSION['IP']);rn setcookie(login,'',time()-100,,);rn setcookie(validate,'',time()-100,,);rn return FALSE;rn }rn }rn else {rn unset($_SESSION['login']);rn unset($_SESSION['IP']);rn setcookie(login,'',time()-100,,);rn setcookie(validate,'',time()-100,,);rn return FALSE;rn }rn }rn }rnrn ------------------------- [code]
Fenrir - 30/11/1999 00:00
PHP expert
var_export is een standaard php-functie.rnhet output de var in valid php-code.rnrnmss heeft je host een oude versie van php
danny74 - 30/11/1999 00:00
Lid
mm zal een checken vanaf welke versie moet ik hebben danrn$ $
danny74 - 30/11/1999 00:00
Lid
yep versie 3.23.58rnkan ik hier nog wat aan aanpassen zodat hij wel werkt of toch maar opzoek naar een andere host
Gesponsorde links
Dit onderwerp is gesloten .