php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24511 ?PHP_SELF is unavailable
Submitted: 2003-07-06 06:13 UTC Modified: 2003-07-06 06:19 UTC
From: timon dot roth at bluewin dot ch Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 5.0.0b1 (beta1) OS: Linux SUE 8.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: timon dot roth at bluewin dot ch
New email:
PHP Version: OS:

 

 [2003-07-06 06:13 UTC] timon dot roth at bluewin dot ch
Description:
------------
the Variable $PHP_SELF is unknown in a CGI-Script, even if register globals is on.

simple Variablenames are unknown like $txt.
when i call them $_POST[txt] it is there.

-------------------------

<?php
echo "<pre>der Text - $_POST[txt] - mit CRYPT_STD_DES lautet: " . CRYPT($_POST[txt],CRYPT_STD_DES)."<br>";
echo "der Text - $_POST[txt] - mit MD5 lautet: " . md5($_POST[txt])."<br>";
echo "der Text - $_POST[txt] - mit CRYPT_EXT_DES lautet: " . CRYPT($_POST[txt],CRYPT_EXT_DES)."<br>";
echo "der Text - $_POST[txt] - mit CRYPT_MD5 lautet: " . CRYPT($_POST[txt],CRYPT_MD5)."<br>";
echo "der Text - $_POST[txt] - mit CRYPT_BLOWFISH lautet: " . CRYPT($_POST[txt],CRYPT_BLOWFISH)."<br></pre>";
echo base64_decode($_POST[txt]);
?>

<html>
<head>
</head>
<body>
<form action="<?php echo $PHP_SELF; ?>" method="post">

<INPUT TYPE="TEXT">
<textarea name="txt"></textarea>
<input type="submit" value="send">
</form>
</body>

</html>

Reproduce code:
---------------
<pre>der Text -  - mit CRYPT_STD_DES lautet: 1$XA3AnJXEveE<br>der Text -  - mit MD5 lautet: d41d8cd98f00b204e9800998ecf8427e<br>der Text -  - mit CRYPT_EXT_DES lautet: 0$fzSX8JzA0Vw<br>der Text -  - mit CRYPT_MD5 lautet: 1$XA3AnJXEveE<br>der Text -  - mit CRYPT_BLOWFISH lautet: 1$XA3AnJXEveE<br></pre>
<html>
<head>
</head>
<body>
<form action="" method="post">

<input TYPE="TEXT">
<textarea name="txt"></textarea>
<input type="submit" value="send">
</form>
</body>

</html>

Expected result:
----------------
<pre>der Text -  - mit CRYPT_STD_DES lautet: 1$XA3AnJXEveE<br>der Text -  - mit MD5 lautet: d41d8cd98f00b204e9800998ecf8427e<br>der Text -  - mit CRYPT_EXT_DES lautet: 0$fzSX8JzA0Vw<br>der Text -  - mit CRYPT_MD5 lautet: 1$XA3AnJXEveE<br>der Text -  - mit CRYPT_BLOWFISH lautet: 1$XA3AnJXEveE<br></pre>
<html>
<head>
</head>
<body>
<form action="/temp/bas64.php" method="post">

<input TYPE="TEXT">
<textarea name="txt"></textarea>
<input type="submit" value="send">
</form>
</body>

</html>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-06 06:19 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC