Author Topic: Problems  (Read 1231 times)

0 Members and 1 Guest are viewing this topic.

Offline ray11

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
    • View Profile
Problems
« on: November 16, 2009, 03:36:23 AM »
why am i getting this error only thing i edited was the player.tpl to make the size bigger .. this is all i get now only way to fix it for least a min is to clear cache and cookies and stuff.. then after that it comes back.  so i dont know whats going on. can anyone tell me how to fix it

406 Not Acceptable
An appropriate representation of the requested resource /media/index.php could not be found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Offline MarkMD76

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: Problems
« Reply #1 on: November 20, 2009, 10:33:17 PM »
I'm getting the exact same problems.  All I have edited is the header.tpl file

Offline Jeff

  • Global Moderator
  • Sr phpd Member
  • *****
  • Posts: 359
  • Karma: 5
  • Need help? Feel free to ask.
    • View Profile
Re: Problems
« Reply #2 on: November 21, 2009, 12:49:20 AM »
This is due to Apache mod_security that is turned on by default. While you can use the following to diagnose the problem (turning the filter off should resolve the issue)

Place this between the <head> tags

<META HTTP-EQUIV=REFRESH CONTENT=1>

Im pretty sure that should fix it

Offline ray11

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Problems
« Reply #3 on: November 21, 2009, 02:26:29 AM »
i added it in the header.tpl but all it does is keep refreshing it over and over and over again every 1 second is there way for it not to keep refreshing it .. is there a way not to it keep refreshing it? and dont have that error?

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: Problems
« Reply #4 on: November 21, 2009, 02:34:42 AM »
Well the code above is meant to refresh the page every second.

I don't know how this fixes the problem, but.. Can you post the code you edited?

Offline ray11

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Problems
« Reply #5 on: November 21, 2009, 02:43:25 AM »
this problem usually occures when i add a video ..only time this it working with out this error is with out adding videos .. so right now its at its normal state all i edited was the header.tpl and all i added was that meta tag i took it back out couse the refreshing .. you have any idea what it can be .. this 406 error after adding videos? when there was no videos at all it worked perfect then i add 1 video for a test and it starts happening the 406 error.

this is the clean version of the 0.22 download

i really need to know why its happening.
heres my header.tpl if you need it.
 
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-2" />
<meta name="author" content="Ben Swanson"/>
<meta name="theme" content="luka cvrk"/>
<title>{$config_name|default:"PHP Director"}</title>
<link rel="stylesheet" href="templates/Photine/style.css" type="text/css" />
<script type="text/javascript" src="js/behavior.js"></script>
<script type="text/javascript" src="js/rating.js"></script>
<script type="text/javascript" src="js/reflection.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/thickbox.js"></script>
<script type="text/javascript" src="js/show_hide.js"></script>
</head>
<body>
<div id='content'>
<div id='header'><!--<p id="top_info">Top Info</p>-->
<div id="logo">
<h1><a href="index.php" title="home"><img src="templates/Photine/images/phpdirectorbeta.png" width="243" height="52" alt="PHP Director" border="0" /></a></h1>
</div>
</div>
<div id='tabs'>
<ul>
<li><a {if $pagetype eq "feature"}class="current"{/if} href='index.php?pt=feature' accesskey='f'><span class='key'>{$LAN_2|default:"Featured"}</span></a></li>
<li><a {if $pagetype eq "all"}class="current"{/if} href='index.php?pt=all' accesskey='a'><span class='key'>{$LAN_3|default:"All"}</span></a></li>
<li><a {if $pagetype eq "categories"}class="current"{/if} href='categories.php?pt=categories' accesskey='c'><span class='key'>{$LAN_40|default:"Categories"}</span></a></li>
<li><a {if $pagetype eq "images"}class="current"{/if} href='images.php?pt=images' accesskey='i'><span class='key'>{$LAN_4|default:"Images"}</span></a></li>
<li><a {if $pagetype eq "videos"}class="current"{/if} href='videos.php?pt=videos' accesskey='r'><span class='key'>{$LAN_39|default:"Videos"}</span></a></li>
<li><a {if $pagetype eq "submit"}class="current"{/if} href='submit.php?pt=submit&amp;part=1' accesskey='s'><span class='key'>{$LAN_5|default:"Submit"}</span></a></li>
</ul>
<div id="search">
<form method="post" action="index.php" name="search1">
<p><input type="text" name="searching" class="search"/><input type="submit" value="Search"  class="button"/></p>
</form>
</div>
</div>
{if $news eq ""}
{if $firefox eq "1"}<br />
<br />
{/if}
{else}
<div class="gboxtop"></div>
<div class="gbox">
<p>{$news}</p>
</div>
{/if}
« Last Edit: November 21, 2009, 01:35:51 PM by krissy »

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: Problems
« Reply #6 on: November 21, 2009, 04:28:03 AM »
Just to clear one thing up, did you use any extra templates and/or Mods? If so please post them.

Oh, and can you past your player.tpl, and viewvid.tpl here, using the the code tags?

Example:
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title></title>
</head>
<body>

</body>
</html>

So that none of the code becomes unusable.

Offline Jeff

  • Global Moderator
  • Sr phpd Member
  • *****
  • Posts: 359
  • Karma: 5
  • Need help? Feel free to ask.
    • View Profile
Re: Problems
« Reply #7 on: November 21, 2009, 04:32:01 AM »
ya dont ask me why the hell i told you to add that.... im sorry... lol

Offline MarkMD76

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: Problems
« Reply #8 on: November 21, 2009, 04:32:21 AM »
Here's what I added to the header.tpl in the tabs section:
Code: [Select]
<li><a href='http://www.xblig.co.uk/feed/search.php' target='_blank' accesskey='s'><span class='key'>{$LAN_70|default:"Search"}</span></a></li>
<li><a href='http://www.xblig.co.uk/forums' target='_blank' accesskey='s'><span class='key'>{$LAN_71|default:"Press A to Continue"}</span></a></li>
<li><a href='http://xboxhornet.wordpress.com' target='_blank' accesskey='s'><span class='key'>{$LAN_72|default:"XboxHornet's Blog"}</span></a></li>
<li><a href='http://xblig.co.uk' target='_blank' accesskey='s'><span class='key'>{$LAN_73|default:"xblig.co.uk"}</span></a></li>

I obviously added entries to the language file also and adjusted the tabs style to have the tabs move to the left.

Offline ray11

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Problems
« Reply #9 on: November 21, 2009, 04:54:55 AM »
edited..  i had to put spaces in the players.tpl code tags it made the page unstable and page wider

ok here they are and no i dont have any mods its clean till i find out why this is happening and get a fix for this.

players.tpl

Code: [Select]
{if $vidtype eq "YouTube"}

<object width="425" height="350"><param name="wmode" value="transparent">

</param><embed src="http://www.youtube.com/v/{if $video[video].file eq ""}

{$videoid}{else}{$video[video].file}{/if}&autoplay=1" type="application/x-

shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>

{elseif $vidtype eq "GoogleVideo"}

<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash"

src="http://video.google.com/googleplayer.swf?docId=

{if $video[video].file eq ""}{$videoid}{else}

{$video[video].file}{/if}" flashvars=""> </embed>

{elseif $vidtype eq "dailymotion"}

<div><object width="425" height="335"><param name="movie" value="http://www.dailymotion.com/swf/
{if $video[video].file eq ""}{$videoid}{else}{$video[video].file}{/if}">
</param><param name="allowfullscreen" value="true"></param>
<embed src="http://www.dailymotion.com/swf/{if $video[video].file eq ""}

{$videoid}{else}{$video[video].file}{/if}" type="application/x-shockwave-flash" width="425" height="334" allowfullscreen="true"></embed></object></div>

{else}
This video type is currently unsuppotred
{/if}

and viewvid.tpl

Code: [Select]
{include file="header.tpl"}
{section name=video loop=$video}
<div align='center'>
{if $reject eq "1"}
{$LAN_26}
{/if}
<h2>{$video[video].name}</h2>
<p><b>{$LAN_36}:</b><br />
{$video[video].creator} </p>
{include file="players.tpl"}<br />
{rating_bar units='5' id=$video[video].id}
<strong>{$LAN_35}:</strong>
<br />
<div id='description'>{$video[video].description}</div>
<br />
<b>{$LAN_32}: </b>{$video[video].views}
{/section}
</div>
{include file="footer.tpl"}

im sorry if the page got bigger
« Last Edit: November 21, 2009, 05:17:31 AM by ray11 »

Offline MarkMD76

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: Problems
« Reply #10 on: November 21, 2009, 10:01:56 AM »
I have been doing a bit of digging around on this 406 and a lot of things point to needing to disable mod_security, which I have had my hosting providers do and I still get the error.  Generally, I can get it to occur after rating a video, then clicking on the 'All' tab.

Offline MarkMD76

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: Problems
« Reply #11 on: November 21, 2009, 10:10:20 AM »
I have also tried a fresh install from scratch and still have the same problem.

Offline ray11

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
    • View Profile
Re: Problems
« Reply #12 on: November 21, 2009, 03:44:42 PM »
same problems as me MarkMD76 ever since i have videos up on it. all my pages i go to after that gives 406 error and i cant fix it. 

all i want to do is get this problem fixed .
please someone help me with my 406 error if someone can help .

Offline Jeff

  • Global Moderator
  • Sr phpd Member
  • *****
  • Posts: 359
  • Karma: 5
  • Need help? Feel free to ask.
    • View Profile
Re: Problems
« Reply #13 on: November 21, 2009, 04:36:28 PM »
406 is the status returned when the HTTP request has "Accept" headers that are incompatible with what is being requested or what the server is set up to deliver.

406 is the server telling you "I have what you asked for, but you won't accept them".

"406 Not Acceptable" is an unusual status code - the most common are 200, 404, 500, 301. You only see a 406 when something is wrong with the server, usually something silly but hard to diagnose.

It is something server side (not script side) Talk to your host and see what they can do or go get another host :)

Offline MarkMD76

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: Problems
« Reply #14 on: November 21, 2009, 06:24:20 PM »
Thanks Jeff.  I have just emailed my host about it.  Any idea on what can cause this I have never encountered it before and everything that I have read points to the need to turn off mod_security, with has been done, but doesn't resolve the problem.