What can cause a website to not always load - php

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?

Related

The page isn’t redirecting properly error in codeigniter

I am getting a very unusual error, most of the time I can fix this The page isn’t redirecting properly very quickly as it's either something messed up with htaccess or in php script but I have looked for hours and can't find the single problem.
The page loads once with broken css and javascript files, and takes a long time to load but after that this error starts to appear and it'll only fade away when you clear the browsers cache then again the website loads for one time only before showing this error.
Some details
.htaccess file is blank
I tried loading just the welcome module only but the problem remains same.
The server has been updated so I am wondering if this may have caused this problem.
I hope you guys can help me figure out why my website is on redirection loop, I can feel it's something related with cookies but I am not sure what.
File Structure
application
cgi-bin
cronjobs
system
images
system
.htacess
index.php
test.php
Edit:
Website works flawlessly on localhost.
For future if someone stumbles upon this issue, I found out that the sessions were causing issues. I was auto loading the session library and when i removed it to test, it all started to work smoothly. So basically the main problem is with my php configuration and I have got my server guy to look into why the sessions are not working.

Getting random 404 errors in IIS PHP site

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.

Browser compatibility issues with PHP website

I have a website called www.kratosguide.com.
The site works as expected for approximately 90% of users, however, I have been getting a LOT of complaints recently that the page doesn't load completely in certain browsers such as chrome/firefox/opera.
Here is a screenshot that someone sent me of how the page loads: http://i.imgur.com/sqNX4.jpg
It appears that only the header and footer is loading and the content from index.php is not.
http://www.reddit.com/r/productivity/comments/w1y30/16_habits_you_should_do_everyday/
Here is a link that demonstrates a user stating the issue above -- (4th comment down).
My host is unable to replicate the issue on their end and they say it works fine. My friend kept refreshing his page cache and he could replicate the error but only intermittently.
Thanks in advance.
***EDIT: I forgot to mention the site runs on WordPress, also the site works fine for me in every browser, which makes it hard for me to see where the problem is coming from.
Check the console. You have some errors
Uncaught ReferenceError: jQuery is not defined - 068690ea.84e407.js:24
Probably caused by this script being called before the jquery library.
It's difficult to tell what is causing the error without being able to replicate it. I'd try to load it in various browsers and see if I can get it to do that. Then take a look at the console for any errors and inspect the DOM to see if the content even loads.
Yes, I still see the errors in the log.
Let me be clearer.
For me the web page loads and is visible 100%, but when I look at the console I see what is shown below. This is an indication you have a problem. My personal settings allow me to see the page but with different settings or plugins I would not be able to see the page. You need to fix your XSS error.
You can reproduce the problem yourself!
Download chrome (or firefox) and then load the page, look at the console, see the error.
Then fix it.
Original answer below
First step, fix these errors shown by chrome. Looks like you have a XSS error.
I saw over 1200 unused CSS element on your page. Try to optimize the amount of data a user has to download to see your website. I had similar issues with my site and I realized how much stuff users had to load to see my website.
I tested it under Firefox, Chrome, IE7+. I didn't get any issues.
You seems to be using WordPress so you might want to check the WordPress community for similar problem.

What would be the cause of server closing a connection before data was sent?

I have a cakephp (1.3.10) application that seemed to work fine, but recently I get an error page that shows "No data received" in chrome. This happens randomly on various pages and in various browsers. I googled the the error and found only unrelated information.
I haven't changed any code or upgraded the framework nor did we do any updates on the server that is running the application.
What could be the cause of this?
Is this code related, if so where can I start looking to solve it in cakephp?
Any help will be greatly appreciated.
"No data received" could mean
A problem in the web server
a PHP script dying due toe a fatal error (although I think a 200 should always be emitted... depends on the server configuration I guess).
If you're using Apache, check out its error.log first. Chances are there is something enlightening in there.
If that doesn't help, you could try logging your PHP errors into a file.
If it happens randomly it might be an issue with your script running into an timeout or using too much memory. I had this issue once with wordpress as wordpress sometimes calls an internal "cronjob" on page views from time to time.

Apache comes back with nothing

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.

Categories