php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #61209 configurable shell for exec in linux (not always sh)
Submitted: 2012-02-29 15:09 UTC Modified: 2021-04-21 12:11 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: maarten at ba dot be Assigned:
Status: Suspended Package: Program Execution
PHP Version: Irrelevant OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
28 - 6 = ?
Subscribe to this entry?

 
 [2012-02-29 15:09 UTC] maarten at ba dot be
Description:
------------
i can understand that you can't use the $SHELL variable, because likely under apache it'll be /sbin/nologin anyway.

however, using always sh can be quite irritating when you're trying to make something and install it on a production environment, when finding out that sh is not the shell you're wanting to have. for a while now we've just changed the sh symlink to the shell we want, but now (for this particular machine) we can't workaround like this.

you can't always workaround by just putting /bin/shell before your command, especially if you're using shell constructs...

interesting would be a exec_shell=/bin/sh variable, which could then be used by the various program execution functions (for me in particular exec)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-04-21 12:11 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2021-04-21 12:11 UTC] cmb@php.net
Well, yes, makes some sense, but would likely not work for
escapeshellarg() and friends, and as such the details need to be
figured out carefully.  If you're still looking for this feature,
please pursue the RFC process[1].  For the time being, I suspend
this ticket.

[1] <https://wiki.php.net/rfc/howto>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 07:01:29 2024 UTC