php-windows Digest 15 Sep 2009 12:25:39 -0000 Issue 3695
Topics (messages 29602 through 29604):
Re: [PHP-DOC] Re: [DOC-BUGS] #49547 [NEW]: Errors in the phd --help text
29602 by: Hannes Magnusson
29603 by: Richard Quadling
Re: [PHP-WEBMASTER] Idea?
29604 by: Hannes Magnusson
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
On Mon, Sep 14, 2009 at 11:06, Richard Quadling
<[email protected]> wrote:
> 2009/9/14 mike at silverorange dot com <[email protected]>:
>> 1. The --color option says it is off by default, but it was on by default
>> for me.
>
>
> In my testing, Windows XP, Windows 2003 and Windows 2008, by default,
> have no support for coloured console output (along the lines of the
> old-style ANSI.SYS for MS-DOS).
>
> I use a program called ANSICON.EXE from Jason Hood (his site is
> currently offline [1]). Full source is available when the site is up.
>
> By use of a registry entry ...
I'm not comfortable editing the registry settings when installing PhD
(doubt its even possible using the PEAR installer).
If someone knows a simple way to enable colors on Windows I'm game for it.
His bugreport is however correct, colors are enabled by default on
*nix, I however forgot to update the help text (like he said) when I
changed the defaults :)
-Hannes
--- End Message ---
--- Begin Message ---
2009/9/14 Hannes Magnusson <[email protected]>:
> On Mon, Sep 14, 2009 at 11:06, Richard Quadling
> <[email protected]> wrote:
>> 2009/9/14 mike at silverorange dot com <[email protected]>:
>>> 1. The --color option says it is off by default, but it was on by default
>>> for me.
>>
>>
>> In my testing, Windows XP, Windows 2003 and Windows 2008, by default,
>> have no support for coloured console output (along the lines of the
>> old-style ANSI.SYS for MS-DOS).
>>
>> I use a program called ANSICON.EXE from Jason Hood (his site is
>> currently offline [1]). Full source is available when the site is up.
>>
>> By use of a registry entry ...
>
> I'm not comfortable editing the registry settings when installing PhD
> (doubt its even possible using the PEAR installer).
> If someone knows a simple way to enable colors on Windows I'm game for it.
>
> His bugreport is however correct, colors are enabled by default on
> *nix, I however forgot to update the help text (like he said) when I
> changed the defaults :)
>
> -Hannes
>
You can load ANSICON.exe via several routes.
You don't have to edit the registry to load ANSICON, though the
AutoRun registry setting is a standard setting [1]. I'm doing so as
the key that is amended is one quick and easy way to get ANSICON
loaded automatically.
You can just run ANSICON manually and the shell will now support ANSI colours.
Editing the registry is possible using the REG command from the
Windows Resource ToolKit ...
REG ADD "HKLM\Software\Microsoft\Command Processor" /v AutoRun /t
REG_SZ /d "C:\Utils\ANSICon.exe -p"
And that can be exec()'d by PHP no problem, but it won't automatically
provide coloured output. That requires the ANSICon app.
So, maybe for Windows PhD should disable coloured output as standard.
Richard.
[1] http://technet.microsoft.com/en-us/library/cc779439(WS.10).aspx
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
--- End Message ---
--- Begin Message ---
On Tue, Sep 15, 2009 at 11:40, Ian Tighe <[email protected]> wrote:
> Hi
> I am using files that are mount.cif share files. My client is a samba linux
> box but acting as a client over cifs to an XP box (several in fact).
> I am descending the share recursively with opendir and readdir detecting
> files from link and of course directories before doing my processing.
> I note from a wireshark trace I am getting errors - sharing violations
> reported by XP. I would very much like to detect these events to take action
> - ignore the file for instance - but right now I have a true or false return
> for is_dir, is_file or is_link which is not very helpful during a fault
> condition such as a sharing violation which can only return false. In other
> words a sharing violation looks like a readdir saying no more files!
>
> It seems that once the error condition comes about all my reads of a
> directory and tests of type fails until I reach the end of that directory and
> all of its parent directories. This is not so good.
>
> Is it possible to bring out more error information so that I can detect these
> events. An error array as an additional overloaded argument to readdir,
> opendir (indeed any I/O) where the first element has the normal false but a
> second element has a return code for smb/cifs/file_system
> failure/error/warning condition?
>
You could create a new feature request (http://bugs.php.net), or ask
the Windows guys (CCed) :)
-Hannes
--- End Message ---