php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23065 Under some circumstances retval is broken.
Submitted: 2003-04-05 15:46 UTC Modified: 2003-04-23 04:12 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: bole at EUnet dot yu Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 4.3.2RC1 OS: Linux, 2.4.20
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: bole at EUnet dot yu
New email:
PHP Version: OS:

 

 [2003-04-05 15:46 UTC] bole at EUnet dot yu
Hmm.. this one is a little bit tricky.

I do something like this:
system ("/usr/bin/ssh -l someuser somehost /path/somescr.pl", $return);

Executing that command (from the same user as apache runs) back EVERY TIME correct retval.

But, when called from Apache+PHP (no matter if safe_mode is enabled nor disabled) and if somescr.pl outputs something on STDOUT, retval randomly vary (0 or 255).

somescr.pl is:

#! /usr/bin/perl
print "OK";
exit 0;

Tried exec() and passthru (), results are the same.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-23 04:12 UTC] sniper@php.net
It's the retval from ssh not your script.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 03:01:27 2024 UTC