PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Problem beim ersten Start von Seite (PHP)



lunzet
22.12.03, 02:32
Halloa,

ich habe auf meinem Suse 8.1 einen Apache 1.3.26 mit PHP 4.2.2 laufen.

Folgendes problem:

Beim ersten start des browsers und angeben der url:

http://turbolooser.dyndns.org/contenido42/front_single/

bekomme ich folgendes angezeigt:

http:///?sid=1b0871598222ba4546f6c9c1b1f769c2

wenn ich dann den browser nicht schliesse sondern einfach nochmal die url

http://turbolooser.dyndns.org/contenido42/front_single/

eingebe dann komme ich auch auf die seite....egal mit welchem browser..immer dasselbe problem.

Hat hier irgendjemand eine schlaue Idee? Ich habe den verdacht dass es irgendwo im PHP liegt...nur wo.

Gruss,

Thomas

Stanislaus
22.12.03, 08:44
Tritt das Problem nur auf o.g. System auf oder auf anderen auch?

Und poste mal bitte den Quellcode der startseite.

Bis neulich ...

lunzet
22.12.03, 09:08
vor der neuinstallation nach dem plattencrash funktionierte alles einwandfrei.

seite basiert auf contenido (cms) das auf php und mysql basiert.

quellcode:

index.html
<html>
<head>
<title>Jessie und Thomas</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="expires" content="0">
<meta http-equiv="description" name="description" content="Dies ist eine Website powered by Contenido.">
<meta http-equiv="keywords" name="keywords" content="Contenido, CMS">
<meta http-equiv="author" name="author" content="Thomas Lunze">
<meta http-equiv="robots" name="robots" content="nofollow,index">
<link rel="StyleSheet" href="css/styles.css" type="text/css">
</head>
<script language="javascript">
<!--
if (parent.frames.length > 0) {top.location.href = window.location.href}
//-->
</script>
<frameset cols="1,*" frameborder=0 border=0>
<frame name="contenido_left" src="left_frame.php" noresize scrolling="no" marginheight="1" marginwidth="1">
<frame name="contenido_main" src="index.php" noresize marginheight="1" marginwidth="1">
</frameset>
<noframes>
<body>
www.contenido.de
</body>
</noframes>
</html>


index.php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="expires" content="0">
<meta http-equiv="Refresh" content="0; URL=front_content.php">
<meta http-equiv="robots" name="robots" content="nofollow,noindex">
<link rel="StyleSheet" href="css/styles.css" type="text/css">
</head>
<style>
<!--
a:hover {color:#749EAA}
//-->
</style>
<body>
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle" id="fontload">S e i t e&nbsp;&nbsp;w i r d&nbsp;&nbsp;g e l a d e n .<br>
<font face="Verdana,Arial,Helvetica" size="-2"><a href="http://www.contenido.de"><b>www.contenido.de</b></a></font></td>
</tr>
</table>
</body>
</html>

der code wurde nicht verändert und hat immer funktioniert. tuts ja auch nach dem refresh...somit denke ich eher das es am apache + php liegt.

thx,

thomas

Stanislaus
22.12.03, 09:29
hmm.. also am php wirds wohl nicht liegen, da Du ja überhaupt kein PHP auf der Seite hast. :)
Er sollte "front_content.php" laden nimmt stattdessen aber die SESSION ID?!?
Jetzt mal ne ganz blöde Frage. Wo wird denn da überhaupt eine Session gestartet?

Du hast aber jetzt nicht die bereits interpretierte Ausgabe der index.php gepostet, oder?

ObiJan
22.12.03, 09:32
Hi,

also bei mir (lokal) kommt auch nur, daß die /front_content.php nicht gefunden werden kann - ist ja auch logisch. was macht die denn?

haste von der auch den quelltext?

Gruß
Obi

lunzet
22.12.03, 17:36
ist natürlich nicht die interpretierte version sondern einfach der "text" aus der datei.


und hier die besagte front_content.php (das wollt ihr nicht wirklich alles lesen)
pfade etc. stimmen alle...und die sql db ist auch in ordnung.


front_content.php
<?
include("config.php");
include($ContenidoPath."inc/config.php");
include($ContenidoPath.$cfgPathInc."cfg_sql.inc.php");
include($ContenidoPath.$cfgPathInc."cfg_language_".$language.".inc.php");
include($ContenidoPath.$cfgPathInc."fnc_general.inc.php");

page_open(
array("sess" => "Contenido_Frontend_Session",
"auth" => "Contenido_Frontend_Challenge_Crypt_Auth",
"perm" => "Contenido_Perm"));

$db = new DB_Contenido;

if (!$client) die ("Es wurde kein client angegeben.");

if (!$lang) {$sql = "SELECT A.idlang FROM $cfgTab_clients_lang AS A, $cfgTab_lang AS B WHERE idclient='$client' AND A.idlang=B.idlang AND B.active='1' LIMIT 0,1";
$db->query($sql);
if ($db->next_record()) {$lang = $db->f("idlang");}
else die ("Es ist keine Sprache vorhanden oder aktiv.");}

$sql = "SELECT A.idcat, visible, public FROM $cfgTab_cat_tree AS A, $cfgTab_cat AS B, $cfgTab_cat_lang AS C WHERE A.idcat=B.idcat AND B.idcat=C.idcat AND B.idclient='$client' AND C.idlang='$lang' AND level='0' ORDER BY idtree";
$db->query($sql);
$i=1;
while ($db->next_record())
{$sql = "SELECT parentid, A.idcat, name, visible, public FROM $cfgTab_cat_tree AS A, $cfgTab_cat AS B, $cfgTab_cat_lang AS C WHERE A.idcat=B.idcat AND B.idcat=C.idcat AND B.idclient='$client' AND C.idlang='$lang' AND B.parentid='".$db->f("idcat")."' ORDER BY A.idtree";
$db2 = new DB_Contenido;
$db2->query($sql);
$j=1;
while ($db2->next_record())
{if ($db->f("visible") == "1" & $db2->f("visible") == "1")
{if ($db->f("public") == "1" & $db2->f("public") == "1" | $auth->auth["uid"] != "nobody")
{$tree["".$i.""]["".$j.""][link] = $sess->url("front_content.php?client=".$client."&lang=".$lang."&parent=".$db2->f("parentid")."&subid=".$db2->f("idcat")."&idcat=".$db2->f("idcat")."");
$tree["".$i.""]["".$j.""][idcat] = $db2->f("idcat");
$tree["".$i.""]["".$j.""][name] = $db2->f("name");
if ($tree[$i][$j][idcat] == $subid)
{$sql = "SELECT parentid, A.idcat, name, visible, public FROM $cfgTab_cat_tree AS A, $cfgTab_cat AS B, $cfgTab_cat_lang AS C WHERE A.idcat=B.idcat AND B.idcat=C.idcat AND B.idclient='$client' AND C.idlang='$lang' AND B.parentid='".$db2->f("idcat")."' ORDER BY A.idtree";
$db3 = new DB_Contenido;
$db3->query($sql);
$k=1;
while ($db3->next_record())
{if ($db3->f("visible") == "1")
{if ($db3->f("public") == "1" | $auth->auth["uid"] != "nobody")
{$tree["".$i.""]["".$j.""]["".$k.""][link] = $sess->url("front_content.php?client=".$client."&lang=".$lang."&parent=".$db3->f("parentid")."&subid=$subid&idcat=".$db3->f("idcat")."");
$tree["".$i.""]["".$j.""]["".$k.""][idcat] = $db3->f("idcat");
$tree["".$i.""]["".$j.""]["".$k.""][name] = $db3->f("name");
$k++;}}}}
$j++;}}}
$i++;}

if (!$idcatside) {
if (!$idside) {
if (!$idcat) {
$sql = "SELECT idside, B.idcat FROM $cfgTab_cat_side AS A, $cfgTab_cat_tree AS B, $cfgTab_cat AS C WHERE A.idcat=B.idcat AND B.idcat=C.idcat AND is_start='1' AND idclient='$client' ORDER BY idtree";
$db->query($sql);
if ($db->next_record()) {
$idside = $db->f("idside");
$idcat = $db->f("idcat");
} else {
die ("Keine Startseite in dieser Kategorie vorhanden.");
}
} else {
$sql = "SELECT idside FROM $cfgTab_cat_side WHERE idcat='$idcat' AND is_start='1'";
$db->query($sql);
if ($db->next_record()) {
$idside = $db->f("idside");
} else {
die ("Keine Startseite in dieser Kategorie vorhanden.");
}

}
}
} else {
$sql = "SELECT idcat, idside FROM $cfgTab_cat_side WHERE idcatside='$idcatside'";
$db->query($sql);
$db->next_record();
$idcat = $db->f("idcat");
$idside = $db->f("idside");


}
$sql = "SELECT * FROM $cfgTab_code AS A, $cfgTab_cat_side AS B WHERE A.idcatside=B.idcatside AND B.idcat='$idcat' AND B.idside='$idside' AND A.idlang='$lang'";
$db->query($sql);
if ($db->next_record()) {
$code = $db->f("code");
} else {
$code = "echo \"No code available.\";";
}

$idcatside = $db->f("idcatside");

//************ check for public ****************
$sql = "SELECT public FROM $cfgTab_cat_lang WHERE idcat='$idcat' AND idlang='$lang' ";
$db->query($sql);
$db->next_record();
$public = $db->f("public");

if ($public == 0) {
// echo "Diese Kategorie ist <b>geschützt</b> .....";
$auth->login_if($auth->auth["uid"] == "nobody");
} else {
// echo "Diese Kategorie ist <b>öffentlich</b>";
}

//************ update 'stat'-table ****************
$sql = "SELECT visited FROM $cfgTab_stat WHERE idcatside='$idcatside' AND idlang='$lang' ";
$db->query($sql);
$db->next_record();
$new_visited = $db->f("visited") + 1;

$sql = "UPDATE $cfgTab_stat SET visited='$new_visited' WHERE idcatside='$idcatside' AND idlang='$lang' ";
$db->query($sql);

$sql = "SELECT online, redirect, redirect_url FROM $cfgTab_side_lang WHERE idside='$idside' AND idlang=$lang";
$db->query($sql);
$db->next_record();
$online = $db->f("online");
$redirect = $db->f("redirect");
$redirect_url = $db->f("redirect_url");

if ($online) {
//Redirect, if User had chose this opinion in the sideproperties
if($redirect == '1' && $redirect_url != ''){
header ("Location: $redirect_url");
exit;
}
else{
eval($code);
}
} else {
echo "Seite ist nicht online.";
}
page_close();
?>



also es liegt auf keinen fall an einer dieser bisher geposteten dateien...da wenn man die url einfach nochmal eingibt alles funktioniert.

nur halt beim ersten aufruf und auch nur wenn man den browser neu gestartet hat kommt der fehler...sonst ja nicht.

muss irgendwo im php4.2.2 oder apache liegen. die sql datenbank ist es in keinem falle...

gruss,

thomas