ID:               30805
 Updated by:       [EMAIL PROTECTED]
 Reported By:      rui dot francisco at fccn dot pt
-Status:           Suspended
+Status:           Bogus
 Bug Type:         InterBase related
 Operating System: linux kernel 2.4.22
 PHP Version:      5.0.2
 New Comment:

.


Previous Comments:
------------------------------------------------------------------------

[2005-01-13 22:26:16] [EMAIL PROTECTED]

Please provide an example that actually contains ibase_*() functions.

------------------------------------------------------------------------

[2004-11-16 14:56:57] rui dot francisco at fccn dot pt

Description:
------------
i query a db (firebird 1.5.1)for a resultset
I use a loop to go to all the records
in the record processing i fork ()
  in there i use shell_exec with the no hup
  terminate the child

in the parent i verify a log file
if the string i want is there i kill the child
wait for the child

when i try to update the db using the same db connection, or one new
its reports a broken pipe

The script was originally built using Pear DB, but i change it to ibase
function to garante that wasn't a Pear DB bug.

I compiled php with the following configuration

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-ssl
--with-libxml --with-interbase=/opt/firebird --with-pear --with-zlib
--enable-sockets --enable-track-vars --enable-pcntl -enable-debug


My compiled modules
[EMAIL PROTECTED]:/usr/src/php-5.0.2# php -m
[PHP Modules]
ctype
dom
iconv
interbase
libxml
pcntl
pcre
posix
session
SimpleXML
sockets
SPL
SQLite
standard
tokenizer
xml
zlib



Thanks in advance
Rui Francisco

Reproduce code:
---------------
$pid=pcntl_fork();

if ($pid == -1) 
        {
                 echo "Erro ao efectuar o fork\n";
        } 
else if ($pid) 
        {
                // we are the parent
                $resultado='-----';
                //sleep(4);
                while ($resultado=='-----') {
                        sleep(2);
                        $a=shell_exec("cat xsupplicant.log");
                        
                        if (strpos($a,'Failure',0)) {
                                $resultado='SC';
                                shell_exec('ifconfig '.$vInterface.' down');
                                shell_exec('killall xsupplicant');
                                sleep(2);
                                shell_exec('ifconfig '.$vInterface.' up');
                        }                                       
                        if (strpos($a,'Authenticated',0))
                                $resultado='A';
                }
                pcntl_wait($status);
        } 
else 
        {
                // we are the child
                ob_start();
                shell_exec('killall xsupplicant 2>&1');
                shell_exec('rm /var/run/xsupplicant 2>&1');
                ob_end_clean();
                sleep(1);
                $a=shell_exec("nohup xsupplicant -c conf_teste.conf -i
".$vInterface." & ");
                exit (0);
        }

echo $vDominio." - ".$resultado."\n";



Expected result:
----------------
update the database, no message

Actual result:
--------------
Warning: ibase_query(): Unable to complete network request to host
"localhost". Error writing data to the connection. Broken pipe  in
/web/roam/test_connectivity.php on line 210
Unable to complete network request to host "localhost". Error writing
data to the connection. Broken pipe


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30805&edit=1

Reply via email to