config bestand met fout meldingen
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
## Config file ##
ob_start( );
session_start( );
set_time_limit(0);
## give5 site instellingen ##
$Site[ 'style' ] = 'styles/style_hu.css';
## Base url ##
$Site[ 'base_url' ] = 'http://www.give5.nl';
## Site titel ##
$Site[ 'titel' ] = 'give5 contact site';
## Thema map in de map images ##/
$Site[ 'theme_map'] = 'superhunks';
$config = array( );
$config['db']['user'] = 'root'; //Gebruikersnaam van datebase
$config['db']['pass'] = '*******'; //Wachtwoord van datebase
$config['db']['host'] = 'localhost'; //Plaats waar datebase staat 99% altijd localhost
$config['db']['base'] = 'give5'; //Datebasenaam
## Database connection ##
$db['connect'] = mysql_connect( $config['db']['host'], $config['db']['user'], $config['db']['pass'] );
if( mysql_select_db( $config['db']['base'], $db['connect'] ) == false ) {
print $lang['db']['error'];
exit( );
}
define( 'pad', '', true ); //Website path
define( 'url', $Site[ '' ], true ); //Website adres
require pad . 'include/functions.php';
$_SESSION['ip'] = client_ip( );
require pad . 'include/ubb.php';
require pad . 'include/array.php';
require pad . 'include/online.class.php';
function cookiehash($lengte)
{
$tekens = "abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ123456789";
srand((double)microtime()*1000000);
$cookie="";
for ( $i=0; $i<$lengte; $i++ )
{
$cookie = $cookie . substr ( $tekens , rand() % strlen( $tekens ) , 1 ) ;
}
return $cookie;
}
if( isset( $_COOKIE['hash'] ) == false ) {
setcookie( 'hash', '', time( ) + ( 60 * 60 * 24 * 365 ) );
}
$Result = mysql_num_rows( mysql_query( "SELECT * FROM cookielogin WHERE Hash = '" . $_COOKIE['hash'] . "' " ) );
if( ingelogd( ) && $Result == false ) {
$Query = mysql_query( "SELECT * FROM leden WHERE Id = '" . $_SESSION['id'] . "' " );
$user = mysql_fetch_assoc( $Query );
$Hash1 = cookiehash( rand( 10,20 ) );
$Hash2 = cookiehash( rand( 5, 10 ) );
mysql_query( "INSERT INTO cookielogin ( Hash, Name ) VALUES ( '" . $Hash1 . "', '" . $Hash2 . "' ) " )or die( mysql_error( ) );
setcookie( 'hash', $Hash1, time( ) + ( 60 * 60 * 24 * 365 ) );
setcookie( $Hash2, $_SESSION['gebruikersnaam'] . '({shsbshsbshsbshsbshsb})' . $_SESSION['id'], time( ) + ( 60 * 60 * 24 * 365 ) );
}
if( ingelogd( ) == false ) {
$Query = mysql_query( "SELECT * FROM cookielogin WHERE Hash = '" . $_COOKIE['hash'] . "' " );
if( mysql_num_rows( $Query ) ) {
$List = mysql_fetch_assoc( $Query );
$TMP = explode( '({shsbshsbshsbshsbshsb})', $_COOKIE[ $List['Name'] ] );
$_SESSION['id'] = $TMP[1];
$_SESSION['gebruikersnaam'] = $TMP[0];
//header( 'Location: ' . $_SERVER['REQUEST_URI'] );
}
}
if( ingelogd( ) ) {
$user = mysql_fetch_assoc( $Query = mysql_query( "SELECT * FROM leden WHERE Id = '" . $_SESSION['id'] . "' " ) );
}
else{
$user = array();
}
?>
## Config file ##
ob_start( );
session_start( );
set_time_limit(0);
## give5 site instellingen ##
$Site[ 'style' ] = 'styles/style_hu.css';
## Base url ##
$Site[ 'base_url' ] = 'http://www.give5.nl';
## Site titel ##
$Site[ 'titel' ] = 'give5 contact site';
## Thema map in de map images ##/
$Site[ 'theme_map'] = 'superhunks';
$config = array( );
$config['db']['user'] = 'root'; //Gebruikersnaam van datebase
$config['db']['pass'] = '*******'; //Wachtwoord van datebase
$config['db']['host'] = 'localhost'; //Plaats waar datebase staat 99% altijd localhost
$config['db']['base'] = 'give5'; //Datebasenaam
## Database connection ##
$db['connect'] = mysql_connect( $config['db']['host'], $config['db']['user'], $config['db']['pass'] );
if( mysql_select_db( $config['db']['base'], $db['connect'] ) == false ) {
print $lang['db']['error'];
exit( );
}
define( 'pad', '', true ); //Website path
define( 'url', $Site[ '' ], true ); //Website adres
require pad . 'include/functions.php';
$_SESSION['ip'] = client_ip( );
require pad . 'include/ubb.php';
require pad . 'include/array.php';
require pad . 'include/online.class.php';
function cookiehash($lengte)
{
$tekens = "abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ123456789";
srand((double)microtime()*1000000);
$cookie="";
for ( $i=0; $i<$lengte; $i++ )
{
$cookie = $cookie . substr ( $tekens , rand() % strlen( $tekens ) , 1 ) ;
}
return $cookie;
}
if( isset( $_COOKIE['hash'] ) == false ) {
setcookie( 'hash', '', time( ) + ( 60 * 60 * 24 * 365 ) );
}
$Result = mysql_num_rows( mysql_query( "SELECT * FROM cookielogin WHERE Hash = '" . $_COOKIE['hash'] . "' " ) );
if( ingelogd( ) && $Result == false ) {
$Query = mysql_query( "SELECT * FROM leden WHERE Id = '" . $_SESSION['id'] . "' " );
$user = mysql_fetch_assoc( $Query );
$Hash1 = cookiehash( rand( 10,20 ) );
$Hash2 = cookiehash( rand( 5, 10 ) );
mysql_query( "INSERT INTO cookielogin ( Hash, Name ) VALUES ( '" . $Hash1 . "', '" . $Hash2 . "' ) " )or die( mysql_error( ) );
setcookie( 'hash', $Hash1, time( ) + ( 60 * 60 * 24 * 365 ) );
setcookie( $Hash2, $_SESSION['gebruikersnaam'] . '({shsbshsbshsbshsbshsb})' . $_SESSION['id'], time( ) + ( 60 * 60 * 24 * 365 ) );
}
if( ingelogd( ) == false ) {
$Query = mysql_query( "SELECT * FROM cookielogin WHERE Hash = '" . $_COOKIE['hash'] . "' " );
if( mysql_num_rows( $Query ) ) {
$List = mysql_fetch_assoc( $Query );
$TMP = explode( '({shsbshsbshsbshsbshsb})', $_COOKIE[ $List['Name'] ] );
$_SESSION['id'] = $TMP[1];
$_SESSION['gebruikersnaam'] = $TMP[0];
//header( 'Location: ' . $_SERVER['REQUEST_URI'] );
}
}
if( ingelogd( ) ) {
$user = mysql_fetch_assoc( $Query = mysql_query( "SELECT * FROM leden WHERE Id = '" . $_SESSION['id'] . "' " ) );
}
else{
$user = array();
}
?>
en dezen meldingen zijn te zien op somigen webpaginaas
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\include\online.class.php on line 28
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\header.php on line 105
Warning: require(include/functions.php) [function.require]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\include\config.php on line 48
Fatal error: require() [function.require]: Failed opening required 'include/functions.php' (include_path='.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\include\config.php on line
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'hoes_profiel'@'localhost' (using password: YES) in C:\Program Files\xampp\htdocs\msn.php on line 7
Access denied for user 'hoes_profiel'@'localhost' (using password: YES)
wie kan mij hier mee helpen ik kom er niet meer uit waar het probleem zit
Gewijzigd op 01/01/1970 01:00:00 door Melvin
Quote:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'hoes_profiel'@'localhost' (using password: YES) in C:\Program Files\xampp\htdocs\msn.php on line 7
Access denied for user 'hoes_profiel'@'localhost' (using password: YES)
Access denied for user 'hoes_profiel'@'localhost' (using password: YES)
Dan wordt er in iedergeval geen verbinding gemaakt met de mysql database server. Hierdoor zullen alle andere afhankelijk mysql query's niet werken gezien er geen verbinding is, en daardoor bepaalde mysql functie's in php een fout geven, zoals mysql_result en mysql_fetch_object().
Quote:
Fatal error: require() [function.require]: Failed opening required 'include/functions.php' (include_path='.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\include\config.php on line
Hier wordt getracht een bestand te includen die niet gevonden kan worden.
Nou is het niet gelijk zo dat dit bestand ergens hier hoort te staan: nclude_path='.;C:\Program Files\xampp\php\pear\
Zo te zien zal het map / bestand : include/functions.php niet gevonden worden en daardoor deze melding.
Goed ik ben verder niet bekend met kant en klare server pakketen voor wie snel klaar wil zijn, laat staan in windows omgevingen. Je zult moeten kijken waar je script draait en/of de bestanden te vinden zijn.
Gewijzigd op 01/01/1970 01:00:00 door Danny Roelofs