Re: Post von extern erstellen
Verfasst: 02.09.2009 09:07
Sehr gute Hinweise, Danke! 

phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Frank1604 hat geschrieben:So langsam glaub ich , ich kann dir gleich das ganze script schreiben, nen bisi mal selbst suchen wäre auch net schlecht
Code: Alles auswählen
include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'includes/functions_posting.' . $phpEx); include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
Code: Alles auswählen
Fatal error: Call to a member function sql_query() on a non-object in /home/www/web421/html/Delirium/forum1/includes/cache.php on line 51
Code: Alles auswählen
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
// start session management
$user->session_begin();
$auth->acl($user->data);
Frank1604 hat geschrieben:Keine Ahnung was du da vorher / nachher im Code veranstaltest. folgendes ist getestet und korrekt:
Code: Alles auswählen
define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'includes/functions_posting.' . $phpEx); include($phpbb_root_path . 'includes/message_parser.' . $phpEx); // start session management $user->session_begin(); $auth->acl($user->data);
Code: Alles auswählen
//Variabeln vorbereiten
$phpbb_vars = $this->getPhpbb2Vars();
define('IN_PHPBB', true);
$phpEx = 'php';
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : JPATH_SITE . DS . $phpbb_vars['recruit_phpbb_relpath'] . DS;
//Phpbb3 Framework einbinden
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
Code: Alles auswählen
// Instantiate some basic classes
$user = new user();
$auth = new auth();
$template = new template();
$cache = new cache();
$db = new $sql_db();
// Connect to DB
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, defined('PHPBB_DB_NEW_LINK') ? PHPBB_DB_NEW_LINK : false);
var_dump($db);
// We do not need this any longer, unset for safety purposes
unset($dbpasswd);
// Grab global variables, re-cache if necessary
$config = $cache->obtain_config();
Code: Alles auswählen
//Variabeln vorbereiten
$phpbb_vars = $this->getPhpbb2Vars();
Frank1604 hat geschrieben:wassn das? Auf was soll sich denn "$this" beziehen? Die Zeile verursacht deinen Fehler!Code: Alles auswählen
//Variabeln vorbereiten $phpbb_vars = $this->getPhpbb2Vars();
Frank1604 hat geschrieben:Ja moment.. wo steht denn das script nun wieder drin? Das Ding soll doch nen Stand-Alone sein! Nicht irgendwo includen oder ähnliches, da kollidieren nur die Klassen miteinander!