Java applet can't read PHP output !!

From: Date: Tue, 03 Apr 2001 20:38:18 +0000
Subject: Java applet can't read PHP output !!
Groups: php.general 
Request: Send a blank email to php-general+get-46887@lists.php.net to get a copy of this message
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

« previous php.general (#46887) next »