Re: Problem with PHP4, chroot and sendmail

From: Date: Sun, 17 Dec 2000 23:04:51 +0000
Subject: Re: Problem with PHP4, chroot and sendmail
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30789@lists.php.net to get a copy of this message
> sendmail_path = /usr/sbin/sendmail -t -i Ini files use the space as delimiter for an end of a token. Thus, you are really using /usr/sbin/sendmail, and that other stuff -t -i is a comment. You need quotes on it: sendmail_path = "/usr/sbin/sendmail -t -i" > Apart from the prints and phpinfo(), the following snippet of PHP program > produces NOTHING at all. > > $status = mail($recipient, $subject, $message, $headers); > print "Mail Status = " . $status; > print $status ? "OK<br>" : "Failed<br>"; // Always show > "Failed" > print "Doing chdir and system<br>"; > chdir("/usr/local"); system("ls"); // Returns nothing > print "Execing perl<br>"; > exec('jhgjgjhgjhgjhg'); // Should generate an error but don't > print exec('/usr/bin/perl -h') . "<br>"; // Returns nothing > phpinfo(); // This is fine > > It is obvious that PHP is not executing any programs. Our chroot > environment only have the following programs (they all work fine > in chroot otherwise): > > perl > gzip > sendmail > > Do I need a shell to run sendmail and other programs within PHP? Any help > as to why I couldn't run any program in PHP within a chroot > environment is greatly appreciated. I don't claim to understand a chroot-ed environment, but PHP is running as a part of Apache, which runs as whatever user is set in httpd.conf, as I understand it...

« previous php.general (#30789) next »