Re: PHP, Java, & a strange number...

From: Date: Tue, 11 Nov 2003 15:17:58 +0000
Subject: Re: PHP, Java, & a strange number...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-169175@lists.php.net to get a copy of this message
Please ignore - now posted to bug newsgroup "Dom S" <news@mrdoms.plus.com> wrote in message news:20031111142337.27740.qmail@pb1.pair.com... > Hi, > I am having problems trying to get PHP to return a Java .jar file. > Basically, the jar is reported as corrupted by Opera, or any browser and > Java 1.3. I have tracked this down to a strange number at the start of the > message body: > If I access the jar file directly (no PHP), I get (viewed by packet > sniffing) > > Header stuff, > Content Type: text/html; charset=ISO-8859-1 > CRLF CRLF 190 CRLF > < jar file > > > When I use: > > <?php > header("Content-Type: text/html; charset=ISO-8859-1"); > readfile("tj.jar"); > ?> > > > I get: > Header stuff, > Content Type: text/html; charset=ISO-8859-1 > < jar file > > > and it doesn't work. > So I tried adding: > > <?php > header("Content-Type: text/html; charset=ISO-8859-1"); > header("\n\n190\n"); > readfile("../_JAVARES/car/jammer.jar"); > ?> > > and it works again, in ANY browser and ANY java version. So what is the > '190' at the start of the message all about? > It gets wierder though. My real PHP script has a session. and when I use: > > <?php > session_start(); > header("Content-Type: text/html; charset=ISO-8859-1"); > readfile("tj.jar"); > ?> > > I now get: > > Header stuff, including lots of cache-limiting bits > Content Type: text/html; charset=ISO-8859-1 > CRLF CRLF 2000 CRLF > < jar file > > > The '190' is now '2000', and this fails to load in Opera & Java 1.3, > but > works with IE6 & Java 1.1 or Java 1.3. So why is PHP changing this number to > 2000? Is there a way to stop it? > Thank you for your time, > > Dom > > --

« previous php.general (#169175) next »