Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Unable to flush output to console in PDT 2.0
Unable to flush output to console in PDT 2.0 [message #91452] Fri, 23 January 2009 01:17 Go to next message
Josef Haydn is currently offline Josef HaydnFriend
Messages: 1
Registered: July 2009
Junior Member
Hi! First congrats for releasing 2.0, really love the improvements.

One thing that is bothering me, though:

The only way I can get "dynamic" output of a php script (via echo/flush)
is when I "Run as Webpage". Since all my php development is not for web
applications, but command line scripts, I would like to see output
immediately like I am used to from running directly in a shell.
I have already set all parameters in php.ini

output_buffering = Off
implicit_flush = On

but as I said this only works for running the script in PDT as a webpage.
Of course I updated the correct php.inis (both for the local webserver
and the php cli), so this is not the problem.

Whenever I choose "Run as Script" or "Debug as Script" all output goes
to the PDT Windows "Debug Output" and "Browser Output" and in both of
these Windows the output is delayed (buffered).

How can I get the good old shell behaviour I am used to?

Also, I wonder why there is a window called console, but no output
whatsoever
from my script goes there?

I would be very grateful for any help.

Thanks, Josef
Re: Unable to flush output to console in PDT 2.0 [message #91555 is a reply to message #91452] Fri, 23 January 2009 10:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: juice.hi.makni.htnet.hr

Josef Haydn wrote:
> One thing that is bothering me, though:
<snip>

I have the exact same problem. I developed a reporting application which
works in CLI. Assistance would be appreciated.

--
Vozdra! Ivan [Juice]
I am a marxist of the Groucho variety.
Re: Unable to flush output to console in PDT 2.0 [message #643759 is a reply to message #91452] Wed, 08 December 2010 08:09 Go to previous message
Maloupi  is currently offline Maloupi Friend
Messages: 1
Registered: December 2010
Junior Member
Just add this to flush to console :

@ob_flush();
@flush();
@ob_end_flush();
Previous Topic:Remove path from linked project in include path
Next Topic:Eclipse Key Settings for Tab Navigation
Goto Forum:
  


Current Time: Sat Dec 20 15:20:56 GMT 2014

Powered by FUDForum. Page generated in 0.01658 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software