I am using php4 as an Apache module.  The problem is that when a Java
applet makes a connection to a CGI script written  in php, it can't read
the result of php output, but the same applet works fine with Perl or
plain sh CGI script - since the only difference between the the CGIs is
the language used ie. php, perl,... I am speculating that the problem is
somewhere in the Apache-php interface ( the strange thing is that the
php script works if connected to with a browser :-(  )

Here is some simple code ( working sh code )

in sh
#! /bin/sh
echo "Content-type: text/plain"
echo ""
echo "some text..."

The following output displays with a browser, but can't be read by a
Java applet
<?php
    print "some text ..."
?>


Applet code in question:
URL u=new URL("http://www/test.php");
URLConnection uc=u.openConnection();
DataInputStream d=new DataInputStream(uc.getInputStream());
while ( (line=d.readLine()) != null ) {
    System.out.println(line);
}

I tried set_time_limit(0), ignore_user_abort, sending my own header with
header function, none of them worked - any ideas ?

Thanks,
Peter




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to