[sync] (no subject)

Daniel Vandal dvandal at infoteck.qc.ca
Mon Oct 18 13:50:16 PDT 2004


Sorry for the late answer, but I haven't worked on it since 1 month.

I think that I finally found out why the wbxml2xml process open with 
proc_open was freezing on my server. It seem
that he freeze when reading the sdterr pipe (pipe #2).

With the CVS version of the XML_WBXML Decoder.php, wbxml2xml was 
freezing and was kept running by the server.
[root at courriels sync]# ps -A |grep wbxml2xml
24756 ?        00:00:00 wbxml2xml
24918 ?        00:00:00 wbxml2xml
26291 ?        00:00:00 wbxml2xml
26312 ?        00:00:00 wbxml2xml

But with my changes, everything work properly, anywhay, the stderr pipe 
for these proc_open calls wasn't used in the code.

I included in attachment the diff file of the changes I done to the 
XML_WBXML framework package.

Daniel Vandal
dvandal at infoteck.qc.ca


Chuck Hagenbuch a écrit :

> Quoting dvandal at infoteck.qc.ca:
>
>> Also, the only way I found to be able to use WBXML with SyncML was to 
>> use the
>> revision 1.19 of "framework/XML_WBXML/WBXML/Decoder.php". My server 
>> is running
>> with the lastest Horde version and modules, with an up-to-date PEAR, 
>> with php
>> 4.3.8 but it seem to have a problem with proc_open (no error, but the 
>> script
>> freeze and using some " echo '<some text>' " to find where he was 
>> freezing and
>> he freeze exactly where proc_open is called (at line 131).
>
>
> I can't reproduce this. Do the tests work for you? Does proc_open() 
> work in
> other scripts? Etc...
>
> -chuck
>
> -- 
> "But she goes not abroad in search of monsters to destroy." - John 
> Quincy Adams


-------------- next part --------------
? WBXML_org
? XML_WBXML.diff
Index: WBXML/Decoder.php
===================================================================
RCS file: /repository/framework/XML_WBXML/WBXML/Decoder.php,v
retrieving revision 1.21
diff -u -r1.21 Decoder.php
--- WBXML/Decoder.php	12 Jul 2004 17:59:33 -0000	1.21
+++ WBXML/Decoder.php	18 Oct 2004 20:39:53 -0000
@@ -112,8 +112,7 @@
         if (!empty($this->_wbxml2xml) && is_executable($this->_wbxml2xml)) {
             $descriptorspec = array(
                 0 => array('pipe', 'r'),
-                1 => array('pipe', 'w'),
-                2 => array('pipe', 'w'));
+                1 => array('pipe', 'w'));
 
             $wbxml2xml = proc_open($this->_wbxml2xml . ' ' . $this->_wbxml2xml_args,
                                    $descriptorspec, $pipes);
@@ -128,13 +127,6 @@
                 }
                 fclose($pipes[1]);
 
-                // Grab stderr in case we want it later.
-                $stderr = '';
-                while (!feof($pipes[2])) {
-                    $stderr .= fread($pipes[2], 8192);
-                }
-                fclose($pipes[2]);
-
                 $rv = proc_close($wbxml2xml);
 
                 return $xml;
Index: WBXML/Encoder.php
===================================================================
RCS file: /repository/framework/XML_WBXML/WBXML/Encoder.php,v
retrieving revision 1.24
diff -u -r1.24 Encoder.php
--- WBXML/Encoder.php	12 Jul 2004 17:32:18 -0000	1.24
+++ WBXML/Encoder.php	18 Oct 2004 20:39:54 -0000
@@ -92,8 +92,7 @@
         if (!empty($this->_xml2wbxml) && is_executable($this->_xml2wbxml)) {
             $descriptorspec = array(
                 0 => array('pipe', 'r'),
-                1 => array('pipe', 'w'),
-                2 => array('pipe', 'w'));
+                1 => array('pipe', 'w'));
 
             $xml2wbxml = proc_open($this->_xml2wbxml . ' ' . $this->_xml2wbxml_args,
                                    $descriptorspec, $pipes);
@@ -108,13 +107,6 @@
                 }
                 fclose($pipes[1]);
 
-                // Grab stderr in case we want it later.
-                $stderr = '';
-                while (!feof($pipes[2])) {
-                    $stderr .= fread($pipes[2], 8192);
-                }
-                fclose($pipes[2]);
-
                 $rv = proc_close($xml2wbxml);
 
                 return $wbxml;


More information about the sync mailing list