Weird 404 error in application.log and getting YII to ignore them? - yii

Something is access my site using this URL:
/(Yvax:%20uggc:/jjj.tbbtyr-nanylgvpf.pbz/hepuva.wf)uggc:/jjj.tbbtyr-nanylgvpf.pbz/hepuva.wf
So I get error:
[error] [exception.CHttpException.404] exception 'CHttpException'
Is it something to worry about?
How can I stop YII from reporting on this specific error and other similar 404 errors that are unwanted?

Probably just a scanner script. We get hit by these all the time. Review security, but as long as that checks out you should be fine.

Related

The CGI application did not return a valid set of HTTP errors. 502.3 - Bad Gateway: Forwarder Connection Error (ARR) on Azure ASP.NET Core App

All of a sudden we are seeing this random error / exception in our web application.
Failed to load resource: the server responded with a status of 502 (Bad Gateway).
In the Log Stream, we are seeing the following details, with specific error code as 502.3 - Bad Gateway: Forwarder Connection Error (ARR).
Also, sometimes in the browser itself we see "The CGI application did not return a valid set of HTTP errors." getting displayed.
Most of the searches for these error codes refer to "IIS / Proxy Server" configuration. But, we haven't changed any such settings.
The error happens very randomly and not specific to any user action/function. Same functionality works first and on second execution immediately after first one throws this error.
How to figure out what is causing this and how to fix?
I google this question, because the program was normal at the beginning, and the subsequent 502.3 error. After I checked the information on the Internet, I feel that it can only give us an inspiration, and it cannot solve your problem immediately.
So my suggestion is that first you browse post1 and post2 I provided.
Next, proceed to Troubleshoot according to the steps of the official documentation. Specific errors require specific analysis.

How to simulate a 500 http error on apache

I read about a lot of ideas about how to test the ErrorDocument 500 directive, but they don't work. If I put bad php code, I still get a page with my php error in it. If I create a bad htaccess file, I get the following error and not my custom error :
[an error occurred while processing this directive] The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. [an error occurred while processing this directive]
I need to raise this custom error page to ensure that it works even though most applications will manage their own 500 pages.
Thanks
PHP errors aren't 500 errors. Apache is fine. PHP has encountered the error. This can be hidden in PHP.ini, but it results in a "white screen of death" instead.
On to the .htaccess problem. The .htaccess file controls the custom error pages for your site. If Apache cannot parse the custom error pages in this file it means there are no custom error pages set to display.

Client-side error monitoring that catches 404s and other script / resource errors?

I've been looking into New Relic, BugSnag, and a few others, but no one seems to be catching 404 errors in their client-side monitoring. For example, say I have the following script tag in a given page:
<script src="//cdn.example.com/app.js1445291270"></script>
with the minor but critical typo of missing a ? after .js.
This of course returns a 404 and the script never loads.
Are there any services that would catch client-side errors like this?
You should be able to do this with Bugsnag. You can detect whether the status= 404, and use Bugsnag.notifyException() to send the error in. Hope this helps!
TrackJS error monitoring supports this use case. Here is how to add monitoring for resource loading failures.

How to debug a 404 error on apache server ( lamp )?

I came across 404 error a few times and i have difficulties in debugging this kind of problem.
What is the strategy and tools available to analyse such problems (firebug, logs...).
How to differentiate and fix the cause ?
page not existing ,wrong path , redirection and rewriting ,server problem ...
404 error code means that a file is not found for whatever reason.
Just check that the file exists and that the path you use is right.
You can analyse sent requests and received responses headers and body in your browser's developper console if you want more details about why some request failed.

CodeIgniter parse errors display but not written to log

I'm attempting to build an error handling service for my CodeIgniter apps, and everything is logged as expected except parse errors. For example,
Parse error: syntax error, unexpected T_VARIABLE in /var/www/foo/web/app/controllers/foo.php
... will output and get logged by Apache under E_ALL. All other (non-parse) errors get passed to the log_exception extension I've written in /core/MY_Exceptions.php, and show up in CI's logs with PHP 5.2.17 and 5.3.6 (MAMP). Parse errors will display in Apache's native error log, but NOT in CodeIgniter's logs – they seem to miss CodeIgniter altogether.
How can I ensure that parse errors get picked up by CI? Am I missing something obvious?
This may help you: Why is codeigniter not logging error!
If the page is failing to load because of a parse error, then it'll
never execute
error_reporting(E_ALL);
so you script will never know to output the error. Edit your php.ini
file to make sure you have:
error_reporting = E_ALL
error_log = "/path/to/some/apache/writable/file"
Hope this helps.