If you manually call ob_start() at the beginning of your script, you might notice that you are unable to use phpsh. By commenting it out, I was able to fix the issue.

I don’t think it technically hangs, it just sits there with the data in a buffer waiting to be flushed.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
 

One Response to ob_start() causes phpsh to hang, sort of

  1. tayfun says:

    Can’t say how grateful I am for this post. I have been struggling the whole day trying to find the problem. First the select.poll() problem on the iMac and then this.

    I went down another solution because I didn’t want to comment out ob_start in the code. I don’t like changing the production code just to be able to use phpsh so I added ob_end_flush() to the configuration file at /etc/phpsh/rc.php

    Cheers

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>