[PHP] Re: About resource of popen
Somebody? help me!! :D 2007/4/30, Fernando chucre [EMAIL PROTECTED]: Hello all, I make a script for read and interprete the stdout of cmd `ip monitor`. And I use signal_handler, the script is like this: ? declare(ticks = 1); pcntl_signal(SIGHUP,sig_handler,false); $fh = popen('ip monitor','r'); while (!feof($fh)) { $line = fgets($fh); analize($line); } function analize($line) { ... } ; function sig_handler($signo) { ... }; ? this script run in infine loop, or when to cmd 'ip monitor' exist. The script ever whait the next line of 'ip monitor', ever. Then when I send the signal SIGHUP to pid of script. In this point the instruction '$line = fgets($fh);' is aborted and return false to $line. The $fh is modified and the function feof($fh) return true and I have not access to $fh agaim. But the kid process 'ip monitor' is not kill. This is wanted? -- Fernando Chure PSL/CE -- Fernando Chure PSL/CE
[PHP] About resource of popen
Hello all, I make a script for read and interprete the stdout of cmd `ip monitor`. And I use signal_handler, the script is like this: ? declare(ticks = 1); pcntl_signal(SIGHUP,sig_handler,false); $fh = popen('ip monitor','r'); while (!feof($fh)) { $line = fgets($fh); analize($line); } function analize($line) { ... } ; function sig_handler($signo) { ... }; ? this script run in infine loop, or when to cmd 'ip monitor' exist. The script ever whait the next line of 'ip monitor', ever. Then when I send the signal SIGHUP to pid of script. In this point the instruction '$line = fgets($fh);' is aborted and return false to $line. The $fh is modified and the function feof($fh) return true and I have not access to $fh agaim. But the kid process 'ip monitor' is not kill. This is wanted? -- Fernando Chure PSL/CE
[PHP] I make a patch, how I report?
Hello all, I buid a patch for wrapper php fopen. In this patch I create a way for the script access the filedescriptos opened by process. Ex: php file.php 3file_in.txt 7file_out.txt In this case the script can't read the filedescriptor 3 and 7. Not have way for read or write in filedescriptor opends by precess. I make a way for read or write it. A modify de wrapper 'php' for fopen function. (http://br.php.net/manual/en/wrappers.php.php) A create the 'php:/fd/N' which N is the filedescriptor number. how to access fd 7 to write? ex: ? $fd = fopen(php://fd/7,'w'); fwrite($fd,test of write\n); fclose($fd); ? I want know who I send the patch for to be avaliable. Thanks. -- Fernando Chure PSL/CE - Brasil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Project php-mobile
Hello, I am a PHP-Developer, and for a long time I wait for um php binary for PDA's (mobiles devices). But this time not hapen. So I and my friend Lauro Salmito (C develeper) making the PHP-Mobile Project. We want create a small binary, Mobile Edition. Basically we make a binary with the fallowing features: - Language Reference http://www.php.net/manual/en/langref.php; - Function Reference http://www.php.net/manual/en/funcref.php - V. Array Functionshttp://www.php.net/manual/en/ref.array.php - XII. Class/Object Functionshttp://www.php.net/manual/en/ref.classobj.php - XXII. Date and Time Functionshttp://www.php.net/manual/en/ref.datetime.php - XXIX. Directory Functionshttp://www.php.net/manual/en/ref.dir.php - XL. Filesystem Functionshttp://www.php.net/manual/en/ref.filesystem.php - XLVI. FTP Functions http://www.php.net/manual/en/ref.ftp.php - XCV. MySQL Functionshttp://www.php.net/manual/en/ref.mysql.php - XCVII. MySQL Improved Extensionhttp://www.php.net/manual/en/ref.mysqli.php - CXXIII. PostgreSQL Functionshttp://www.php.net/manual/en/ref.pgsql.php - CXXVI. Program Execution Functionshttp://www.php.net/manual/en/ref.exec.php - CXLVIII. SOAP Functionshttp://www.php.net/manual/en/ref.soap.php - CL. Standard PHP Library (SPL) Functionshttp://www.php.net/manual/en/ref.spl.php - CLI. SQLite Functionshttp://www.php.net/manual/en/ref.sqlite.php - CLVI. String Functionshttp://www.php.net/manual/en/ref.strings.php - Graphical library - For this we don't have Idea, probably we get an exists in PDA world, or if necessary we will make it. For make binary and libraries we will uses the Palm_OS_Developer_Suite_1_2, this is a suite developer based in Eclipse. We accept any help. We will notice when we register the project. Thanks -- Fernando Chure PSL/CE - Brasil
[PHP] Project php-mobile
Hello, I am a PHP-Developer, and for a long time I wait for um php binary for PDA's (mobiles devices). But this time not hapen. So I and my friend Lauro Salmito (C develeper) making the PHP-Mobile Project. (this still not created). We want create a small binary, Mobile Edition. Basically we make a binary with the fallowing features: - Language Reference http://www.php.net/manual/en/langref.php; - Function Reference http://www.php.net/manual/en/funcref.php - V. Array Functionshttp://www.php.net/manual/en/ref.array.php - XII. Class/Object Functionshttp://www.php.net/manual/en/ref.classobj.php - XXII. Date and Time Functionshttp://www.php.net/manual/en/ref.datetime.php - XXIX. Directory Functionshttp://www.php.net/manual/en/ref.dir.php - XL. Filesystem Functionshttp://www.php.net/manual/en/ref.filesystem.php - XLVI. FTP Functions http://www.php.net/manual/en/ref.ftp.php - XCV. MySQL Functionshttp://www.php.net/manual/en/ref.mysql.php - XCVII. MySQL Improved Extensionhttp://www.php.net/manual/en/ref.mysqli.php - CXXIII. PostgreSQL Functionshttp://www.php.net/manual/en/ref.pgsql.php - CXXVI. Program Execution Functionshttp://www.php.net/manual/en/ref.exec.php - CXLVIII. SOAP Functionshttp://www.php.net/manual/en/ref.soap.php - CL. Standard PHP Library (SPL) Functionshttp://www.php.net/manual/en/ref.spl.php - CLI. SQLite Functionshttp://www.php.net/manual/en/ref.sqlite.php - CLVI. String Functionshttp://www.php.net/manual/en/ref.strings.php - Graphical library - For this we don't have Idea, probably we get an exists in PDA world, or if necessary we will make it. For make binary and libraries we will uses the Palm_OS_Developer_Suite_1_2, this is a suite developer based in Eclipse. We accept any help. We will notice when we register the project. Thanks -- Fernando Chure PSL/CE - Brasil
[PHP] Project php-mobile
Hello, I am a PHP-Developer, and for a long time I wait for um php binary for PDA's (mobiles devices). But this time not hapen. So I and my friend Lauro Salmito (C develeper) making the PHP-Mobile Project. (this still not created). We want create a small binary, Mobile Edition. Basically we make a binary with the fallowing features: - Language Reference http://www.php.net/manual/en/langref.php; - Function Reference http://www.php.net/manual/en/funcref.php - V. Array Functionshttp://www.php.net/manual/en/ref.array.php - XII. Class/Object Functionshttp://www.php.net/manual/en/ref.classobj.php - XXII. Date and Time Functionshttp://www.php.net/manual/en/ref.datetime.php - XXIX. Directory Functionshttp://www.php.net/manual/en/ref.dir.php - XL. Filesystem Functionshttp://www.php.net/manual/en/ref.filesystem.php - XLVI. FTP Functions http://www.php.net/manual/en/ref.ftp.php - XCV. MySQL Functionshttp://www.php.net/manual/en/ref.mysql.php - XCVII. MySQL Improved Extensionhttp://www.php.net/manual/en/ref.mysqli.php - CXXIII. PostgreSQL Functionshttp://www.php.net/manual/en/ref.pgsql.php - CXXVI. Program Execution Functionshttp://www.php.net/manual/en/ref.exec.php - CXLVIII. SOAP Functionshttp://www.php.net/manual/en/ref.soap.php - CL. Standard PHP Library (SPL) Functionshttp://www.php.net/manual/en/ref.spl.php - CLI. SQLite Functionshttp://www.php.net/manual/en/ref.sqlite.php - CLVI. String Functionshttp://www.php.net/manual/en/ref.strings.php - Graphical library - For this we don't have Idea, probably we get an exists in PDA world, or if necessary we will make it. For make binary and libraries we will uses the Palm_OS_Developer_Suite_1_2, this is a suite developer based in Eclipse. We accept any help. We will notice when we register the project. Thanks -- Fernando Chure PSL/CE - Brasil