Author Topic: 406 Not Acceptable  (Read 6714 times)

Offline kfordham281

  • Jr. Member
  • **
  • Posts: 13
406 Not Acceptable
« on: June 29, 2006, 11:04:58 PM »
"Not Acceptable

An appropriate representation of the requested resource / could not be found on this server."

This happens when I try to send an email; pretty much only when replying. This happens a few times a day and I can't seem to find any pattern. I can reply to some messages fine, and others I get this error.

Offline flosoft

  • Sr. Member
  • ****
  • Posts: 349
    • http://flosoft.biz
Re: 406 Not Acceptable
« Reply #1 on: June 30, 2006, 04:14:55 AM »
hmm, what is your software is your mailserver and what is your Webserver? PHP Version etc.?

Offline kfordham281

  • Jr. Member
  • **
  • Posts: 13
Re: 406 Not Acceptable
« Reply #2 on: June 30, 2006, 03:09:01 PM »
Mail software is Exim
Apache 1.3.34
php 4.4.2
mysql 4.1.19-standard

Hope that helps!

Offline flosoft

  • Sr. Member
  • ****
  • Posts: 349
    • http://flosoft.biz
Re: 406 Not Acceptable
« Reply #3 on: June 30, 2006, 07:29:08 PM »
Did you set the rights to 777 on logs and tmp?

Offline Prasad1337

  • Global Moderator
  • Full Member
  • *****
  • Posts: 114
Re: 406 Not Acceptable
« Reply #4 on: July 01, 2006, 05:32:39 AM »
Remember for some hosts (like mine) 777 isnt accepted, so if 777 doesnt work , try CHMOD 755.

Offline neodg

  • Newbie
  • *
  • Posts: 3
Re: 406 Not Acceptable
« Reply #5 on: July 02, 2006, 05:42:41 AM »
the mod_security (Apache) module blocks that

Offline kfordham281

  • Jr. Member
  • **
  • Posts: 13
Re: 406 Not Acceptable
« Reply #6 on: July 02, 2006, 11:20:09 AM »
Yes, currently tmp and logs are both set to 777.

Offline flosoft

  • Sr. Member
  • ****
  • Posts: 349
    • http://flosoft.biz
Re: 406 Not Acceptable
« Reply #7 on: July 02, 2006, 12:12:21 PM »
hmm ... I'm out of ideas. Especially I don't really know a 406.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,536
    • http://SKaero.com/
Re: 406 Not Acceptable
« Reply #8 on: July 02, 2006, 04:13:47 PM »
Whats in you error log? This may help...

Offline kfordham281

  • Jr. Member
  • **
  • Posts: 13
Re: 406 Not Acceptable
« Reply #9 on: July 02, 2006, 06:34:02 PM »
Contents of my error log:

[05-Jun-2006 08:19:09 -0400] DB Error: DB Error: connect failed in /home/my-user-name/public_html/roundcube/program/include/rcube_db.inc on line 97
[05-Jun-2006 08:19:09] PHP Fatal error: Call to undefined function: query() in /home/my-user-name/public_html/roundcube/program/include/rcube_db.inc on line 213
[05-Jun-2006 08:20:11 -0400] DB Error: DB Error: connect failed in /home/my-user-name/public_html/roundcube/program/include/rcube_db.inc on line 97
[05-Jun-2006 08:20:11] PHP Fatal error: Call to undefined function: query() in /home/my-user-name/public_html/roundcube/program/include/rcube_db.inc on line 213
[06-Jun-2006 06:19:48] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[07-Jun-2006 18:06:35 -0400] IMAP Error: Authentication failed (LOGIN):
"a001 NO LOGIN failed" in on line 0
[08-Jun-2006 09:08:48] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[12-Jun-2006 09:24:36] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[16-Jun-2006 10:49:55] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[16-Jun-2006 13:44:14] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[19-Jun-2006 09:20:11] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[19-Jun-2006 15:36:19] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[19-Jun-2006 16:23:31] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[20-Jun-2006 10:16:53] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[20-Jun-2006 14:02:08] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[21-Jun-2006 10:49:21] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[21-Jun-2006 17:32:32] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[22-Jun-2006 12:45:48] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[24-Jun-2006 15:45:48] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[24-Jun-2006 16:08:19] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[25-Jun-2006 21:54:43] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[25-Jun-2006 21:56:17] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[27-Jun-2006 09:14:50] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[27-Jun-2006 10:08:31] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[27-Jun-2006 13:15:01] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[27-Jun-2006 16:11:32] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[28-Jun-2006 09:00:35] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 124
[28-Jun-2006 12:49:55] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[29-Jun-2006 09:14:28] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[29-Jun-2006 12:11:05] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[30-Jun-2006 09:14:12] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[30-Jun-2006 10:46:58] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[30-Jun-2006 15:12:11] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[30-Jun-2006 18:40:18] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[01-Jul-2006 01:34:44] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[01-Jul-2006 12:34:17] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 125
[02-Jul-2006 00:32:04] PHP Fatal error: Maximum execution time of 120 seconds exceeded in /home/my-user-name/public_html/roundcube/program/lib/imap.inc on line 123
[02-Jul-2006 11:37:49 -0400] IMAP Error: Authentication failed (LOGIN):
"a001 NO LOGIN failed" in on line 0


I would likely say the PHP Fatal Error is the 406 error in question as it's often.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,536
    • http://SKaero.com/
Re: 406 Not Acceptable
« Reply #10 on: July 04, 2006, 05:26:58 PM »
Can you post your program/lib/imap.inc?

Offline kfordham281

  • Jr. Member
  • **
  • Posts: 13
Re: 406 Not Acceptable
« Reply #11 on: July 05, 2006, 05:11:57 PM »
Any particular part? The file is over 2000 lines.

Offline flosoft

  • Sr. Member
  • ****
  • Posts: 349
    • http://flosoft.biz
Re: 406 Not Acceptable
« Reply #12 on: July 06, 2006, 10:47:30 AM »
95 > 215

Offline kfordham281

  • Jr. Member
  • **
  • Posts: 13
Re: 406 Not Acceptable
« Reply #13 on: July 06, 2006, 11:05:12 AM »
  • Lines 95-215:
Code: [Select]
var $recent;
var $answered;
var $junk;
var $internaldate;
var $is_reply;
}


class iilThreadHeader{
var $id;
var $sbj;
var $irt;
var $mid;
}


function iil_xor($string, $string2){
  $result = "";
  $size = strlen($string);
  for ($i=0; $i<$size; $i++) $result .= chr(ord($string[$i]) ^ ord($string2[$i]));
   
  return $result;
}

function iil_ReadLine($fp, $size){
$line=&quot;&quot;;
if ($fp){
do{
$buffer = fgets($fp, 2048);
$line.=$buffer;
}while($buffer[strlen($buffer)-1]!=&quot;\n&quot;);
}
return $line;
}

function iil_MultLine($fp, $line){
$line = chop($line);
if (ereg('\{[0-9]+\}$', $line)){
$out = &quot;&quot;;
preg_match_all('/(.*)\{([0-9]+)\}$/', $line, $a);
$bytes = $a[2][0];
while(strlen($out)<$bytes){
$out.=chop(iil_ReadLine($fp, 1024));
}
$line = $a[1][0].&quot;\&quot;$out\&quot;&quot;;
}
return $line;
}

function iil_ReadBytes($fp, $bytes){
$data = &quot;&quot;;
$len = 0;
do{
$data.=fread($fp, $bytes-$len);
$len = strlen($data);
}while($len<$bytes);
return $data;
}

function iil_ReadReply($fp){
do{
$line = chop(trim(iil_ReadLine($fp, 1024)));
}while($line[0]==&quot;*&quot;);

return $line;
}

function iil_ParseResult($string){
$a=explode(&quot; &quot;, $string);
if (count($a) > 2){
if (strcasecmp($a[1], &quot;OK&quot;)==0) return 0;
else if (strcasecmp($a[1], &quot;NO&quot;)==0) return -1;
else if (strcasecmp($a[1], &quot;BAD&quot;)==0) return -2;
}else return -3;
}

// check if $string starts with $match
function iil_StartsWith($string, $match){
$len = strlen($match);
if ($len==0) return false;
if (strncmp($string, $match, $len)==0) return true;
else return false;
}

function iil_StartsWithI($string, $match){
$len = strlen($match);
if ($len==0) return false;
if (strncasecmp($string, $match, $len)==0) return true;
else return false;
}


function iil_C_Authenticate(&$conn, $user, $pass, $encChallenge){
 
  // initialize ipad, opad
  for ($i=0;$i<64;$i++){
    $ipad.=chr(0x36);
    $opad.=chr(0x5C);
  }
  // pad $pass so it's 64 bytes
  $padLen = 64 - strlen($pass);
  for ($i=0;$i<$padLen;$i++) $pass .= chr(0);
  // generate hash
  $hash = md5(iil_xor($pass,$opad).pack(&quot;H*&quot;,md5(iil_xor($pass, $ipad).base64_decode($encChallenge))));
  // generate reply
  $reply = base64_encode($user.&quot; &quot;.$hash);
 
  // send result, get reply
  fputs($conn->fp, $reply.&quot;\r\n&quot;);
  $line = iil_ReadLine($conn->fp, 1024);
 
  // process result
  if (iil_ParseResult($line)==0){
    $conn->error .= &quot;&quot;;
    $conn->errorNum = 0;
    return $conn->fp;
  }else{
    $conn->error .= 'Authentication failed (AUTH): <br />&quot;'.htmlspecialchars($line).&quot;\&quot;&quot;;
    $conn->errorNum = -2;
    return false;
  }