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
 [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-2022 The PHP Group
All rights reserved.
Last updated: Mon May 16 16:05:46 2022 UTC