Seite 1 von 1

Amazon_Box_v100_emc Problemchen...

Verfasst: 04.08.2007 15:13
von TLoD
Hallo Ihr,

habe da son kleines Problemchen.

Wenn ich die Datei db_update_amazonbox.php ausführen will, bekomme ich immer folgende Fehlermeldung.

Warning:mysql_connect() [function.mysql-connect]:Access denied for user '20540-0.usr'@'192.168.43.55' (using password: NO) in /mnt/webspace/05/20540/reptilienwelt-info.de/phpBB2/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /mnt/webspace/05/20540/reptilienwelt-info.de/phpBB2/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /mnt/webspace/05/20540/reptilienwelt-info.de/phpBB2/db/mysql4.php on line 331
phpBB : Kritischer Fehler

Could not connect to the database

Ich habe die Datei direkt in den ROOT Ordner vom Forum kopiert.

Ausserdem habe ich noch das Problem, dass ich die Datei includes/page_tail.php editieren soll.

#
#-----[ FIND ]------------------------------------------
#

'PHPBB_VERSION' => '2' . $board_config['version'],

#
#-----[ AFTER, ADD ]------------------------------------------
#

'AmazonBox' => $lang['AmazonBox'],
'amazonbox_limit' => $board_config['amazonbox_limit'],

#

Das Problem ist aber, dass ich den Punkt 'PHPBB_VERSION' => '2' . $board_config['version'], in der Datei nciht finden kann.

Liegt das daran, dass ich die Datei db_update_amazonbox.php schon nicht ausführen kann? Habe versucht den Punkt an anderen Stellen einzufügen aber dann bekomme ich immer Fehlermeldungen auf der Seite.

Ich danke schon mal für Eure Antworten.

Ich nutze übrigens das Forum phpBB 2.0.22 german.

Verfasst: 04.08.2007 22:22
von Dr.Death
Schau erst einmal hier hinein ( 2. Teil des Artikels ist für dich von Belang )
KB:131

Verfasst: 04.08.2007 22:33
von TLoD
Vielen liben Dank! Es hat funktioniert. Hätte das nie gefunden - hatte in der Boardsuche immer nur nach Amazon Box gesucht...

Nun habe ich nurnoch das Problem mit der Datei page_tail.php .
Ich finde trotz des Updates, keinen entsprechenden Eintrag.

Gibt es die Möglichkeit es wo anders einzufügen bzw. kann ich an einer entsprechenden Stelle das fehlende nachragen?

Bin leider noch n recht grosser Noob in sachen PHP.

Verfasst: 04.08.2007 23:01
von TLoD
Hier mal noch ein Auszug aus der Datei page-tail.php

Die Fehlermeldung lautet:

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /mnt/webspace/05/20540/reptilienwelt-info.de/phpBB2/includes/page_tail.php on line 44


if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
}

global $do_gzip_compress;

//
// Show the overall footer.
//

$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';

$template->set_filenames(array(
'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);

$template->assign_vars(array(
'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''),
'ADMIN_LINK' => $admin_link)
);
'PHPBB_VERSION' => '2' . $board_config['version'],
#

'AmazonBox' => $lang['AmazonBox'],
'amazonbox_limit' => $board_config['amazonbox_limit'],

#
$template->pparse('overall_footer');
#

// AMAZON BOX START
$amazonbox_limit = $board_config['amazonbox_limit'];
$sql = "SELECT word, replacement FROM " . AMAZONBOX_TABLE . " ORDER BY RAND() LIMIT " . $amazonbox_limit;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain amazonbox information', '', __LINE__, __FILE__, $sql);
}
while ($row = $db->sql_fetchrow($result))
{
$word = $row['word'];
$replacement = $row['replacement'];
$template->assign_block_vars("amazonbox", array(
'word' => $word,
'AmazonImg' => $replacement,
"AmazonLink" => "http://www.amazon.de/exec/obidos/ASIN/" . $replacement . "/" . $board_config['amazonbox_partnerid']
));
}
// AMAZON BOX END

#
//
// Close our DB connection.
//
$db->sql_close();

//
// Compress buffered output if required and send to browser
//
if ( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();

$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);

$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
}

exit;

?>