PHP 4.0 Bug #7831: first session creation generate unwanted carachters INTO javascript source code

From: Date: Wed, 15 Nov 2000 16:09:25 +0000
Subject: PHP 4.0 Bug #7831: first session creation generate unwanted carachters INTO javascript source code
Groups: php.dev 
Request: Send a blank email to php-dev+get-38148@lists.php.net to get a copy of this message
From: giancarlo.favaretti@inforeti.it Operating system: WINDOWS NT 4.0 PHP version: 4.0.3pl1 PHP Bug Type: *Session related Bug description: first session creation generate unwanted carachters INTO javascript source code I have a script using sessions and returning to the browser some javascript code. The first time I run the script (throug the browser or even in a command shell) I get some additional '"' characters into <script> tag and javascript goes in error. After the first run (i.e. the session already exists) everithing is OK. i.e. using the script: --------------------------------------- <? session_start(); ?> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } ............ ----------------------------------------- I get the following response: ----------------------------------------- <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x="a[i])&&x.oSrc;i++)" x.src="x.oSrc; " } ...... ----------------------------------------- The problem affects PHP4pl1 in Windows NT 4.0 with both IIS4 and Apache. Moving the script into Linux enviroment everithing goes OK! -- Edit Bug report at: http://bugs.php.net/?id=7831&edit=1

« previous php.dev (#38148) next »