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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 18:01:34 2025 UTC