From: [EMAIL PROTECTED] Operating system: Linux 7.2 PHP version: 4.2.3 PHP Bug Type: Session related Bug description: extra quotes added to page
I have the following line of code in a script: echo "<input type=button value='View Report' onClick=window.open('./report1.php','_top') style='width: 200'>"; Which worked just fine. I then added a session_register statement to the script: <? session_start(); echo "<input type=button value='View Report' onClick=window.open('./report1.php','_top') style='width: 200'>"; ?> The problem was that after this when the script processes for the first time the generated source code becomes: <? session_start(); echo "<input type=button value='View Report' onClick="window.open("'./report1.php','_top') style='width: 200'>"; ?> Note the spurious set of quotes around window.open(. These quotes make the button inoperative. If I do a refresh, the quotes disappear and it works fine. I've made sure the browser cache is clear so I know that isn't the problem. I've replicated the problem multiple times. The problem could be browser related but if the same source is being sent each time from the Apache server, I'm not sure why the browser would interpret it differently on the initial load of the page as opposed to following a refresh. Considering the browser is IE, anything is possible. './configure' '--with-mysql=/usr/local/mysql' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-bcmath' '--with-gd' '--enable-sockets' '--enable-track-vars' '--with-jpeg-dir=/usr/lib' '--with-png-dir=/usr/local/lib' '--with-zlib-dir=/usr/lib' '--with-png' '--with-ttf' -- Edit bug report at http://bugs.php.net/?id=20674&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20674&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20674&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20674&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20674&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20674&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20674&r=support Expected behavior: http://bugs.php.net/fix.php?id=20674&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20674&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20674&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20674&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20674&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20674&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20674&r=isapi