RE: [INTERNALS-WIN] STDIN missing.

[email protected] (Garrett Serack)
Newsgroups php.internals.win
Message-ID <BC1CAE3856F0A143808A7796D62870A30168B186@TK5EX14MBXC131.redmond.corp.microsoft.com>
I just installed PHP using the installer (something I can't ever recall doing before ;) )

I enabled the "Script Executable" and it's child "Register *.php files to open automatically with PHP") options.

This apparently sets the handler for .PHP scripts to php-win.exe (which is a GUI process, not a console one) so I assume this is the process you see in the task manager.

This would need to be set to php.exe for the script to work correctly.

From your example, I can't see how:

C:\Scripts\Reverse

Would even run the script, from the install of PHP, it doesn't appear that the PATHEXT environment variable is modified so that .PHP is a recognized extension for executables.

In the event that you actually meant:

C:\Scripts\Reverse.php

That would indeed invoke php-win.exe, but doesn't wait (again, because it's using the GUI version of PHP).

When you use:

DIR C:\ | C:\PHP5\php.exe C:\Scripts\Reverse.php

You are explicity using the cmdline version of PHP, which is why it works.

If you want to set the command line version of PHP as the default, you can change the registry key that points to the version of PHP you want to use.

Use the reg.exe tool to check the settings, and change it. First:

C:\> reg query HKEY_CLASSES_ROOT\.php

Will display something like:

HKEY_CLASSES_ROOT\.php
  (Default)    REG_SZ    PHPFile
  Content Type    REG_SZ    application/php

Look at the (Default) and use that to look up the installed handler for PHP:

reg query HKEY_CLASSES_ROOT\PHPFile\shell\open\command

('PHPFile' may be different depending on what tools you may have installed.)
This displays:

HKEY_CLASSES_ROOT\PHPFile\shell\open\command
    (Default)    REG_SZ    C:\PROGRA~1\PHP\php-win.exe "%1"

To Change the setting:

reg add HKEY_CLASSES_ROOT\PHPFile\shell\open\command /ve /t REG_SZ /d "c:\php\php.exe"  /f

Where 'c:\php\php.exe' is the path to PHP you want to have enabled.

G

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Daniel Brown
Sent: Tuesday, August 25, 2009 12:49 PM
To: [email protected]
Cc: Pierre Joye; [email protected]
Subject: Re: [INTERNALS-WIN] STDIN missing.

On Tue, Aug 25, 2009 at 14:56, Richard Quadling<[email protected]> wrote:
>
> I wish I could talk to someone at MS, just to know what is going on.
> But I'm a LONG way down the food chain for that.

    Indeed.  If only we knew *someone* who worked for Microsoft.... ;-P

--
</Daniel P. Brown>
[email protected] || [email protected]
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig

--
Windows Internals Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.