Re: [PHP] System errno in PHP

2008-02-25 Thread Daniel Brown
On Sun, Feb 24, 2008 at 10:22 AM, Michal Maras <[EMAIL PROTECTED]> wrote: > Hi > > Thank you for answer, but I do not understand. > How can I use this class Errno after unsuccessful fopen? > I want to get the number, for example 13 if there is not enough permissions > to open file. > It is

Re: [PHP] System errno in PHP

2008-02-24 Thread Michal Maras
Hi Thank you for answer, but I do not understand. How can I use this class Errno after unsuccessful fopen? I want to get the number, for example 13 if there is not enough permissions to open file. It is not problem for me that script will be no portable, it is only for AIX. By On 22/02/2008,

Re: [PHP] System errno in PHP

2008-02-22 Thread Ravi Menon
Hi, I also ran into the same issue with file and socket apis, and for now, I just hack it like ( for linux 2.6 systems ): class Errno { const EINTR= 4; const EIO = 5; const EINVAL = 22; const ENODATA = 61; const EBADMSG = 74; const EOPNOTSUPP =

Re: [PHP] System errno in PHP

2008-02-21 Thread Richard Lynch
On Wed, February 20, 2008 2:56 am, Michal Maras wrote: > I have read http://php.net/fopen from top to bottom, but I could not > find > how to get system error number. > With set_error_handler I can get string for example > > fopen(hmc_configuration.cfg) > [function.fopen

Re: [PHP] System errno in PHP

2008-02-20 Thread Michal Maras
Hi Hmm.. I know I can check such sings as if file exists or has right permission before fopen. But it does not mean that file will still exists with right permission a moment later when fopen will be issued. And I can't check everything. I can't image how to check whether file is locked, or if i

Re: [PHP] System errno in PHP

2008-02-20 Thread Stut
Michal Maras wrote: I have read http://php.net/fopen from top to bottom, but I could not find how to get system error number. With set_error_handler I can get string for example fopen(hmc_configuration.cfg) [function.fopen]: failed

Re: [PHP] System errno in PHP

2008-02-20 Thread Michal Maras
Hello Nick I have read http://php.net/fopen from top to bottom, but I could not find how to get system error number. With set_error_handler I can get string for example fopen(hmc_configuration.cfg) [function.fopen]: failed to open st

Re: [PHP] System errno in PHP

2008-02-19 Thread Richard Lynch
PHP catches all thsoe and prints nifty error message. I presume the error number is in the guts somewhere, and could be exposed easily enough if you worked at it... But I don't think there is any kind of variable today with it in there. php_errmsg used to have the error message in it, but that d

Re: [PHP] System errno in PHP

2008-02-19 Thread Richard Lynch
On Tue, February 19, 2008 7:13 am, Michal Maras wrote: > Coud somebody tell me if it is possible to get integer value of > variable > which name in C is errno end in perl $!. > I am PHP beginner so I am sorry if question is 'stupid'. If you use exec() you can get that as a returned value for the

Re: [PHP] System errno in PHP

2008-02-19 Thread Nick Stinemates
Michal Maras wrote: > I am now using filesystem functions fopen, fread, fclose, ... > > On 19/02/2008, Stut <[EMAIL PROTECTED]> wrote: > >> Michal Maras wrote: >> >>> Coud somebody tell me if it is possible to get integer value of >>> >> variable >> >>> which name in C is errno

Re: [PHP] System errno in PHP

2008-02-19 Thread Michal Maras
I am now using filesystem functions fopen, fread, fclose, ... On 19/02/2008, Stut <[EMAIL PROTECTED]> wrote: > > Michal Maras wrote: > > Coud somebody tell me if it is possible to get integer value of > variable > > which name in C is errno end in perl $!. > > I am PHP beginner so I am sorry if

Re: [PHP] System errno in PHP

2008-02-19 Thread Michal Maras
Hi I am asking about errno for Filesystems functions like fopen, fread, fclose, ... On 19/02/2008, Stut <[EMAIL PROTECTED]> wrote: > > Michal Maras wrote: > > Coud somebody tell me if it is possible to get integer value of > variable > > which name in C is errno end in perl $!. > > I am PHP be

Re: [PHP] System errno in PHP

2008-02-19 Thread Stut
Michal Maras wrote: Coud somebody tell me if it is possible to get integer value of variable which name in C is errno end in perl $!. I am PHP beginner so I am sorry if question is 'stupid'. What function are you calling where you expect to get a system error? Check the manual page for that