Chat not working and firebug isn't helping - php

Clearly I must be doing something wrong with firebug because when I went to inspect my code I could not see any errors on anything. I know my code is not perfect, mainly because its an ajax chat and there's no chat going on. Maybe I'm utilizing it wrong, but I checked "All", "errors" and "warnings" for my website page which is here and I got nothing returned. I have just started using firebug as well as programming as a whole so Im sure I'm missing something. It would be very grateful for any tips or pointers on what I could do to be better.

If you look on the network tab, and try to add a login, says your php script is missing:
"NetworkError: 404 Not Found - http://www.entrilab.com/chatroom/php/ajax.php?action=login"

Related

PHP 404 and 406 error while using jquery ajax

I'm going to be mad with this problem. It's really weird that how I can explain.
I was doing jquery GET ajax request to a php file to submit comment in my website. The weird thing is I get the following error for some comments(not all) in the response:
Not Acceptable
An appropriate representation of the requested resource /ajax.php could not be found on this server.
Additionally, a 406 Not Acceptable error was encountered while trying to use an ErrorDocument to handle the request.
The error occurs only for some comments. I get this error while I was testing in live server whether the comment system works or not and checking TTFB in chrome developer tools. In my local server with xampp everything works fine and nice.
Now it's time to say the weirdest thing. The error occurs for comment "sdfgsdfg"; I was just randomly making comments to test and I get the error for this comment.
And I get the same error for another similar comment "sdfkjlkjlsdf". I can not test all comments in the world!
But works fine for comments like "fkjlkjf", "fghsdkjfdksfgh", etc. No one's going to add a comment like "sdfgsdfg" in my website but I need to fix this as well.
One more thing is I get the same error even when I go directly to the ajax page with some comments but for other comments everything works fine. Do not say that I didn't search online for this problem and couldn't find any solution.

CakePHP not rendering views for some controllers on live server

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.

Why a Dojo app could be trying to retrieve files erroneously from googleapis in Firefox and not in Chrome?

I'm maintaining an old PHP app that is using Dojo. On Chrome all load well but on Firefox four "404 Not Found" error happened in a loop. The error happens while Firefox try to get the following files:
http://ajax.googleapis.com/ajax/libs/dojo/1.5.1/src/namespaces/dojo.js
http://ajax.googleapis.com/ajax/libs/dojo/1.5.1/src/namespaces.js
http://ajax.googleapis.com/ajax/libs/dojo/1.5.1/src/__package__.js
http://ajax.googleapis.com/ajax/libs/dojo/1.5.1/src.js
I said a loop because after the last error, Firefox try to get the first one again, then the second one again and so on infinitely.
What can be causing such estrange behavior?
I know that this could sound odd, but after disable the Awesome Screenshot Plus Firefox Add-On the problem disappear.
I get to this solution because beside this strange problem, I saw some request to superfish.com while accessing to the pages of this application, and that hasn't sense. Some guys over there said that such requests to superfish.com could related with the presence of some Add-On, then, I begin to disable Add-On until find out what was the problematic Add-On.
I hope this can help some body that get in my same situation.

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.

Dead Button on Web Page (JavaScript/HTML)

Does anyone know why a button would stop working? There's an onclick javascript event attached to it, and when I click it, I don't see the alert saying that it has fired. For all intents and purposes, it's dead.
What I am asking is what are some of the causes of this?
I had this happen on a seperate section of the same page, and found I had a curly brace missing, and I have gone through the code where the broken button resides and there is not an issue with the curly braces. I'm not missing semicolons either. I know you all will want to see code, but all I am asking about is if someone has had this happen and what was the cause or what were the causes of it happening.
I've already used http://www.javascriptlint.com to comb through the code.
Thanks,
Waddler.
This happens in some browsers as they are unable to understand certain versions of javascript. This could be a browser workaround issue. Try testing in multiple browsers.
Javascript has a tendency to stop working when it encounters an error. You may have an error on your page that's not directly related to the code that's no longer running but is preventing it from ever being executed.
You should install a tool like Firebug in Firefox or use one of the other browser's developer's tools. In firebug, if you run your page with the console open you can see a log of any javascript errors that are encountered and find out if that's the case. It also allows you to debug the code by setting a breakpoint and following the execution line-by-line and find out if something's not happening the way you expect.
You didn't post any code snippets, so it's hard to help when you don't show us anything.
Only advice I can give you: If you are in Chrome or FireFox, Press Ctrl+Shift+J to pull up the error console in order to see what the error is.

Categories