Finde Fehler nicht
- Smoker_Shine
- Erledigt
-
-
Moin moin.
Und was soll nicht funktionieren?
bitte mehr infomationevt error log mit posten.
Danke
lg
Edit:
defined('_VALID_USER') or die(header("Location: www.".$_SERVER['SERVER_NAME']."/index.php"));
das kommt mir komisch vor.
Du willst Location holen aus dem internet? Location macht man doch rein local soweit ich weiß
-
defined('_VALID_USER') or die(header("Location: www.".$_SERVER['SERVER_NAME']."/index.php"));
ist ein Sicherheitsformular das macht nur das die seite NUR über die index.php aufgeht sonst geht nix XD desweiteren geht row nicht warum auch immer. und die url muss so ausehen sonst geht es net index.php?id=video&vid=mac_and_devin_go_to_highschool
-
ok gute antwort
allerdings kann ich den fehler nicht nachvollzien. Was sagt deine logs? Um was fürn fehler handelt es sich überhaubt? -
[Sun Jun 18 00:05:31.055188 2017] [:error] [pid 9064:tid 1812] [client ::1:65475] PHP Warning: Invalid argument supplied for foreach() in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 9
[Sun Jun 18 00:05:31.055188 2017] [:error] [pid 9064:tid 1812] [client ::1:65475] PHP Notice: Undefined variable: row in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 21
[Sun Jun 18 00:06:04.510070 2017] [:error] [pid 9064:tid 1812] [client ::1:65495] PHP Warning: Invalid argument supplied for foreach() in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 9
[Sun Jun 18 00:06:42.238875 2017] [:error] [pid 9064:tid 1820] [client ::1:65517] PHP Warning: Invalid argument supplied for foreach() in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 9
[Sun Jun 18 00:06:42.238875 2017] [:error] [pid 9064:tid 1820] [client ::1:65517] PHP Notice: Undefined variable: profilbild in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 38
[Sun Jun 18 00:06:42.470856 2017] [core:error] [pid 9064:tid 1836] (20024)The given path is misformatted or contained invalid characters: [client ::1:65519] AH00127: Cannot map GET /streamvideo.tk/app/user/pb/%3Cbr%20/%3E%3Cb%3ENotice%3C/b%3E:%20%20Undefined%20variable:%20profilbild%20in%20%3Cb%3EC:/xamp/htdocs/streamvideo.tk/app/site/video.php%3C/b%3E%20on%20line%20%3Cb%3E38%3C/b%3E%3Cbr%20/%3E HTTP/1.1 to file, referer: index.php?id=video&vid=mac_and_devin_go_to_highschool
[Sun Jun 18 00:07:52.634466 2017] [:error] [pid 9064:tid 1812] [client ::1:49166] PHP Warning: Invalid argument supplied for foreach() in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 9
[Sun Jun 18 00:07:52.634466 2017] [:error] [pid 9064:tid 1812] [client ::1:49166] PHP Notice: Undefined variable: profilbild in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 20
[Sun Jun 18 00:07:52.634466 2017] [:error] [pid 9064:tid 1812] [client ::1:49166] PHP Notice: Undefined variable: profilbild in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 38
[Sun Jun 18 00:07:52.789245 2017] [core:error] [pid 9064:tid 1828] (20024)The given path is misformatted or contained invalid characters: [client ::1:49168] AH00127: Cannot map GET /streamvideo.tk/app/user/pb/%3Cbr%20/%3E%3Cb%3ENotice%3C/b%3E:%20%20Undefined%20variable:%20profilbild%20in%20%3Cb%3EC:/xamp/htdocs/streamvideo.tk/app/site/video.php%3C/b%3E%20on%20line%20%3Cb%3E38%3C/b%3E%3Cbr%20/%3E HTTP/1.1 to file, referer: index.php?id=video&vid=mac_and_devin_go_to_highschool
[Sun Jun 18 00:11:57.098519 2017] [:error] [pid 9064:tid 1820] [client ::1:49397] PHP Notice: Undefined variable: profilbild in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 14
[Sun Jun 18 00:16:07.789076 2017] [:error] [pid 9064:tid 1836] [client ::1:49561] PHP Parse error: syntax error, unexpected '?>' in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 31
[Sun Jun 18 01:07:42.728570 2017] [:error] [pid 9064:tid 1820] [client ::1:51469] PHP Warning: Illegal string offset 'profilbild' in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 14
[Sun Jun 18 01:07:42.729070 2017] [:error] [pid 9064:tid 1820] [client ::1:51469] PHP Warning: Illegal string offset 'profilbild' in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 32
[Sun Jun 18 01:07:42.964210 2017] [core:error] [pid 9064:tid 1820] (20024)The given path is misformatted or contained invalid characters: [client ::1:51469] AH00127: Cannot map GET /streamvideo.tk/app/user/pb/%3Cbr%20/%3E%3Cb%3EWarning%3C/b%3E:%20%20Illegal%20string%20offset%20'profilbild'%20in%20%3Cb%3EC:/xamp/htdocs/streamvideo.tk/app/site/video.php%3C/b%3E%20on%20line%20%3Cb%3E32%3C/b%3E%3Cbr%20/%3ES HTTP/1.1 to file, referer: index.php?id=video&vid=mac_and_devin_go_to_highschool
[Sun Jun 18 01:38:00.857499 2017] [:error] [pid 9064:tid 1836] [client ::1:52903] PHP Notice: Use of undefined constant \xc2\xa7username - assumed '\xc2\xa7username' in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\user.php on line 4, referer: index.php?id=video&vid=mac_and_devin_go_to_highschool
[Sun Jun 18 01:52:56.290327 2017] [:error] [pid 9064:tid 1820] [client ::1:53500] PHP Notice: Undefined index: id in C:\\xamp\\htdocs\\streamvideo.tk\\index.php on line 10, referer: index.php?id=
[Sun Jun 18 01:52:59.510158 2017] [:error] [pid 9064:tid 1820] [client ::1:53500] PHP Notice: Undefined index: id in C:\\xamp\\htdocs\\streamvideo.tk\\index.php on line 10, referer: index.php
[Sun Jun 18 01:54:24.966620 2017] [:error] [pid 9064:tid 1820] [client ::1:53551] PHP Notice: Undefined index: id in C:\\xamp\\htdocs\\streamvideo.tk\\index.php on line 10, referer: index.php
[Sun Jun 18 01:55:17.963040 2017] [:error] [pid 9064:tid 1836] [client ::1:53581] PHP Notice: Undefined index: id in C:\\xamp\\htdocs\\streamvideo.tk\\index.php on line 10, referer: index.php
[Sun Jun 18 01:56:29.409892 2017] [:error] [pid 9064:tid 1820] [client ::1:53613] PHP Notice: Undefined index: id in C:\\xamp\\htdocs\\streamvideo.tk\\index.php on line 10, referer: index.php
[Sun Jun 18 01:56:33.078581 2017] [:error] [pid 9064:tid 1820] [client ::1:53613] PHP Notice: Undefined index: id in C:\\xamp\\htdocs\\streamvideo.tk\\index.php on line 10, referer: index.php
[Sun Jun 18 01:58:12.311962 2017] [:error] [pid 9064:tid 1820] [client ::1:53662] PHP Notice: Undefined index: id in C:\\xamp\\htdocs\\streamvideo.tk\\index.php on line 10, referer: index.php -
C:\\xamp\\htdocs\\streamvideo.tk\\index.php on line 10, referer: index.php
deiner index datei in der leine 10 ist irgend was nicht defeniert PHP Notice: Undefined index: id
so wie das sehe. Aber evt weiß da einer mehr bescheid als ich
PHP[Sun Jun 18 00:11:57.098519 2017] [:error] [pid 9064:tid 1820] [client ::1:49397] PHP Notice: Undefined variable: profilbild in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 14 [Sun Jun 18 00:16:07.789076 2017] [:error] [pid 9064:tid 1836] [client ::1:49561] PHP Parse error: syntax error, unexpected '?>' in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 31 [Sun Jun 18 01:07:42.728570 2017] [:error] [pid 9064:tid 1820] [client ::1:51469] PHP Warning: Illegal string offset 'profilbild' in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 14 [Sun Jun 18 01:07:42.729070 2017] [:error] [pid 9064:tid 1820] [client ::1:51469] PHP Warning: Illegal string offset 'profilbild' in C:\\xamp\\htdocs\\streamvideo.tk\\app\\site\\video.php on line 32
scheint aber auch mehr fehler zu haben in video.php -
Ja der Fehler ist beabsichtigt durch Get wenn index.php?id= leer ist geht es automatisch auf index.php?id=home
-
PHP
Alles anzeigen<?php //Abfrage überwelche domain man kommt if($_SERVER['REQUEST_URI']!=str_replace("index.php?id=video&vid=mac_and_devin_go_to_highschool","",$_SERVER['REQUEST_URI'])){ header("Location: http://www.".$_SERVER['SERVER_NAME']."/index.php"); exit(); } $link = mysqli_connect("localhost","root","*****","videopage"); //MySQL Connection $vid = mysqli_real_escape_string($link,$_GET["vid"]); //video name $vid_src = $vid . ".mp4"; //video type $sql = "SELECT filmpfad, name, besitzer, views, likes, dislikes, profilbild FROM videopage ORDER BY ". $vid .""; //Query befehl $result = mysqli_query($link,$sql); //Query Abfrage foreach ($row = mysqli_fetch_array($result)) { //Define Text $besitzer= "Smoker_Shine"; $decription = "Mac & Devin Go to High School ist ein Album der Rapper Wiz Khalifa und Snoop Dogg, zudem stellt das Album den Soundtrack zum gleichnamigen Film dar, der am 3. Juli 2012 veröffentlicht wurde."; $name = "Mac and Devin Go to High School"; echo "1.". $row['profilbild'] .""; ?> <div class="clear"></div> </div> </div> <div class="clear"></div> <div class="wrap"> <div class="content"> <div class="vdo-log margin_bottom"> <div class="heading6"><h1><?php echo "". $name ."" ?></h1> <div class="video-player"></div> <video width="640" height="480" controls autobuffer poster="app/upload/<?php echo "". $vid ."" ?>.png"> <?php echo "<source src='app/upload/". $vid .".mp4' type='video/mp4' />" ?> </video> </div> <div class="float-left"> <div class="heading5">From</div> <div class="clear"></div> <div class="vb-desc"><img style="width: 50px; height: 50px;" src="app/user/pb/<?php echo "". $row['profilbild'] ."" ?>" alt="" /> </br> <?php echo "". $besitzer ."" ?></div> <div class="heading5">Description</div> <div class="vb-desc"><?php echo "". $decription ."" ?></div> <div class="clear"></div> </div> <div id="button"><img src="app/images/button.jpg" alt="Drop-down" /></div> <div class="float-left" id="option" style="display:none"> <div class="float-left"> <div class="heading5">Tags</div> <div class="clear"></div> <div class="vb-desc"><a href="#">This</a>, <a href="#">got</a>, <a href="#">cool</a>, <a href="#">moves</a>, <a href="#">how</a>, <a href="#">This</a>, <a href="#">got</a></div> </div> </div> <div class="float-left"> <div class="vb-stats">0 Views</div> <div class="clear"></div> <div class="vb-stats">0 Likes</div><div class="vb-stats"> 0 Dislikes</div> <div class="clear"></div> <div class="vb-stats">Category > <a href="#">Drogen Filme</a></div> </div> <div class="clear"></div> </div> </div> <div class="float-left"> <div class="sidebox-one"> <div class="sidebox-image"><img src="app/images/ad_250x300.png" alt="ad" /></div> <div class="heading2"><span>Related <span class="highlight">Videos</span></span><div class="lines"></div></div> <div class="sb-video-log"> <div class="sb-vdo-list"> <div class="sb-vdo-thumb"> <a href="" style="background-image:url(http://lorempixel.com/80/64);"><span>02:56</span></a> </div> <div class="sb-vdo-info"> <div class="sb-vdo-title"><a href="index.php?id=video&9185932h39"><h4>Folge 1</h4></a></div> <div class="sb-vdo-desc">This got some cool moves. See for yourself how he fights for his girl.</div> <div class="sb-vdo-detail">10 minutes ago <span>|</span> 562 <a href="">Downloads</a> <span>|</span> 15,639 views</div> </div> <div class="clear"></div> </div> <div class="sb-vdo-list"> <div class="sb-vdo-thumb"> <a href="" style="background-image:url(http://lorempixel.com/80/64);"><span>02:56</span></a> </div> <div class="sb-vdo-info"> <div class="sb-vdo-title"><a href="preview.html"><h4>Penguin hu ha</h4></a></div> <div class="sb-vdo-desc">This got some cool moves. See for yourself how he fights for his girl.</div> <div class="sb-vdo-detail">10 minutes ago <span>|</span> 562 <a href="">Downloads</a> <span>|</span> 15,639 views</div> </div> <div class="clear"></div> </div> <div class="sb-vdo-list"> <div class="sb-vdo-thumb"> <a href="" style="background-image:url(http://lorempixel.com/80/64);"><span>02:56</span></a> </div> <div class="sb-vdo-info"> <div class="sb-vdo-title"><a href="preview.html"><h4>Penguin hu ha</h4></a></div> <div class="sb-vdo-desc">This got some cool moves. See for yourself how he fights for his girl.</div> <div class="sb-vdo-detail">10 minutes ago <span>|</span> 562 <a href="">Downloads</a> <span>|</span> 15,639 views</div> </div> <div class="clear"></div> </div> <div class="sb-vdo-list"> <div class="sb-vdo-thumb"> <a href="" style="background-image:url(http://lorempixel.com/80/64);"><span>02:56</span></a> </div> <div class="sb-vdo-info"> <div class="sb-vdo-title"><a href="preview.html"><h4>Penguin hu ha</h4></a></div> <div class="sb-vdo-desc">This got some cool moves. See for yourself how he fights for his girl.</div> <div class="sb-vdo-detail">10 minutes ago <span>|</span> 562 <a href="">Downloads</a> <span>|</span> 15,639 views</div> </div> <div class="clear"></div> </div> <div class="sb-vdo-list"> <div class="sb-vdo-thumb"> <a href="" style="background-image:url(http://lorempixel.com/80/64);"><span>02:56</span></a> </div> <div class="sb-vdo-info"> <div class="sb-vdo-title"><a href="preview.html"><h4>Penguin hu ha</h4></a></div> <div class="sb-vdo-desc">This got some cool moves. See for yourself how he fights for his girl.</div> <div class="sb-vdo-detail">10 minutes ago <span>|</span> 562 <a href="">Downloads</a> <span>|</span> 15,639 views</div> </div> <div class="clear"></div> </div> <div class="more-but"><a href="#">View More >></a></div> <div class="clear"></div> </div> </div> <div class="clear"></div> </div> <?php } ?>
Ich habe den mal ein bisschen umgeschrieben so sollte er gehen, ich habe ihn nicht getestet!
Die mysqli Methode ist genau so gut wie die pdo meines Erachtens nach.
-