Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
326 views
in Technique[技术] by (71.8m points)

php - site is called twice?

My Problem is, that my php site is called twice. But i don't know why. in my access-log i also get two entries if i reload:

127.0.0.12 - - [13/Oct/2010:20:41:56 +0200] "POST /index.php HTTP/1.1" 200 1493 "http://mkw-testing/index.php" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7"
127.0.0.12 - - [13/Oct/2010:20:41:57 +0200] "GET /favicon.ico HTTP/1.1" 200 1498 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7"

my error.log shows:

[Wed Oct 13 21:08:35 2010] [debug] mod_deflate.c(615): [client 127.0.0.12] Zlib: Compressed 2766 to 1067 : URL /index.php
[Wed Oct 13 21:08:35 2010] [debug] mod_deflate.c(615): [client 127.0.0.12] Zlib: Compressed 2743 to 1038 : URL /index.php/favicon.ico

what can i do? i don't have any redirects, reloads aso. in javascript code.

thx4help

might there be a problem with cookies?

shell i use htaccess file to be get the site is called only one time?

UPDATE

independend of the acces log is my site obviously called twice!! fact is, if i print out a index, which is incremented one point every call, the displayed site shows only odd numbers. so it makes a step of two instead of one. the increment function is NOT called twice in the code. and if i print the index to a textfile i get every number, not only the odd ones. .... i don't know what to do :-S, where to search, what to debug ....

here my html:

<html> 
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <link rel="icon" href="favicon.ico" type="image/x-icon"> 
        <title>Testsuite</title> 

        <style type="text/css"> 
            ...

        </style> 

    </head> 
    <body> 
<!--script type="text/javascript">alert("go home!");</script--> 
<p style="font-size: smaller; color: #555"> 
Testcases ID: 75<br> 
Verbleibend: 94.5 % noch zu checken...<br> 
</p> 

<div id="action"> 
<h2>Suchprofile</h2> 
<p> 
    Screen number: B01 (4)<br> 
    Pfad: /search/type<br><br> 
</p> 
</div> 

<h2></h2> 

<form name="testsuite" action="/index.php" method="POST"> 
    <p style="width: 650px;"> 
        <span style="color: gray">Ausgangassituation:</span> Der User befindet sich auf der /search/type Seite. <br> 
        <span style="color: gray">Eingabe:</span> Der User klickt auf ?Dieses Suchprofil speichern?.         <br><br> 
        Reaktionen
        <input type="hidden" name="id_testcase" value="75" /> 
    </p> 
    <table width="650" border="1" cellspacing="0" cellpadding="0" > 
            <tr> 
            <td>Es &ouml;ffnet sich ein Eingabefeld </td> 
            <td class="checkbox"><input type="checkbox" name="requirements[]" value="103" /></td> 
        </tr> 
            <tr> 
            <td>Rechts neben dem Eingabefeld wird ein Plus-Symbol angezeigt.</td> 
            <td class="checkbox"><input type="checkbox" name="requirements[]" value="104" /></td> 
        </tr> 
        </table> 

    <br> 
    <div style="border: 1px dashed #ccc; width: 650px; background-color: #ddd"> 
    <input type="radio" name="action" value="skip" id="skip" /><label for="skip">Ignorieren</label><br> 
    <input type="radio" name="action" value="store" id="store" checked/><label for="store">Speichern</label><br> 
    <br> 
    <center> 
        <input type="submit" id="submitter" value="weiter" /> 
    </center> 
    </div> 
</form> 




    </body> 
</html>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Your site is called twice indeed, but your index page is only called once. The other request is looking for favicon.ico, i.e. the icon your browser will display in the tab/window your page resides in.

EDIT: @TokenMacGuy's comment below is probably right on the money.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...