Rev cgi, PHP & XML

jbv jbv.silences at club-internet.fr
Wed Aug 22 15:39:27 EDT 2007


Hi folks,

It's me again with another weird question... this time for php
experts...

I have a Rev cgi script that returns some xml data to a client browser.
In order to speed up downloading, I'm trying to compress the data
using gzip via some php functions (such as gzencode or gzcompress).
I had to use that technique because Rev compress() function doesn't
output code suitable for browsers...

Anyway, here's my code :

- in Rev cgi script

get shell("/usr/local/bin/php /home/httpd/html/cgi-bin/gzcompress.php "
& myXMLdata)


- in php

    <?php

     $myString = $argv[1];

     $myStringgz = gzencode( $myString , 9 );

      echo $myStringgz;

    ?>


This works fine for any non-XML data. As soon as I try to pass XML data
to the php script,
I get this error :
    /bin/sh: line 1: syntax error near unexpected token `<'

Could someone be kind enough to tell me what I'm doing wrong ?
Is there any specific gzlib function for xml data ? I haven't found
anything like that in php doc...

Any help greatly apreciated.  Thanks in advance,
JB




More information about the use-livecode mailing list