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 [EMAIL PROTECTED] "Mike" <[EMAIL PROTECTED]> 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 > [EMAIL PROTECTED] > > > > > > > > > > > > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php