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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
19 + 18 = ?
Subscribe to this entry?

 
 [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: Tue Apr 23 18:01:34 2024 UTC