I want to know whenever a page is throwing an error exception (500 server error). Send an email or something.
Is there a magento module or PHP module that achieves this?
Thanks!
If server is down, your web content won't be served. This includes Magento as well since it's php application.
The best way would be
check your logs
use other monitoring tools
Related:
Nginx bad gateway, how to notify
https://askubuntu.com/questions/9107/what-tools-do-you-use-to-monitor-a-web-server
Related
I'm trying to hoost a website on Microsoft Azure and I did it. But when I enter in my website to a .php page the browser answer with the next error message: "The page cannot be displayed because an internal server error has occurred."
Before that, it returned a 500 error code, but searching the internet I tried to configure de Handler Mappings option (I dont know if I did it good or not, but now that is the new error message).
Is there any required configuration I have to do in order to make .php pages work? I have the "shared" payment plan, Do I need a better payment plan in other to do it?
Thank you!
When I knew there wasnt any extra configuration to run PHP I realized that the only one thing I changed was the Handler Mapping options, so I disabled it and tried with a simple phpinfo() in a index.php .
Exactly, the error was a bad php code. Thank you very much.
NOTE: Other person said me how to get logs for php 500 errors, you can find how to do it HERE.
Ensure that PHP is enabled for you Azure Web App. Go to the Web App in the Azure Portal, click Settings and then Application Settings. There is a dropdown labeled PHP version. Make sure it is not set to "Off" (select your preferred version). Then select Save.
i have a really weird problem on a typo3 site.
The site currently runs on Typo3 4.6.6 (yeah i know we are in the process of upgrading it to 6.2 LTS)
In the backend we have 3 separate pages. The webspace where this site runs was currently upgraded to PHP 5.5. Nothing else has changed (as far as we know)
The problem is that on certain pages we get redirected to a https version of the same page, although the link is a http link.
See for instance here: http://www.phd-cell-signaling.at/home.html
If you open this it loads fine. But as soon as you click on a (http) link on the site, you get redirected to an https version hence the browser doesn't load all the stuff included via http (stylesheets for instance). But when you then delete the "s" from the address bar and hit enter you don't get redirected. And this is something i don't really understand.
And if that'd be a general issue shouldn't the other pages in the same typo3 environment also be affected? Or am i missing something here.
Since I'm not that familiar with typo3 it would be greatly appreciated if somebody could link me in the right direction where the problem could be.
We use realURL for example. But I checked the configuration i found and it doesn't appear to do anything that causes the redirect.
I also checked the typoscript configuration of all the pages in the backend with no success.
Are there any other plugins that might cause something like this?
Any help greatly appreciated.
When you follow a link on the page you posted, then the webserver returns the statuscode 301 (moved permanently) with the new location for that page (which is the requested page with the HTTPS scheme).
When TYPO3 is properly configured for SSL usage for single pages (so a backend user can use "Choose protocol" selectbox in the backend), then it already renders affected links with the proper scheme.
Your problem described can have multiple reasons. Please check the following:
Inspect the .htaccess file in the root directory of the TYPO3 website for any scheme redirects
Check if the webserver itself has configured scheme redirects for that virtual host
Goto the TYPO3 extension manager and search for local installed HTTPS or SSL redirection extensions
I have a php website using symfony2 framework .I wanted to know what would be the best method to trace incoming request on production server in order to troubleshoot client issues .The only way that i know of is using php log file in C:Windows/Temp directory .Is there any other way of tracing request and troubleshooting error with respect to such request .all the request to website are https not sure fiddler can help me in this scenario .Please let me know your feedback on the same .
Thanks
There are more than on way to log client requests.
First, Apache will log incoming requests in the /var/log/www/access.log
Secondly, Symfony has its own logging enabled by default available in app/logs/prod.log
Thirdly, you can implement client side logging and logging with monolog , example : Javascript errors => send ajax request to log endpoint => log with monolog action
Now, on what type of OS will your site run ? You speak about Windows Temp directory, will your site be hosted on Windows or UNIX servers ? configurations and available tools will then be different.
I am currently working on some project where I plan to do it via GrayLog2 (as #Christophe suggested in a 3rd solution).
I ran some local trials and it seems more than capable of logging just anything.
I'm having some trouble with a drupal page. The website is loading and nothing is out of the ordinarty. But when you load the page with Google Chrome development shizzle (when you press F12) and put it on Network and then reload the page, you see that the first thing that happens is receive an 404 error.
It's not that big of a deal but our monitoring system says the website is offline because of this.
Does anyone knows what is going on? I have absolutely no idea why this is happening.
I'm running into this exact problem with a D7 site on a new server that has PHP 5.5.9 installed - the page loads but the HTTP header says "HTTP/1.1 404 Not Found" for all pages but the homepage. If I work out a solution I'll post it here.
Update: It turned out my problem was that mod_rewrite was not enabled, once I enabled it the site started working correctly.
Drupal allows customizing 404-403 error pages. Probably, your site (by some reason) displays content on 403/404 pages.
At first, clear cache (using web ui or drush).
This can be 1-page issue (check /user/login, admin pages, node pages). Maybe, only your front page is not found.
If this is not 1-page issue, check and disable customerror module (if you has one installed).
I am developing a website in php.
when a user types a page which is not in my site, i want users to redirect to a page with an error message.
how can i identify such things and how can i do this??
Thanks.
If you're using Apache web server, you get this functionality for free. No need to implement it yourself. If the web server cannot find an resource it sends the client an HTTP 404 error (not found). Actually, pretty much any web server that correctly implements HTTP (1.0 or 1.1) will behave this way. Additionally, in Apache, you can customize the 404 page.
If you're using Apache, here's instructions:
http://www.thesitewizard.com/archive/custom404.shtml
This is not really a php feature, but more of a feature of your web server. In IIS you can configure the error page to go to a custom url. In apache i think you can usr mod_rewrite to achieve the same thing
Other than what others said this might be of some help too "Custom 404 Error" if you are using Apache.
If some script is launched on all of your pages (it can me unit, which is always included) you can make a check there. You should write there all of your available pages and if the required page is not in the list - you can show person, that he/she was wrong.
Sometimes the list of pages is jept in database. Most CMS-systems are based on that.