php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #33937 mail() uses popen() instead of execv*()
Submitted: 2005-07-31 22:02 UTC Modified: 2021-07-06 15:29 UTC
Votes:6
Avg. Score:4.7 ± 0.7
Reproduced:5 of 5 (100.0%)
Same Version:4 (80.0%)
Same OS:4 (80.0%)
From: chaton at skreel dot org Assigned: cmb (profile)
Status: Wont fix Package: Mail related
PHP Version: * OS: *
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:
18 + 20 = ?
Subscribe to this entry?

 
 [2005-07-31 22:02 UTC] chaton at skreel dot org
Description:
------------
PHP's mail() function uses popen() instead of execve() to call the sendmail executable. This was probably done because it saved the parameter parsing, but it makes it impossible to use PHP's mail() function inside of a chroot() jail unless /bin/sh is copied inside the chroot()-ed environement.

As more and more Apache installs get chroot()-ed, it would be nice to rewrite the code to properly use execve().



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-31 21:22 UTC] jani@php.net
-Package: Feature/Change Request +Package: Mail related -Operating System: Unix +Operating System: * -PHP Version: any +PHP Version: *
 [2011-03-17 17:56 UTC] anrdaemon at freemail dot ru
Proper solution is to not use external executables to handle mail.
Code s in there, see #9308
 [2021-07-06 15:29 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-07-06 15:29 UTC] cmb@php.net
Given the small amount of feedback on this feature request over
the long time, I'm closing as WONTFIX.

If anybody is still looking for this feature, please pursue the
RFC process[1].

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