Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1027293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:13:09+00:00 2026-05-16T12:13:09+00:00

When using Aptana with PHP 5.2.3 in debug mode (using thread safe XDebug 2.1.0

  • 0

When using Aptana with PHP 5.2.3 in debug mode (using thread safe XDebug 2.1.0 for PHP 5.2 VC6) to run a simple multi-line hello world script I get some erratic behaviour on the Aptana ‘Console’ tab.

I’ve a hello_world.php script that contains the following:

<?php
$stdout = fopen('php://stdout', 'w');
fwrite($stdout, 'Hello world!');
fwrite($stdout, 'Hello world!2');
fwrite($stdout, 'Hello world!3');
fclose($stdout);
?>

My PHP debug configuration in Aptana is using php.exe from the c:\wamp\php folder, in CLI mode with XDebug as the debugger.

If I start a debug session and let my code execute straight through, I get the expected output (as I do if I run this from a command prompt).

If I step through the code however, I only see the first line (“Hello world!”) in the “Console” section of Aptana. In fact, I can avoid even seeing the first “Hello world!” by stepping quickly from the fopen() line to the first fwrite() line. If I pause for perhaps 3 to 5 seconds after stepping through the fopen(), and then run the fwrite, I will get the first “Hello world!”.

Needless to say, this is completely baffling. Please let me know if you’d like more information about my configuration, and I’ll be glad to provide it!

Cheers! Duncan

(I’m actually attempting to debug a CakePHP shell script that uses fwrite to stdout instead of echo… but I want to solve this problem first!)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:13:10+00:00Added an answer on May 16, 2026 at 12:13 pm

    I’ve found that the following does work (thanks to the first comment):

    $fp = fopen('php://output', 'w'); // Note, not: php://stdout
    fwrite($fp, 'Hello world!');
    flush();
    fwrite($fp, 'Hello world!2');
    flush();
    fwrite($fp, 'Hello world!3');
    flush();
    fclose($fp);
    
    ?>
    

    This still isn’t appearing the ‘Console’ tab in Aptana (Eclipse), just in the ‘Debug Output’ tab, but I do at least have output. The script is also accepting arguments now, which it wasn’t doing before.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm tring to debug a rails project using aptana studio 3 pluging I've run
I'm working on a php project based on Joomla! and i'm using Aptana. I'm
I'm using Aptana Studio with Pydev 1.5.3 to debug my Django applications. I use
Hello I am writing a site using Aptana Studio 3 I at this stage
Anyone know how to get rid of those line borders in Eclipse (using Aptana
I am using Aptana Studio 1.5 for PHP development. I want to use a
I am a beginner. I am using Aptana Studio for PHP. Today, I also
I'm working with Aptana 3 to build a PHP-based web app using phpfog. I
I'm using Aptana and GAE. When I run GAE launcher or run a server
I've been using Aptana 3 for awhile, mostly for HTML, CSS and PHP editing.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.