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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 532k
  • Answers 532k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer First, you're going to want to set the tag property… May 17, 2026 at 12:10 am
  • Editorial Team
    Editorial Team added an answer I suppose you are referring to a WiFi Access Point… May 17, 2026 at 12:10 am
  • Editorial Team
    Editorial Team added an answer I needed to have a custom button background, here's how… May 17, 2026 at 12:10 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

We are currently using Aptana for PHP and Eclipse for Java. While Aptana is
I am a beginner. I am using Aptana Studio for PHP. Today, I also
I am using Aptana Studio 1.5 for PHP development. I want to use a
While using Aptana and Eclipse for the first time in my programming life for
I'm using Aptana Cloud without root access. WORKS: * * * * * /usr/sfw/bin/wget
A few months ago, I was working on a PHP project in Aptana Studio.
I'm using Aptana plugin for eclipse, but it doesn't parse included js file when
Using PHP, I'm trying to give each specific text its own variable. I believe
I'm in the process of creating a PHP site. It uses multiple PHP classes,
I wonder if anyone could please help me I have been using HTML tidy

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.