php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11713 IPlanet and sessions cause script to terminate prematurely
Submitted: 2001-06-26 18:17 UTC Modified: 2002-06-02 19:21 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: reaganpr at hotmail dot com Assigned:
Status: Not a bug Package: iPlanet related
PHP Version: 4.0.6 OS: Windows NT 4.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: reaganpr at hotmail dot com
New email:
PHP Version: OS:

 

 [2001-06-26 18:17 UTC] reaganpr at hotmail dot com
Scenario:
The following script:

<?php
  session_start();
  $strTest = 'hello';
?>
<a href="<? echo $strTest ?>">click here</a>

will cause the script to silently die right after the
<a href=

This only occurs with the NSAPI version of php running on Windows NT 4.0 (as far as I know), and in one of two instances:
1. client has disabled per-session cookies.
2. this is the first page on the site that the client visits

The CGI version has no problems in these two cases (on the same machine).

Replacing echo with 'print' or even the short-hand '=' do not seem to remedy the problem.

To correct the problem, I can either remove the 'session_start()' call (sacrifices session functionality), or I can replace the tag with:

<? print "<a href=\"$strTest\">" ?>click here</a>

where the print statement encapsulates the entire opening tag. I can also omit any quotes (single or double) around the attribute:

<a href=<? echo $strTest ?>>click here</a>

This is not limited to the anchor tag, as I have reproduced it with 'form', etc..



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-02 16:20 UTC] k.schroeder@php.net
Can you test it with PHP 4.2.1 please?

Regards, Kai
 [2002-06-02 19:21 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 08:01:29 2024 UTC