FEHLER bei Auktionshaus Installation

Hallo Community,

ich habe vor, mir ein Auktionshaus auf meine HP zu machen!

Leider bekomme ich immer nur eine Fehlermeldung: http://downloadcrew.bplaced.net/shop/!

Was muss ich machen und was mache ich Falsch?

BITTE UM HILFE !haue

THX

Falsche Daten für die Datenbank Verbindung eingegeben. Benutzername ist der name der Datenbank

Kannst du mir bitte mal sagen, wo ich das ändern muss?

Ich finde das net!

[code]<?

/*

Copyright ©, 1999, 2000 - phpauction.org

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation (version 2 or later).

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

*/

/*======================================================================

	Edit the lines below *

	Both *nix and Windows directives are present. Default is *nix.
	If you are running PHPauction under Windows comment the first line
	of each couple, uncomment the second and edit it to reflect you box
	charactaristics.
	Note: windows slash (\) must be preceeded by another \ for PHP to read
	the path correctly.

======================================================================*/


$SITE_NAME = "YOUR SITE NAME";
$SITE_URL  = "http://prracer.bplaced.net/shop"; //Requires ending slash

$COOKIE_PREFIX = "PHPAUCTION";
$LOGGED_IN_COOKIE = $COOKIE_PREFIX."_LOGGED_IN";
$LOGGED_IN_NICK = $COOKIE_PREFIX."NICK_LOGGED_IN";

//-- Activate login box
//-- 1 means login box is shown in the right column in the home page
//-- 0 means login box is not shown
$LOGIN_BOX = 1;


//-- Activate News box
//-- 1 means News box is shown in the right column in the home page
//-- 0 means News box is not shown
$NEWS_BOX = 1;
$NEWS_TO_SHOW = 5; // Number of news you want to show in the NEWS column


/*========================================================================================
	MONEY FORNATTING OPTIONS

	You can choose between:
		
		$MONEY_FORMAT = 1 => US notation: 							1,500.00
		$MONEY_FORMAT = 2 => NON US notation	(Europe style) 1.500,00	
	
	and also define the number of decimal digits you want to be shown
	
		$MONEY_DECIMALS = 2; (2 is the default)
	
	and the position of the currency symbol:
		
		$MONEY_SYMBOL_POS = "R" => the currency symbol will be displayed AFTER the amount
		$MONEY_SYMBOL_POS = "L" => the currency symbol will be displayed BEFORE the amount
=========================================================================================*/

	$MONEY_FORMAT 		= 1;
	$MONEY_DECIMALS 	= 2;
	$MONEY_SYMBOL_POS = "L";

//-- This is the directory where passwd.inc.php file resides - requires ending slash

$include_path = "./includes/"; 
#$include_path = "C:\\some\\path\\to\\includes\\"; 


//-- This is the directory where users pictures will be uploaded - requires ending slash
//-- Under Windows use something like C:\\path\\to\\you\\uploaddir\\

$image_upload_path = "/var/www/phpauction/uploaded/"; 
#$image_upload_path = "C:\\some\\path\\to\\uploaded\\"; 
$uploaded_path = "uploaded/"; 
#$uploaded_path = "uploaded\\"; 


//--
$MAX_UPLOAD_SIZE = 100000;



//-- This string is added to passwords before generating the MD5 hash
//-- Be sure to never change it after the firt set up or 
//-- your users passwords will not work

$MD5_PREFIX = "put_here_along_and_unpredictable_string";



//-- Wether or not you want to show the acceptance text contained in
//-- acceptance.inc.php in users registration page

$SHOW_ACCEPTANCE_TEXT = 1;


/*
	This is the log file generated by cron.php - insert the complete
	file name (including the absolute path).
	If you don't want to generate a log file for cron activity simply
	leave this line commented.
*/

#$logFileName = "/var/www/auctions/logs/cron.log"; 
#$logFileName = "C:\\path\\to\cron.log"; 

/*
	Set this to TRUE if you want cron to generates HTML output
	BESIDES the cron file declared above. cron.php cannot generates
	only HTML output.
*/
$cronScriptHTMLOutput = FALSE;


$expireAuction = 60*60*24*30; // time of auction expiration (in seconds)
$sessionLifeTime = 60*60*24*2; // time of a user session lifetime

//-- some constants

$err_font = “<FONT FACE=“Verdana,Arial,Helvetica” SIZE=“2” COLOR=red>”;
$std_font = “<FONT FACE=“Verdana,Arial,Helvetica” SIZE=“2”>”;
$sml_font = “<FONT FACE=“Verdana,Arial,Helvetica” SIZE=“1”>”;
$smlnav_font = “<FONT FACE=“Verdana,Arial,Helvetica” SIZE=“1” COLOR=white>”;
$tlt_font = “<FONT FACE=“Verdana,Arial,Helvetica” SIZE=“4”>”;
$tlt2_font = “<FONT FACE=“Verdana,Arial,Helvetica” SIZE=“3”>”;
$usr_font = “<FONT FACE=“Verdana,Arial,Helvetica” SIZE=“4” COLOR=”#F6AF17">";
$nav_font = “<FONT FACE=“Verdana,Arial,Helvetica” SIZE=“2” COLOR=”#FFFFFF">";

/*======================================================================

  •    																					  *																	
    
  • Don’t edit the code below unless you really know what you are doing *
  •    																					  *          															
    

======================================================================*/

//--

if(strpos($PHP_SELF,“admin/”)){
$password_file = “…/”.$include_path.“passwd.inc.php”;
}else{
$password_file = $include_path.“passwd.inc.php”;
}

//-- Site administrator’s email

if(strpos($PHP_SELF,“admin/”)){
include("…/includes/adminmail.inc.php");
}else{
include("./includes/adminmail.inc.php");
}

if(strpos($PHP_SELF,“admin/”)){
include("…/includes/currency.inc.php");
}else{
include("./includes/currency.inc.php");
}

include($password_file);

//-- Database connection

mysql_pconnect($DbHost,$DbUser,$DbPassword)
or die(“Database access error. Please contact the site administrator.”);
mysql_select_db($DbDatabase);

//-- sessions support

if(strpos($PHP_SELF,“admin/”)){
include("…/includes/sessions.inc.php");
}else{
include("./includes/sessions.inc.php");
}

?>
[/code]

Ist das auch die config.inc.php Datei? !coffee

Hallo,
ja das ist die Confic.inc.php datei!

Ich habe mal etwas geändert!

[quote]//-- Database connection

mysql_pconnect($localhost,$downloadcrew.bplaced.net,$ZENSIERT)
or die(“Database access error. Please contact the site administrator.”);
mysql_select_db($downloadcrew);

[/quote]
Stimmt das alles?
Der Fehler tritt immernoch auf

Oh hab ich übersehn.

ohne bplaced.net sollte es gehen.

Hallo,
torz der änderung ist der fehler immernoch da!

Könnten wir das vllt. per ICQ klären (das geht schneller)

390-764-170
oder MSN (adresse per PM)

[quote=“wir-retten-giga”]//-- Database connection

mysql_pconnect($localhost,$downloadcrew.bplaced.net,$ZENSIERT)[/quote]
Dir scheint nicht klar zu sein, was der Unterschied zwischen Variablen und Textliteralen (Strings) ist …

ich hab das alles richtig eingetragen
oder sag mir bitte, wie ich das eintragen muss, das es funst.

Na dann zeig mal her - und zwar exakt so, wie du’s hast. (Das Passwort kannst du dabei durch passwort o.ä. ersetzen, aber den Rest bitte 1:1.)

OH Ja Sorry, jetzt geht´s!

Blos was ist jetzt die fehlermeldung?

http://downloadcrew.bplaced.net/shop/

[quote=“wir-retten-giga”]Also die Komplette config.inc

[quote] //-- Database connection

mysql_pconnect($localhost,$downloadcrew,$ZENSIERT)
or die(“Database access error. Please contact the site administrator.”);[/quote][/quote]
Und wo hast du diese Variablen definiert?

Vermutlich nirgends … und deshalb liest du jetzt bitte meine erste Antwort noch mal.

DOPPELPOST:

OH Ja Sorry, jetzt geht´s!

Blos was ist jetzt die fehlermeldung?

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /users/downloadcrew/www/shop/index.php on line 340
Database access error. Please contact the site administrator.

Das ist das Index.php:

[quote]<?

/*

Copyright ©, 1999, 2000 - phpauction.org

This program is free software; you can redistribute it and/or modify

it under the terms of the GNU General Public License as published by

the Free Software Foundation (version 2 or later).

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU General Public License for more details.

You should have received a copy of the GNU General Public License

along with this program; if not, write to the Free Software

Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

*/

require('./includes/config.inc.php');

require('./includes/messages.inc.php');

require("./header.php"); 





/*

If subscription to information service requested

update INFO table

*/



$TPL_info_err = "";

if($user_email){

	if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$",$user_email)){

		$TPL_info_err = $ERR_028;

	}else{

		$query = "insert into info values(\"$user_email\")";

		$result = mysql_query($query);

		if(!$result){

			$TPL_info_err = $ERR_001;

		}else{

			$TPL_info_err = $MSG_512;

		}

	}

}



/*

	prepare data for templates/template

*/



/* prepare categories list for templates/template */

	$TPL_categories_value = "";

	$query = "select * from categories WHERE parent_id=0 order by sub_counter desc";

	$result = mysql_query($query);

		if(!$result)

		{

			$TPL_categories_value .= $ERR_001;

		}

		else

		{

			$num_cat = mysql_num_rows($result);

			$i = 0;

			$TPL_categories_value .= "<TABLE BORDER=0>\n";

			while($i < $num_cat && $i < 23)

			{



				$cat_id = mysql_result($result,$i,"cat_id");

				$cat_name = mysql_result($result,$i,"cat_name");

				$sub_count = intval(mysql_result($result, $i, "sub_counter"));
				
				$cat_colour = mysql_result($result, $i, "cat_colour");
				
				$cat_image = mysql_result($result, $i, "cat_image");

print $sub_count."
";

				$cat_counter = (int)mysql_result($result, $i, "counter" );

				if ($sub_count!=0)

					$cat_counter = "(".$sub_count.")";

				else

				{

					$cat_counter = "";

					/*

					if ($cat_counter!=0)

					{

						$count_string = "(".$cat_counter.")";

					}

					else

						$count_string = "";

					*/

				}

				$cat_url = "./browse.php?id=$cat_id&SESSION_ID=$sessionIDU";

				$TPL_categories_value .= "<TR>\n<TD>";
				if ( $cat_image != "")
				{
					$TPL_categories_value .= "<IMG SRC=\"$cat_image\">";
				}
				$TPL_categories_value .= "</TD>\n";

				if ( $cat_colour != "")
				{
					$TPL_categories_value .= "<TD BGCOLOR=\"$cat_colour\">";
				}
				else
				{
					$TPL_categories_value .= "<TD>";
				}
				

				$TPL_categories_value .= "$std_font";

				//$cat_name = ereg_replace ( " ", "&nbsp;", $cat_name );

				$TPL_categories_value .= " <A HREF=\"$cat_url\">$cat_name</A>"." $cat_counter"."</FONT></TD></TR>\n";

				$i++;

			}

			$TPL_categories_value .= "</TABLE>\n";

			$TPL_categories_value .= "<A HREF=\"browse.php?id=0&SESSION_ID=$sessionIDU\">$std_font$MSG_277 </FONT></A>";

		}



/* get last created auctions */

		$query = "select id,title,starts from auctions where closed='0' order by starts desc";

		$result = mysql_query($query);

		if ( $result )

			$num_auction = mysql_num_rows($result);

		else

			$num_auction = 0;



		$i = 0;

		$bgcolor = "#FFFFFF";

		$TPL_last_auctions_value = "";

		while($i < $num_auction && $i < 6){

			if($bgcolor == "#FFFFFF")

			{

				$bgcolor = "#EEEEEE";

			}

			else

			{

				$bgcolor = "#FFFFFF";

			}			

			$title = mysql_result($result,$i,"title");

			$id 	 = mysql_result($result,$i,"id");

			$date	 = mysql_result($result,$i,"starts");



			$year = substr($date,0,4);

			$month = substr($date,4,2);

			$day = substr($date,6,2);

			$hours = substr($date,8,2);

			$minutes = substr($date,10,2);

			$seconds = substr($date,12,2);



			

			$TPL_last_auctions_value .= 

				"<TR BGCOLOR=\"$bgcolor\">".

				"<TD WIDTH=\"150\"  VALIGN=top ALIGN=LEFT>".

				"$std_font".

				ArrangeDate($day,$month,$year,$hours,$minutes).

				"</FONT></TD>".

				"<TD WIDTH=\"245\" VALIGN=top ALIGN=LEFT>".

				"$std_font".

				"<A HREF=\"./item.php?id=$id&SESSION_ID=$sessionIDU\">".stripslashes($title)."</A>".

				"</FONT></TD>".

				"</TR>";



			$i++;

		}

		

		if($num_auction > 6)

		{

			$TPL_last_auctions_value .= "<TR ALIGN=RIGHT>".

										"<TD></TD><TD>".

										"<A HREF=\"./view_more_news.php?SESSION_ID=$sessionIDU\">$sml_font$MSG_233</FONT></A>...".

										"</TD>".

										"</TR>";			

		}

		

/* get ending soon auctions */

		$TPL_ending_soon_value = "";

		$now = date("YmdHis",time());

		

		$query = "select ends,id,title from auctions where closed=\"0\" and
					suspended=\"0\" order by ends";
		$result = mysql_query($query);

		

		$num_auction = mysql_num_rows($result);

		

		$i = 0;

		$bgcolor = "#FFFFFF";

		while($i < $num_auction && $i < 6){

			if($bgcolor == "#FFFFFF")

			{

				$bgcolor = "#EEEEEE";

			}

			else

			{

				$bgcolor = "#FFFFFF";

			}					

			$title 	= mysql_result($result,$i,"title");

			$id 	= mysql_result($result,$i,"id");

			$ends 	= mysql_result($result,$i,"ends");



			$year 			= intval(date("Y"));

			$month 			= intval(date("m"));

			$day 				= intval(date("d"));

			$hours 			= intval(date("H"));

			$minutes 		= intval(date("i"));

			$seconds 		= intval(date("s"));

			$ends_year 		= substr($ends,0,4);

			$ends_month 	= substr($ends,4,2);

			$ends_day 		= substr($ends,6,2);

			$ends_hours		= substr($ends,8,2);

			$ends_minutes 	= substr($ends,10,2);

			$ends_seconds 	= substr($ends,12,2);



			$difference = intval(mktime($ends_hours,$ends_minutes,$ends_seconds,$ends_month,$ends_day,$ends_year)) - intval(mktime($hours,$minutes,$seconds,$month,$day,$year));

            if ($difference > 0) {

				$ends_string = intval($difference / 86400).$MSG_126;

				$difference = $difference - (intval($difference / 86400) 
											 * 86400);


				$hours_difference = intval($difference / 3600);

				if(strlen($hours_difference) == 1){

					$hours_difference = "0".$hours_difference;

    			}

				$ends_string .= $hours_difference.":";



				$difference = $difference - ($hours_difference * 3600);

				$minutes_difference = intval($difference / 60);

				if(strlen($minutes_difference) == 1){

					$minutes_difference = "0".$minutes_difference;

				}

				$ends_string .= $minutes_difference.":";



				$difference = $difference - ($minutes_difference * 60);

    			$seconds_difference = $difference;

				if(strlen($seconds_difference) == 1){

					$seconds_difference = "0".$seconds_difference;

				}

			

				$ends_string .= $seconds_difference;

            } else {
            
                $ends_string = "$err_font$MSG_911</FONT>";
            }

			$TPL_ending_soon_value .=

			"<TR BGCOLOR=\"$bgcolor\">".

				"<TD WIDTH=\"140\"  VALIGN=top ALIGN=LEFT>".

					"$std_font".$ends_string."</FONT>".

				"</TD>".



				"<TD WIDTH=\"250\" VALIGN=top ALIGN=LEFT>".

					"$std_font<A HREF=\"./item.php?id=$id&SESSION_ID=$sessionIDU\">".stripslashes($title)."</A></FONT>".

				"</TD>".

			"</TR>";

			

			$i++;

		}

		

		if($num_auction > 6)

		{

			$TPL_ending_soon_value .= "<TR ALIGN=RIGHT>".

										"<TD></TD><TD>".

										"<A HREF=\"./view_more_ending.php?SESSION_ID=$sessionIDU\">$sml_font$MSG_233</FONT></A>...".

										"</TD>".

										"</TR>";				

		}



/* get higher bids */



		$TPL_maximum_bids = "";

		$query = "select auction,max(bid) as max_bid from bids group by auction order by max_bid desc";

		$result = mysql_query($query);



		if ($result)

			$num_auction = mysql_num_rows($result);

		else

			$num_auction = 0;



		$i = 0;
		$j = 0;

		$bgcolor = "#FFFFFF";

		while($i < $num_auction && $j < 6)
		{

			$max_bid  	 = mysql_result($result,$i,"max_bid");

			$auction  = mysql_result($result,$i,"auction");



			//-- Get auction data

			

			$query = "select title,closed,id from auctions where id=\"$auction\"";

			$result_bid = mysql_query($query);

			if(mysql_num_rows($result_bid) > 0)
			{
				$title = mysql_result($result_bid,0,"title");

				$closed = mysql_result($result_bid,0,"closed");

				$auc_id = mysql_result($result_bid,0,"id");
			}

			

			if($closed == "0"){

				$TPL_maximum_bids .=

				"<TR BGCOLOR=\"$bgcolor\">".

				"<TD WIDTH=\"140\" VALIGN=top ALIGN=LEFT>".

				"$std_font".

				print_money($max_bid).
				
				"</FONT></TD>".

				"<TD ALIGN=LEFT WIDTH=\"240\">".

				"$std_font".

				"<A HREF=\"./item.php?id=".$auc_id."&SESSION_ID=$sessionIDU\">".stripslashes($title)."</A>".

				"</FONT></TD>".

				"</TR>";
				$j++;
				if($bgcolor == "#FFFFFF")
				
				{
				
					$bgcolor = "#EEEEEE";

				}
			
				else
				
				{
				
					$bgcolor = "#FFFFFF";
				
				}					


			}

			$i++;

			

		}



		if($num_auction > 6)

		{

			$TPL_maximum_bids .= "<TR ALIGN=RIGHT>".

									"<TD></TD><TD>".

									"<A HREF=\"./view_more_higher.php\">$sml_font$MSG_233</FONT></A>...".

									"</TD>".

									"</TR>";					

		}

	
// Build list of help topics
    $query = "select topic from help order by topic;";
$result = mysql_query($query);
if (!$result){
	print "$err_font $ERR_001 </font> <br>";
	require("./footer.php");
	exit;
}
    if (mysql_num_rows($result)) {
	$TPL_helptopics = "<a href=\"help.php\">" . $MSG_919 .  "</a><br>";
            $num_topics = mysql_num_rows($result);
            $i = 0;
            while(($i < $num_topics) && ($i < 5)){
                    $this_topic = mysql_result($result, $i, "topic");
		if ($this_topic != "General") {
			$TPL_helptopics .= "<a href=\"help.php?topic=";
    	                $TPL_helptopics .= $this_topic;
            	        $TPL_helptopics .= "\">";
                    	$TPL_helptopics .= $this_topic;
                    	$TPL_helptopics .= "<br>";
		}
		$i++;
	}
} else { 	
	$TPL_helptopics = "";
}


//-- Build news list
if($NEWS_BOX)
{
	$query = "SELECT title,id from news where suspended=0 order by new_date limit $NEWS_TO_SHOW";
	$res = mysql_query($query);
	if(!$res)
	{
		$TPL_news_list = $ERR_001;
		exit;
	}
	
	while($new = mysql_fetch_array($res))
	{
		$TPL_news_list .= "<strong><big>·</big></strong> 
								 $sml_font<A HREF=\"viewnew.php?id=$new[id]\">$new[title]</A><BR>";
	}
}


require("./templates/template_index_php.html");

require('./footer.php');

?>
[/quote]

Hallo Leute,
ich habe mir PHP Auction heruntergeladen und erfolgreich Installiert!

Jetzt kommt aber folgende Fehlermeldung auf meiner HP (http://downloadcrew.bplaced.net/shop/) :

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /users/downloadcrew/www/shop/index.php on line 340 Database access error. Please contact the site administrator.

Wie ich das hier raus lese, hat es was mit Index.php zu tun oder?
Wenn ihr wollt, schreibe ich euch auch Index.php oder Config.ini hier rein!

Was ist falsch?

BITE HELFT MIR

Das hast du doch da oben schon beschrieben? Hast du dir mal durchgelesen was ich dir geschrieben habe? Bezüglich Geduld? bitte warte einfach ab, wenn dir jemand helfen kann wird er sich schon hier melden.

Das bedeutet, dass die vorhergehende Abfrage false zurückgeliefert hat, weil sie fehlerhaft war.

Warum, das muss man nun untersuchen. Grundlegende Debugging-Kenntnisse sollten schon vorhanden sein - sonst sieht’s schlecht aus.

peterkropff.de/tutorials/php … tte_db.htm beschreibt das grundlegende Vorgehen.

Kann Kerbinations Aussage nur unterstreichen - bitte übe dich jetzt endlich in ein wenig Geduld, sonst hat bald gar keiner mehr Lust, sich mit deinem Problem zu beschäftigen.

jo sorry :*-(
es gibt bestimmt einen der mir das richtig sagen kann wie das geht :slight_smile:

Also warte ich !

WARTE
WARTE
FERTIG :slight_smile: