On the site I have a very strange situation. When I refresh the site (a couple of times), most of the times I get 404 errors on random files, mostly images. The 404 errors are returned by IIS I think. I don't know why. The files with 404 errors are there and directly opening by url does actually work.
You can easy reproduce to hit the refresh button on your browser and checking out the console. You will see the 404 errors like this randomly appearing.
What I have tried so far, unsuccesful
Made sure the group IIS_IUSRS have read rights on all resources
Have enabled static content compression in IIS
Disabling static content compression has a positive effect, the 404 errors are less common but still occur.
Moving images to another directory
My question
What could cause this behaviour and what can I try to do to solve this problem? I have spend many hours to figure it out myself so any help will be greatly appreciated!
My VPS provider was so kind to support me with this problem. The cause of these problems is the dynamic ip restrictions settings in IIS8. I had the restrictive setting active for max 20 requests per ip from withing 200ms. I believe this is the default setting in IIS now.
Related
I have a problem, that I can't figure out.
I made an app with CakePHP that work's perfectly fine on localhost (via XAMPP), but has strange issue on live server.
There are (obviously) many controllers in my app, and the problem is - some of them are not rendering any view whatsoever! They output neither proper content, nor any error data - simply empty page (no layout either). About half of them is working fine, and the other half - not.
I have no idea what might that be, so that's why I'm here - any ideas?
This may be an old thread, but I'm replying this as a possible answer and solutions for other people who might have the same problem.
What you should do when you have this problem is to check the error log inside /app/tmp/logs. From there you can perhaps see what cause the error.
Make sure your debug is set to 2 for all error reporting to be displayed if any. The debug can be turned on in app/Config/core.php.
From the logs, you might see the error is with the maximum memory reached. For this, you'll need to fix your code and optimize it.
Please check if your URL rewriting mod_rewrite is enabled in your live server. Some server might require you to set it up yourself.
A piece of advice, always check with your error logs, it always show you what the problems are and can help you solving it easier.
ive seen other posts on stackoverflow about this but there hasnt been a solid answer to any of the questions. so im combining the knowledge i've gathered from the other posts and rewording things to hopefully get a solid answer. suPHP is a mod that makes it so that when apache runs scripts, it runs them as the respective owner of said scripts (from my understanding), as well as other things. So my problem is that i moved a magento multisite to a new server and this server gives me odd errors when trying to reach the multisites, for example, a permissions error. It says that i cant access the files because the ownership of the files is different than the user trying to read/run them. In addition to that problem, after fixing the symlinks to be owned by the correct user, the contents of the symlinks MUST be owned by the parent store in magento or the entire thing goes down the tubes.
FYI the error im getting is the typical:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster#xxx.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
I saw some information that implied this couldn't be fixed at all. But, in addition to that, i saw another page that implied it could be fixed with the apache directive RewriteMap prg. If it can be fixed this way, can somebody please walk me through how to do that? If it's a lost cause, somebody please tell me. I've wasted a ton of time on this already and i cant afford to waste any more. Also, if there's a solution to this that i missed, please tell me. thanks guys
Correct, if you have two sites trying to run as different users but share the same code base or portions in a common directory with SuPHP enaled, it won't work. SuPHP basically ensures folders match the owner. There's a good post about it on cPanel's forums: http://forums.cpanel.net/f5/suphp-symbolic-links-reseller-account-212102.html#post873521
Updated;
Since you have root access and control all the sites on the server you can disable SuPHP as mentioned. I've personally found no real benefit of SuPHP if you own and actively manage all the sites. The purpose of SuPHP is basically to restrict what someone can do if they get access to any one of your PHP sites by limiting where they can go by user account.
Keep in mind that by disabling it, if you do have a security breach that it's common for attackers to search every writable directory and inject things like JS malware and PHP backdoor shells to your server. It means the damage could be more widespread.
Using a good web application firewall like mod_security is good and more worthwhile IMO. It can inspect POST/GET requests for SQL injections, etc. You can customize the rules, but it has a learning curve. Basically it bolts onto Apache.
I'm getting this error on a magento installation in the server logs and the site is throwing a 500 internal server error.
I haven't changed anything that I think could cause this. Does anyone know where this error is coming from and what the fix is?
Is anything mentionned in the server logs? I am willing to bet you will find your true answer there.
500 is an internal fatal error, usually permission related, but other issues can also cause this, improperly configured vhosts, improperly configured .htaccess ... and many others. Check your server logs you should have more details on the error.
What were you trying to do that caused this error to appear? I get it from time to time when I do something labor intensive. For example, I'm in the process of importing around 10k products into my Magento build and got this same error message. In this particular instance, I'd be willing to be it has to do with either your Apache timeout setting or your PHP max_execution_time setting or a combination of both. It could also possibly be your PHP max_input_time setting if your like me and trying to upload/parse a giant CSV file full of products. Don't be discouraged either if you have to play with the numbers little bit to find the right combo to make things work. I have to try 3-4 times to get mine to run successfully.
A couple posts that helped me out were Script timed out before returning headers: php.fastcgi and http://www.magentocommerce.com/boards/viewthread/74021/#t213112.
Roughly about 20% of the time when clicking on links in my website (www.slr-lens.co.uk), the site completely fails to load. I have tried removing and adding all code segments but to no avail... I've also asked the web hosts, but apparently the server is working normally.
Does anyone have any suggestions about what could cause a web page to sometimes not load? E.g. any specific lines in the php.ini?
The site uses sessions, and there's quite a lot of mysql action for each page load.
Internet explorer will say:
"Internet Explorer can't load this page"
Google chrome will say:
This web page is not avialable: Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.
Firefox will sometimes only show a blank page.
Sorry for being so vague but its a really vague problem!
Thanks
The answer (or at least a clue) likely lies within your PHP / Apache error logs.
It could be your Apache logs or you just have a bad host. Either way, it seems to load every time here (10+). Have you tried replicating this problem somewhere else?
I'm running Apache 2.046 with PHP 5.x and I am experiencing very odd behavior on a CodeIgniter app.
The frustrating thing is that it is not consistent.
Occasionally when I call up my app Apache returns nothing. I mean nada. But then I hit refresh and everything works as expected. Sometimes I have to hit "refreash" several times before the page will load. Other times it comes right up. When I started this post it was happening 80-90% of the time. Now I can't seem to make it happen. But it's been happening for several days so I have confidence in the next couple of page visits I will see it again.
This is on a development box that has very little traffic. When I do a PS I see several HTTP threads running - "top" reveals nothing un-expected (like a runaway process).
When I tail the apache access logs I don't even see a logged request when Apache returns blank. No Apache or PHP errors are being thrown.
I mention codeIgniter mostly because we're using the recommend .htaccess file with Mod Rewrite. So I wasn't sure if that was contributing to the issue. It also does not seem to be a problem with non-codeIgniter apps. That's hard to say with confidence since the issue is so inconsistent.
It does not seem to be client issue as we're seeing this happen from multiple client machines.
I can't tell if this is a server (hardware) issue, Apache issue or coding issue. Maybe it's a memory issue?
Any thoughts?
NEW INFORMATION:
IN the PHP log file I received this:
PHP Fatal error: fatal flex scanner internal error--end of buffer missed in /data/www/coreLib/codeIgniter/system/libraries/Hooks.php on line 226
Blank pages when using CI are usually caused by php errors with error messages suppressed.
Try re-enabling them and reloading.
error_reporting(E_ALL|E_WARNING)
If you suspect your Rewrite rules are the source of the problem, then crank mod_rewrite's logging level up and find out. Otherwise, the fact that everything works normally outside of your app makes this sound like it's a problem with your code or possibly the framework itself.