• User

    Per tagliare la testa al toro ho provato a inserire come sito da cui estrarre i metatag lo stesso da cui inserisco il form e... stesso problema!


  • Super User

    Dai un'occhiata a questo topic, sembra essere lo stesso problema


  • User

    Ho guardato quel post anche se le mie competenze non mi aiutano a capire granche' :bho:

    Ho anche rifatto il debug e l'errore preciso e' questo:

    Stopped for error handler.
    #0: function AjaxRequest(url=string:"ajax.php?cmd=fetch_meta&url=http://www.dueruoteitalia.com", callback_function=string:"UpdateForm") in http://www.dueruoteitalia.com/themes/frezz/ajax.js line 11
    009: for (var i = 0; i < msxmlhttp.length; i++) {
    010: try {
    **011: req = new ****ActiveXObject(msxmlhttp[**i]);
    012: } catch (e) {
    013: req = null;


  • User

    Mi correggo ulteriormente, questo errore viene fuori anche con il sito in cui la funzione lavora correttamente, quindi pur non funzionando non credo che questi errori influiscano.
    Io non so che pesci prendere.... 😞


  • Super User

    Ho fatto un debug con greasemonkey e xmlhttprequest debug, ecco il risultato:

    POST ajax.php?cmd=fetch_meta&url=http://www.giorgiotave.it

    null

    505 (HTTP Version Not Supported)

    Date: Mon, 21 May 2007 10:25:24 GMT
    Server: NOYB
    Keep-Alive: timeout=15, max=93
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=iso-8859-1

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <HTML><HEAD>
    <TITLE>505 HTTP Version Not Supported</TITLE>
    </HEAD><BODY>
    <H1>HTTP Version Not Supported</H1>
    The server encountered an internal error or
    misconfiguration and was unable to complete
    your request.<P>
    Please contact the server administrator,
    [email][email protected][/email] and inform them of the time the error occurred,
    and anything you might have done that may have
    caused the error.<P>
    More information about this error may be available
    in the server error log.<P>
    <HR>
    <ADDRESS>Apache/1.3.33 Server at www.zubba.de Port 80</ADDRESS>
    </BODY></HTML>


  • User

    @Gorka said:

    Ho fatto un debug con greasemonkey e xmlhttprequest debug, ecco il risultato:

    POST ajax.php?cmd=fetch_meta&url=http://www.giorgiotave.it

    null

    505 (HTTP Version Not Supported)

    Date: Mon, 21 May 2007 10:25:24 GMT
    Server: NOYB
    Keep-Alive: timeout=15, max=93
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=iso-8859-1

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <HTML><HEAD>
    <TITLE>505 HTTP Version Not Supported</TITLE>
    </HEAD><BODY>
    <H1>HTTP Version Not Supported</H1>
    The server encountered an internal error or
    misconfiguration and was unable to complete
    your request.<P>
    Please contact the server administrator,
    [EMAIL="[email protected]"][email protected][/EMAIL] and inform them of the time the error occurred,
    and anything you might have done that may have
    caused the error.<P>
    More information about this error may be available
    in the server error log.<P>
    <HR>
    <ADDRESS>Apache/1.3.33 Server at www.zubba.de Port 80</ADDRESS>
    </BODY></HTML>

    Gentilissimo! 🙂
    Poiche' conosco i miei polli mi farebbe piacere che l'errore fosse quello che viene originato proprio dal server del mio provider e quindi quello che viene fuori da http://www.dueruoteitalia.com/add.php .
    Non e' che saresti cosi' gentile da fare il debug su quell'indirizzo?
    Grazie ancora


  • Super User

    POST ajax.php?cmd=fetch_meta&url=http://www.giorgiotave.it

    null

    403 (Forbidden)

    Date: Mon, 21 May 2007 13:13:25 GMT
    Server: Apache
    Content-Length: 282
    Connection: close
    Content-Type: text/html; charset=iso-8859-1

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>403 Forbidden</title>
    </head><body>
    <h1>Forbidden</h1>
    <p>You don't have permission to access /ajax.php
    on this server.</p>
    <hr>
    <address>Apache Server at www.dueruoteitalia.com Port 80</address>
    </body></html>


  • User

    Grazie, sono stato sino ad ora al telefono con il tecnico del server su cui e' hostato il mio sito e, nonostante abbia verificato direttamente che mentre eseguivo lo script con IE e Firefox uno funzionava e l'altro no, lui insiste che non puo' essere un problema di server.
    L'errore 403 esce ma i files sono tutti settati 777.... mi chiedeva il tecnico se per caso lo script fa chiamate diverse in funzione del browser utilizzato, ma veramente non mi pare (per quel poco che conosco il javascript).
    Lo script completo e' questo e la funzione incriminata e' la FetchMeta() funzione e' la seguente... altre idee? :mmm:

    [PHP]function AjaxRequest(url, callback_function) {
    var req = null;
    var msxmlhttp = new Array(
    'Msxml2.XMLHTTP.5.0',
    'Msxml2.XMLHTTP.4.0',
    'Msxml2.XMLHTTP.3.0',
    'Msxml2.XMLHTTP',
    'Microsoft.XMLHTTP');
    for (var i = 0; i < msxmlhttp.length; i++) {
    try {
    req = new ActiveXObject(msxmlhttp*);
    } catch (e) {
    req = null;
    }
    }

    if(!req && typeof XMLHttpRequest != "undefined") {
    req = new XMLHttpRequest();
    }
    if (req != null) {
    req.open("POST", url, true);
    req.onreadystatechange = function() {
    if ((req.readyState == 4) && (req.status == 200)) {
    var json = req.responseText.parseJSON();
    var callback = callback_function + '(json)';
    eval(callback);
    }
    }
    req.send(null);
    delete req;
    }
    return true;
    }

    function UpdateForm(objects) {
    document.forms['add_frm']['fetch_meta'].disabled = false;
    for (var i in objects) {
    if (i != "toJSONString") {
    if (document.forms['add_frm']) {
    document.forms['add_frm']
    .value = objects*;
    }
    }
    }
    }

    function FetchMeta() {
    var url = document.forms['add_frm']['url'].value;
    document.forms['add_frm']['fetch_meta'].disabled = true;
    AjaxRequest('ajax.php?cmd=fetch_meta&url=' + url, 'UpdateForm');
    }

    function UpdateSubCategory(objects) {
    document.getElementById(objects['div_tag']).innerHTML = objects['select_box'];
    }

    function FetchSubCategory(cat, selected_cat, div_tag) {
    document.getElementById(div_tag).innerHTML = "loading...";
    AjaxRequest('ajax.php?cmd=fetch_sub_category&cat=' + cat + "&selected_cat=" + selected_cat+ "&div_tag=" + div_tag, 'UpdateSubCategory');
    }

    function UpdatePricing(objects) {
    document.getElementById("listing_type_div").innerHTML = objects;
    }

    function FetchPricing() {
    var cat = document.forms['add_frm']['cat'].options[document.forms['add_frm']['cat'].selectedIndex].value;
    var cat1 = document.forms['add_frm']['add_cat1'].options[document.forms['add_frm']['add_cat1'].selectedIndex].value;
    var cat2 = document.forms['add_frm']['add_cat2'].options[document.forms['add_frm']['add_cat2'].selectedIndex].value;
    if (document.forms['add_frm']['periodprice']) {
    var periodprice = document.forms['add_frm']['periodprice'].options[document.forms['add_frm']['periodprice'].selectedIndex].value;
    }
    document.getElementById("listing_type_div").innerHTML = "loading...";
    AjaxRequest('ajax.php?cmd=fetch_pricing&cat=' + cat + "&cat1=" + cat1 + "&cat2=" + cat2 + "&periodprice=" + periodprice, 'UpdatePricing');
    }[/PHP]


  • User

    Ho risolto!!!! 🙂
    Aggiungendo nel file .htaccess il valore SecFilterEngine Off il problema è sparito.
    Mi piacerebbe capire come mai ma l'importante e' che ora funziona.
    Grazie della disponibilita'!


  • Super User

    Grazie a te per averci postato la soluzione al problema, che potrebbe essere d'aiuto per altri.

    Purtroppo non so spiegarti bene il motivo ma penso dipenda dai caratteri di escape presenti nei parametri passati tramite ajax