Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cropped response content #5

Open
hugdx opened this issue Aug 14, 2016 · 1 comment
Open

cropped response content #5

hugdx opened this issue Aug 14, 2016 · 1 comment

Comments

@hugdx
Copy link

hugdx commented Aug 14, 2016

Hi,
i am going to run lessjs in v8. this is my php code:

if( !function_exists('xh_pre')){
    function xh_pre($sHeader, $Message = ""){?>
        <pre>
            <style type="text/css">pre.xh_debug{border: 1px solid #ccc;padding: 3px;margin: 3px;}pre.xh_debug>h4{border-bottom: 1px solid #bbb;margin-top: 5px;margin-bottom: 5px;background-color: #ccc;color: #000;}pre.xh_debug>h4>span{ cursor: pointer;}</style><script>function xh_pre(oEle){ if( oEle.parentNode.parentNode.children[1] == undefined || oEle.parentNode.parentNode.children[1].tagName.toLowerCase() != 'div' ){return ;} var display = oEle.parentNode.parentNode.children[1].style.display =='none'? 'block':'none'; oEle.parentNode.parentNode.children[1].style.display = display; oEle.innerHTML = display=='none' ? '[ + ]':'[ - ]'; }</script>
            <pre class="xh_debug">
                <h4> <span onclick='xh_pre(this)'>[ - ]</span> <?php echo $sHeader; ?> </h4>
                <div><?php echo htmlspecialchars($Message); ?></div>
            </pre>
        </pre>
    <?php
    }
}

$context = new JS\Context;

$js = file_get_contents('js/less-v8.js');
xh_pre('$js', $js);
$b = $context->evaluate($js);
xh_pre('$b', $b);


$js = file_get_contents('js/process.js');
xh_pre('$js', $js);
$b = $context->evaluate($js);
xh_pre('$b', $b);
var_dump($b);

js/less-v8.js
https://gist.github.com/hugdx/ce73ddd7a64fa0a332c03a2a4ee6a7d9

js/process.js
https://gist.github.com/hugdx/9c54707435e576188d2d09ff4d13eb65

when i run above script,, response was cropped.
screen

full html response after run: https://gist.github.com/hugdx/1f2625b7379032c4c2dbebb81b98abcb

it should be like this
screen2
(i added more phpinfo() to end of php file to get above image)

i am running: php7-fpm, nginx
Thanks

@hugdx hugdx changed the title dropped response content cropped response content Aug 14, 2016
@hugdx
Copy link
Author

hugdx commented Aug 15, 2016

This is log of nginx

2016/08/13 01:32:03 [error] 64980#0: *3 readv() failed (104: Connection reset by peer) while reading upstream, client: 127.0.0.1, server: *****.***, request: "GET /index.php?m=true HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/****.sock:", host: "*****.***"

i think may be it came from PHP-CPP, because i got same issue before with PHP-CPP(for php5-fpm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant