Jump to content

XaeroDegreaz

Members
  • Posts

    47
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

XaeroDegreaz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Well I wonder how other have produced Windows binaries for the pcntl extensions! I have even tried using cygwin and had no luck....
  2. Are there any windows c++ compilers that work under Linux? Or Linux compilers that are able to produce win32 binaries?
  3. Yes, I know, it's strange but there is a reason I'm doing it this way. The pcntl extensions cannot be built on Windows, so, I downloaded the Windows source distribution for PHP 5.3.1 and decided to give it a whirl building it there. The build process works fine, but it keeps producing Unix binaries after the make process (even though I am using a Windows source download). I was wondering how I could get the build process to produce Windows binaries under Linux. I'm sure it's possible, but I just don't know how to make it work. Any help at all would be greatly appreciated Thanks for the fast reply btw!
  4. Perhaps the tuesday cookie has already been set once and still resides in your cookies (perhaps from another testing of the script?) Try clearing your cookies.
  5. Nevermind guys, it's not that big of a deal. Since I seemed to fix my original problem, I'll go ahead and mark this as solved. Thanks for your guys' effort..
  6. I tried that, however, I get the NOTICE that those constants are undefined. [07-Jun-2009 04:24:57] PHP Notice: Use of undefined constant STDIN - assumed 'STDIN' in D:\...ExtensionManager.php on line 36 [07-Jun-2009 04:24:57] PHP Notice: Use of undefined constant STDOUT - assumed 'STDOUT' in D:\...ExtensionManager.php on line 36 [07-Jun-2009 04:24:57] PHP Notice: Use of undefined constant STDERR - assumed 'STDERR' in D:\...ExtensionManager.php on line 36
  7. I trouble shooted all the way through the code and finally came to the conclusion that stdout was the culprit. After juggling around the code, I can get it to work if I don't fclose stdout. It seems as though you cannot close stdout if you are gonna echo more text to screen? Is that what it is?? $out = fopen("php://stdout", "w"); $in = fopen("php://stdin", "r"); fwrite($out, "Which project should I launch? [blank = $defaultExtension]: "); $ProjectName = trim(fgets($in)); //# This Logger will print to screen just fine Logger::log(__CLASS__, "Testing: $ProjectName / ".$list[(int)$ProjectName]); fclose($out); //fclose($in); //# If I put the logger here, however, the CLI will quit. It is a simple echoing class, outlined below. //Logger::log(__CLASS__, "Testing: $ProjectName / ".$list[(int)$ProjectName]); $tst = new $list[(int)$ProjectName](); Logger.php <?php Class Logger { static public function log($class, $message, $die=false) { if($die) { print("# $class (FATAL): $message\n"); while(true){}; exit(); } print("# $class\t: $message\n"); } } ?> See, nothing fancy. I'm happy to have found the cause of my original problem, but now I'm faced with another problem. It takes a few seconds to close the CLI on my own now. It used to be instant. I assume because the CLI is trying to close STDOUT? Is there a way past this?
  8. Welcome to the PHP family, an everlasting quest of finding new ways to make computers do your bidding
  9. http://sourceforge.net/forum/forum.php?thread_id=3176187&forum_id=81620 3rd message down: http://sourceforge.net/forum/message.php?msg_id=7090445
  10. It runs all the way throgh to the return statement, but it seems to dislike outputing code into the console in that method, for some reason. This project is actually pretty large and I have been coding it myself for several months now. I just decided for my next release that I would like to have the startup a little more interactive by allowing users to create a project through the console (which oddly enough I'm using stdin for user input control and it works for the project creator) and to also allow them to choose which extension they would like to run. It's open source and available at https://launchpad.net/smartsocket However, the current additions that I am doing are not yet pushed to the repository.
  11. That is a shorthand way of writing an if statement.. http://www.tech-recipes.com/rx/288/php-if-statement-syntax/ http://www.scottklarr.com/topic/446/shorthand-php-if-statement-without-the-else-notation/ $variable = (statement) ? "return if true" : "return if false"; //# Compared to if(statement) { $variable = "return this if true"; } else { $variable = "return this if false"; }
  12. Nothing is foolproof, I was just giving him a concept to run with.
  13. Try this King. Contents of "a.php": Hello, this message is being served from a.php!<br/> Contents of "b.php": Hello, this message here is from b.php!<br/> Contents of index.php <?php echo("This will always be at the top.<br/>"); //# This will dynamically include the file in the querystring "page". Example index.php?page=a or ?page=b include($_GET['page'].".php"); echo("This will always be at the bottom.<br/>"); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.