It seems that not all of my HTML page loads in som

2019-07-06 06:57发布

问题:

This is a weird one. I am not quite sure of what is going on. I don't know if it's MAMP server causing the problems or Laravel. I never seen this before.

I am using Google Chrome on my MAC OS X. And in the console I get a GET error. But when I go to networking it still shows it as an error and when I click the tabs like Response it show that nothing loaded... Even if there is content on the page. Then when I click on Headers it says the Status is 200... So good... Confused yet?

Even preview is empty... With a error message that nothing loaded.

Now if I go back to the console and I refresh it shows errors at different lines... So once it's at 74 then I refresh and I get 81 and if I refresh again it shows another number... Very strange.

Even my javascript that is loaded at the bottom of the HTML some times works other times not...

It's even more strange because it all works in Firefox. I tried emptying the cache in Chrome... Nothing works. Any ideas? Suggestions?

UPDATE

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>Yaloub</title>
    <meta name="keywords" content="Yaloub, app network"/>
    <meta name="description" content="Yaloub is a app network."/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="http://fonts.googleapis.com/css?family=Noto+Sans" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="http://localhost:8888/Yaloub/public/assets/css/style.css"/>
    <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://localhost:8888/Yaloub/public/assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://localhost:8888/Yaloub/public/assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://localhost:8888/Yaloub/public/assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="http://localhost:8888/Yaloub/public/assets/ico/apple-touch-icon-57-precomposed.png">
    <link rel="shortcut icon" href="http://localhost:8888/Yaloub/public/assets/ico/favicon.png">
</head>
<body>
    <div id="wrap">
    <!-- Navbar -->
    <div class="navbar">
            <img src="http://localhost:8888/Yaloub/public/assets/ico/logo-page.png" alt=" " style="position:absolute;"/>
            <ul class="nav pull-right">
                                                        <!--<li><a href="http://localhost:8888/Yaloub/public/user">Logged in as user</a></li>-->
                <li><a href="http://localhost:8888/Yaloub/public/user/logout">Logout</a></li>
                                </ul>
        <div style="clear:both;"></div>
    </div>
    <!-- ./ navbar -->

    <!-- Container -->
    <div class="main container">
        <!-- Notifications -->
                    <!-- ./ notifications -->

        <!-- Content -->
        <section>
  <ul id="apps">
        <li class="app">
        <div class="app-frame">
            <a href="http://localhost:8888/Yaloub/public/ebooks" class="thumbnail"><img src="http://localhost:8888/Yaloub/public/assets/img/whitepage.png" alt="Ebooks" style="width: 200px; height: 200px;"/></a>
        </div>
        <div class="app-controls">
            <ul>
                <li class="app-controls-appname">Ebooks</li><li class="app-controls-favorite"><a href="app/ebooks/favorite/add"><div><span>Favorite</span></div></a></li><li class="app-controls-right-button app-controls-settings"><a href="app/ebooks/settings"><div><span>Settings</span></div></a></li>
            </ul>
        </div>
    </li>
        <li class="app">
        <div class="app-frame">
            <a href="http://localhost:8888/Yaloub/public/videos" class="thumbnail"><img src="http://localhost:8888/Yaloub/public/assets/img/videos.png" alt="Videos" style="width: 200px; height: 200px;"/></a>
        </div>
        <div class="app-controls">
            <ul>
                <li class="app-controls-appname">Videos</li><li class="app-controls-favorite"><a href="app/videos/favorite/add"><div><span>Favorite</span></div></a></li><li class="app-controls-right-button app-controls-settings"><a href="app/videos/settings"><div><span>Settings</span></div></a></li>
            </ul>
        </div>
    </li>
        <li class="app">
        <div class="app-frame">
            <a href="http://localhost:8888/Yaloub/public/photos" class="thumbnail"><img src="http://localhost:8888/Yaloub/public/assets/img/photos.png" alt="Photos" style="width: 200px; height: 200px;"/></a>
        </div>
        <div class="app-controls">
            <ul>
                <li class="app-controls-appname">Photos</li><li class="app-controls-favorite"><a href="app/photos/favorite/add"><div><span>Favorite</span></div></a></li><li class="app-controls-right-button app-controls-settings"><a href="app/photos/settings"><div><span>Settings</span></div></a></li>
            </ul>
        </div>
    </li>
    </ul>
</section>
<section id="app-settings">
<form method="POST" action="http://localhost:8888/Yaloub/public/app/appname/settings/add" accept-charset="UTF-8">
    <input type="hidden" name="_token" value="kfVaUXWVq8HuujqEuJQeVrD5kjr1HZR4Q0YNAm0q"/>
    <fieldset>
        <label for="app-settings-name">Name:</label>
        <input tabindex="1" type="text" name="app-settings-name" id="app-settings-name" />
        <label for="app-settings-url">URL:</label>
        <input tabindex="2" type="text" name="app-settings-url" id="app-settings-url" />
        <label for="app-settings-clientid">Client id:</label>
        <input tabindex="3" type="text" name="app-settings-clientid" id="app-settings-clientid" />
        <button tabindex="4" type="submit" class="btn">Save</button>
        <button tabindex="5" class="btn">Delete</button>
    </fieldset>
</form>
</section>
        <!-- ./ content -->
        <div style="clear:both;"></div>
    </div>
    <!-- ./ container -->

    <!-- the following div is needed to make a sticky footer -->
    <div id="push"></div>
    </div>
    <!-- ./wrap -->

    <footer id="footer">
      <div class="container">
        <p class="muted credit">&copy; All right reserved to Yalub.</p>
      </div>
    </footer>
    <script src="http://localhost:8888/Yaloub/public/assets/js/mootools-core-1.4.5-full-nocompat-yc.js"></script>
    <script src="http://localhost:8888/Yaloub/public/assets/js/site.js"></script>
</body>
</html>

Here is what happens when I refresh it sends me another line error:

Here is after another refresh, and remember I did not touch the code:

回答1:

As 11digitlabs mentioned here disable Xcache from your php.ini



回答2:

Got the same happening here with a linux server. PHP 5.4.17 and apache. Mainly affecting wordpress sites and images that are fed through PHP.

The image issue I have seen many reports about it being a content-length issues.

But nothing about this affecting wordpress. The HTML is sent as chunked so can only assume a final chunk fails or is corrupt, but difficult to analyse.

The fix for me was to use setEnv downgrade-1.0 in apache for the troubled sites. Nasty, but the only thing that worked. HTML1.0 has no chunking so it did the job.



回答3:

After some terrifying debuging with this exact problem I found some issues in relation to the the laravel-datatables-package which caused apache to throw segmentation fault errors in the error_log. I documentet these problems on this github issue.

I would analyse your apache error_logs and maybe switch from eloquent querys to fluent, just for testing.