Re: Problem with a php function
| From: | Maxim Maletsky | Date: | Fri, 22 Nov 2002 16:49:00 +0000 |
| Subject: | Re: Problem with a php function | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-91459@lists.php.net to get a copy of this message | ||
Mike,
I am not really the person to ask about the parse_ini_file functionality.
I remind, though, that just the other day there was something discussed
on PHP-DEV list regarding it.
Therefore, I CC this mail to the DEV list hoping there is any interest
regarding your problem. Chances are it is a bug of some kind.
--
Maxim Maletsky
maxim@php.net
"Mike" <mferre@mobileway.com> wrote... :
> Hi,
>
> I have a question to you.
> I use a function named "parse_ini_file" but I think this is perhaps bugged
> let me explain to you :
>
> I have a spool directory , I put in file with .txt extension .
> My script despool the directory and rename the .txt to .ini
> After I use parse_ini_file() to parse the file and get all information
>
> Something (lot of time) parse_ini_file() give a array empty !
> But there are something in my file ( perhaps I try it on the same file)
>
> So I use strace to see what happens with it and I get this :
>
> 1037980915.096081 ioctl(8, TCGETS, 0xbfffce9c) = -1 ENOTTY (Inappropriate
> ioctl for device) <0.000010>
> 1037980915.096165 read(8,
> "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
> 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
> 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
> 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
> 0\0\0\0\0\0", 8192) = 157 <0.000031>
> 1037980915.096529 read(8, "", 8035) = 0 <0.000009>
> 1037980915.097249 read(8, "", 8192) = 0 <0.000009>
> 1037980915.097325 ioctl(8, TCGETS, 0xbfffc338) = -1 ENOTTY (Inappropriate
> ioctl for device) <0.000009>
> 1037980915.097395 close(8) = 0 <0.000011>
>
> You can seen that parse_ini_file() use ioctl() but this function is not
> appropriate for this utilisation.
>
> cf man ioctl :
>
> ENOTTY d error is : is not associated with a character special
> device.
>
>
>
> and sometimes the ioctl function return -1 code and nothing in the array .
> So I ask me why coder have been used ioctl and why the coder don't get
> the -1 error and put a php warning or other thing.
>
> Can you foward this mail to the parse_ini_file() coder and telle him to
> contact me to say me if I m in the wrong way ?
>
>
> Best regards,
>
>
> Michaël F.
>
> WEB / PHP Developer.
> Mobileway
> (+33) 1 41 44 46 21
> michael.ferre@mobileway.com
>
>
>
>
>
>
>
>
>
>
>
>