php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11110 Backtick operator doesn't work
Submitted: 2001-05-25 07:08 UTC Modified: 2001-05-26 17:12 UTC
From: feo84 at web dot de Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.0.4pl1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: feo84 at web dot de
New email:
PHP Version: OS:

 

 [2001-05-25 07:08 UTC] feo84 at web dot de
I try to pass a username and a password to the program msntauth (user authentication for the Squid proxy server) using the following construction:
$ok = `echo $id '$passwort' | /usr/sbin/msntauth`;
The variable $ok seems to contain the string "OK", but when I try to test it in an if-query, the result is false:
if ($ok == "OK") {
...
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-26 15:47 UTC] derick@php.net
I think this is not a bug in PHP, but that there are some trailing characters after the OK (such as a new line).
Please reopen if this is not the case.
 [2001-05-26 17:12 UTC] feo84 at web dot de
I don't really know whether it's really a bug, but even if I use the chop() or trim() functions on $ok, it doesn't work. In Perl, the same construction works, and I don't think that there is a great difference between Perl's and PHP's chop() functions.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 10:01:28 2024 UTC