kleines Problem und ich weiss keinen Rat mehr. Alles Probiert aber nix funzt...
Und zwar habe ich oben genannten Mod eingebaut aber wenn ich die Datenbank Updaten will dann bekomm ich immer das er nicht zur Datenbank connecten kann. Manches mal bekomm ich aber auch nur einfach eine weisse leere Seite.
Den Link "Could not connect to Database" braucht ihr nicht postet den hab ich zehnmal gelesen und auch alles probiert. Nix geht.
Habe einen ganz normalen Hoster.
Habe den Mod auch in meinem Testforum bei funpic getestet. Dort hatte ich zuerst das gleiche Problem aber dann hat er es irgendwann wie von Geisterhand gefressen.
Nur bei meinen normalen Forum will er nicht.
Hier der Code der Update Datei.
Code: Alles auswählen
<?php
define('IN_PHPBB', 1);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
//
//
// Restrict to members:
if( !$userdata['session_logged_in'] )
{
header("Location: " . append_sid("login.$phpEx?redirect=db_install_usercars_mod.$phpEx", true));
exit;
}
//
//
if ( $userdata['user_level'] == ADMIN )
{
}
else
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised'], $lang['Not_Authorised']);
exit;
}
echo '<html>
<head>
<title>SQL-DB-Installer - UserCars Mod</title>
</head>
<body>
<h1>SQL-DB-Installer - UserCars Mod</h1>
<hr />';
if (!isset($HTTP_GET_VARS['install'])) {
echo '<a href="?install=1">Please click here | Bitte hier klicken</a>';
}
else {
$queries = array(
"CREATE TABLE " . $table_prefix . "usercars ( usercars_id int(11) NOT NULL auto_increment, user_id int(11) NOT NULL default '0', usercars_pic varchar(255) NOT NULL default '', usercars_carname text, usercars_mods text, usercars_cylinders text, usercars_desc text, usercars_exhaust text, usercars_power text, usercars_topspeed text, PRIMARY KEY (usercars_id)) TYPE=MyISAM",
"INSERT INTO " . $table_prefix . "config VALUES ('usercars_max_uploads', '3')"
);
$success = true;
foreach($queries as $query) {
if (!$db->sql_query($query)) {
echo '<font color="red">An error occurred ! Changes have not been entered successfully !<br /><br />Es Fehler ist aufgetreten ! Änderung nicht erfolgreich eingetragen !</font><br /><br />';
echo mysql_error();
$success = false;
break;
}
}
if ($success) {
echo '<font color="green">DB-Changes have been entered successfully. You should delete this SQL-DB-Installer as soon as possible !<br /><br />DB-Änderung wurde erfolgreich ausgeführt. Du solltest diesen SQL-DB-Installer sobald wie möglich löschen !';
}
}
?>
Thx