php.de

Zurück   php.de > Webentwicklung > PHP Einsteiger > PHP Tipps 2005

 
 
LinkBack Themen-Optionen Thema bewerten
Alt 24.05.2005, 16:25  
Gast
 
Beiträge: n/a
Standard Problem Call to a member function on a non-object

Hoi,
ich probier gerade an nem Forenserver n bissel rum. Nu hab ich das Problem das wenn ich ein forum anlege und das dann aufrufe immer:
Fatal error: Call to a member function on a non-object in /srv/www/htdocs/web89/html/fmbb/includes/sessions.php on line 249

als Fehler erhalte



in Zeile 249 steht:
Code:
		if ( !($result = $db->sql_query($sql)) )
Hier Zeile 245 - 252
Code:
	$sql = "SELECT u.*, s.*
			FROM " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u
			WHERE s.session_id = '$session_id'
				AND u.user_id = s.session_user_id";
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
		}
Was heist dieser Fehler wie kann ich den beheben ?

thx 4 help
 
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 24.05.2005, 17:30  
Gast
 
Beiträge: n/a
Standard

http://phpfriend.de/ftopic38672.html

Ich hab' da ein ähnliches Problem
 
Alt 24.05.2005, 17:30  
Gast
 
Beiträge: n/a
Standard

Wird das Objekt $db denn irgendwo erzeugt? Also irgendwas mit $db = new ....

Gruß
phpfan
 
Alt 24.05.2005, 18:25  
Gast
 
Beiträge: n/a
Standard

Zitat:
Zitat von phpfan
Wird das Objekt $db denn irgendwo erzeugt? Also irgendwas mit $db = new ....

Gruß
phpfan
Hoi,
jap in der multiforums.config.inc.php
Code:
$db = mysql_connect($multiforums_mysql[server], $multiforums_mysql[db_user], $multiforums_mysql[db_pass]) or die("Unable to connect to database on '".$multiforums_mysql[server]."' with user '".$multiforums_mysql[db_user]."'
"."Please check your settings in multiforums.config.inc.php!");
mysql_select_db($multiforums_mysql[database],$db) or die("Please first create your database '".$multiforums_mysql[database]."'!"); ;
diese wird am Anfang der Datei durch include $phpbb_root_path . "config/multiforums.config.inc.php";
included


i der db.php steht dann noch
Code:
// Make the database connection.
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
if(!$db->db_connect_id)
 
Alt 24.05.2005, 19:00  
Gast
 
Beiträge: n/a
Standard

Da steckt Intelligenz drin.

$db = mysql_connect
$db = new sql_db

Zwei identische Variablen für unterschiedliche Dinge.
 
Alt 24.05.2005, 19:14  
Gast
 
Beiträge: n/a
Standard

Zitat:
Zitat von phpfan
Da steckt Intelligenz drin.

$db = mysql_connect
$db = new sql_db

Zwei identische Variablen für unterschiedliche Dinge.
das heist nun ?

weil beim anderen Forenserver der läuft ists genau so.
 
 


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Problem mit function PHP Tipps 2007 4 06.11.2005 22:19
problem mit function PHP Tipps 2005-2 6 19.10.2005 22:50
Code Syntax Highlighting imported_Lumio PHP-Fortgeschrittene 9 16.08.2005 11:06
Call to undefined function dbase_open() PHP Tipps 2005-2 2 10.08.2005 15:14
problem mit session / object PHP-Fortgeschrittene 7 04.08.2005 02:33
Fatal error: Call to undefined function mail() PHP Tipps 2005-2 16 04.07.2005 13:24
Problem bei erstellung einer tabelle mit function und array PHP Tipps 2005 5 21.04.2005 20:54
[Erledigt] function problem PHP Tipps 2005 22 17.04.2005 21:32
Fatal error: Call to a member function on a non-object PHP Tipps 2005 7 13.04.2005 07:24
update auf php 5.0.4 robo47 Server, Hosting und Workstations 6 10.04.2005 19:00
Function Problem PHP Tipps 2005 17 29.01.2005 15:49
[Erledigt] function targetLink(URL) problem mit internet explorer HTML, Usability und Barrierefreiheit 4 11.01.2005 19:24
Problem mit "internen Variablen" ***GELÖST*** PHP Tipps 2004-2 6 07.12.2004 14:16
Call to a member function on a non-object --> WARUM ? PHP Tipps 2004-2 4 25.11.2004 20:16
Problem mit function PHP Tipps 2004 2 10.09.2004 21:41

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
call to a member function fetch() on a non-object, call to a member function fetch() on a non-object in, call to a member function fetch_object() on a non-object, call to a member function fetch_object() on a non-object in, call to a member function fetchrow() on a non-object, call to a member function fetch_assoc() on a non-object, fatal error: call to a member function fetch() on a non-object in, call to a member function fetch() on a non-object smarty, php mysql fatal error: call to a member function sql_query() on a non-object in, call to a member function fetch_assoc() on a non-object in, call to a member function fetch_array() on a non-object in, call to a member function fetch_row() on a non-object in, \call to a member function fetch() on a non-object in\, call to a member function fetchrow() on a non-object in, call to a member function fetch_object() on a non-object try catch, message: call to a member function fetchchildren() on a non-object, call to a member function fetch_array() on a non-object, call to a member function fetch array() on a non-object, call to a member function fetch() on a non-object pdo prepare, call to a member function fetchrow() on a non-object i

Alle Zeitangaben in WEZ +2. Es ist jetzt 10:40 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.