PHP 4.0 Bug #7831 Updated: first session creation generate unwanted carachters INTO javascript source code
| From: | sas@php.net | Date: | Sat, 02 Dec 2000 14:00:00 +0000 |
| Subject: | PHP 4.0 Bug #7831 Updated: first session creation generate unwanted carachters INTO javascript source code | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39840@lists.php.net to get a copy of this message | ||
ID: 7831
Updated by: sas
Reported By: giancarlo.favaretti@inforeti.it
Status: Closed
Bug Type: *Session related
Assigned To:
Comments:
This has been addressed in the forth-coming PHP 4.0.4.
Thanks for using PHP.
Previous Comments:
---------------------------------------------------------------------------
[2000-11-15 11:09:25] giancarlo.favaretti@inforeti.it
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!
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7831