406 Not Accepable Error

Status
Not open for further replies.

halfwolf

New Member
Messages
9
Reaction score
0
Points
1
I'm using e107 CMS, and am trying to troubleshoot an issue I have posting a news article with an e107 representative. As part of this process, I have renamed .htaccess at [public_html] to .htaccess_old and now I am receiving a 406 error with the following message:
Not Acceptable
An appropriate representation of the requested resource /e107_admin/newspost.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.
I have tried enabling PHP error logging and no log has been generated, and the fix here and does not work, any ideas?
For reference the the problem being troubleshooted: e107 Github Issue #1021
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
I have tried enabling PHP error logging and no log has been generated...
how did you "enable" PHP error logging (add errors to log file) in your x10hosting's free-hosting account ?

I assume you are not 'seeing' a file name of [ error_log ] in folder [ public_html ]

this is a server error - not a PHP error --> [ An appropriate representation of the requested resource /e107_admin/newspost.php could not be found on this server. ]
 
Last edited:

tonynadi

Member
Messages
41
Reaction score
1
Points
6
What's going on here, is that there is a default htaccess rule trying to say that there IS a file to be served which you request that URL, but that it is NOT a file that apache is WILLING to send you. Usually, this only occurs if your browser demands a certain type of response, which the host cannot provide (like HTTPS if you don't have a Cert installed)

I'd also suggest taking a closer look at these PHP errors:

  1. Possible break in URL handling:
    • Notice: Undefined offset: 1, Line 54 of [html_directory]/e107_handlers/bbcode_handler.php(388) : eval()'d code
  2. Long line of failed constant definitions, which can have unknown implications:
    • Notice: Constant USERIP already defined, Line 1649 of [html_directory]/class2.php
  3. Notice: Trying to get property of non-object, Line 716 of [html_directory]/page.php
There are a laundry list of PHP Notices. Some PHP Notices are no big deal, but most of these are not "no big deal."
  • Undefined index or offset, means something tried to access a member of an object or array, that didn't exists. Normally, that means there's a mod, library, or version mismatch somewhere.
  • Undefined variables, Use of undefined constant, Constant already defined; these errors mean that there are whole variables and objects which should exist but don't, and others that are trying to be created but can't.
  • I would be shocked if this code would ever worked.
  • I would be appalled if developers just launched with all of these notices in production code.
 

halfwolf

New Member
Messages
9
Reaction score
0
Points
1
What's going on here, is that there is a default htaccess rule trying to say that there IS a file to be served which you request that URL, but that it is NOT a file that apache is WILLING to send you.
Are you referring to the 406 error, or the original issue being worked on with e107? Because the debug info you refer to was taken prior to the troubleshooting that caused the 406 error.
  • I would be shocked if this code would ever worked.
  • I would be appalled if developers just launched with all of these notices in production code.
e107 v2 (the version I'm using) is in beta and is still being developed.
that 'log' is for PHP errors and will NOT log server errors
Ah, okay, thank you for the clarification. Do you you know if it would be possible to obtain the server error log?
 

halfwolf

New Member
Messages
9
Reaction score
0
Points
1
Is it possible to at least get the information regarding this error?
 

halfwolf

New Member
Messages
9
Reaction score
0
Points
1
So it turns out that the 406 error was the original cause of my issue and because there was no defined error page for it, I was redirected to the home page. So, does anyone have any ideas how to fix this error?
 
Status
Not open for further replies.
Top