Rev cgi, PHP & XML
janschenkel at yahoo.com
Thu Aug 23 06:52:05 EDT 2007
--- jbv <jbv.silences at club-internet.fr> wrote:
> Hi folks,
> It's me again with another weird question... this
> time for php
> 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
> $myString = $argv;
> $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,
Try dumping the XML data to a file in the
temp-directory, and piping that into the php script.
Otherwise the shell will try to interpet the content
of the variable myXMLData as extra parameters.
Hope this helped,
Quartam Reports & PDF Library for Revolution
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
Sick sense of humor? Visit Yahoo! TV's
Comedy with an Edge to see what's on, when.
More information about the Use-livecode