Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

Şu anda bakım nedeniyle sitemiz kısıtlı işlevsellik sunmaktadır. Mevcut makaleler sorununuzu çözmediyse ve bize soru sormak isterseniz Twitter’da @FirefoxSupport hesabından ve Reddit’teki /r/firefox subreddit'inden destek gönüllülerimize ulaşabilirsiniz.

Mozilla Destek’te Ara

Destek dolandırıcılığından kaçının. Mozilla sizden asla bir telefon numarasını aramanızı, mesaj göndermenizi veya kişisel bilgilerinizi paylaşmanızı istemez. Şüpheli durumları “Kötüye kullanım bildir” seçeneğini kullanarak bildirebilirsiniz.

Daha Fazlasını Öğren

Error accessing localhost

  • 6 yanıt
  • 2 kişi bu sorunu yaşıyor
  • 12 gösterim
  • Son yanıtı yazan: shrdlu1497

more options

I am trying to access a database on my PC using Firefox and PHP.

The Javascript code I am using is

xmlHttp=new XMLHttpRequest();

var url = 'http://Localhost:8080/Library/dbRequest.php/';

xmlHttp.open("GET",url,false);

xmlHttp.send(null); (this is line 68)

I get the error:

Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: [localhost] :: sendQuery :: line 68" data: no]

I have all wampserver services running

The Javascript and php code files are in c:\wamp\www\Library

Thanks in advance

I am trying to access a database on my PC using Firefox and PHP. The Javascript code I am using is xmlHttp=new XMLHttpRequest(); var url = 'http://Localhost:8080/Library/dbRequest.php/'; xmlHttp.open("GET",url,false); xmlHttp.send(null); (this is line 68) I get the error: Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: [localhost] :: sendQuery :: line 68" data: no] I have all wampserver services running The Javascript and php code files are in c:\wamp\www\Library Thanks in advance

Tüm Yanıtlar (6)

more options

Firefox has restricted use of synchronous XMLHttpRequest in some cases. I don't know whether there is a good page summarizing the changes, so I'm not sure whether your example is affected by them. Could you try setting async to true? I realize this requires other code changes, so perhaps wait for other comments.

more options

I've tried synchronous/asynchronous. Nothing seems to work. I must be missing something obvious. Does anyone have an example of using JS and PHP with the current version of Firefox? Thanks

more options

Is there anything relevant in the Error Console (Ctrl+Shift+j)?

Is the requesting page located on the identical hostname and port number?

more options

The error console message is

Timestamp: 2012-06-26 11:40:55 Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/Library/dbfuncs.js :: sendQuery :: line 69" data: no]

This is all running on my PC using Wampserver

more options

I think Firefox might consider this a cross-site request if you are running your script on port 80 and sending a request to port 8080. Is that necessary? There is a mechanism for permitting such requests, as described in this article: HTTP access control (CORS) - MDN.

more options

I'm not trying to do a cross-site request. I've tried using

'http://Localhost:8080/Library/dbRequest.php/' and

'http://Localhost:80/Library/dbRequest.php/'

but I still get the same error.

If I leave out the 'http://Localhost:8080/ part I do get a cross-site error 8012.

It's very frustrating because I used to be able to do everything I want but now I can't.

Thanks for help.