PHP 4.1.1 - Problems with popen
| From: | linder at interface dot co dot at | Date: | Mon, 04 Mar 2002 14:31:30 +0000 |
| Subject: | PHP 4.1.1 - Problems with popen | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-6245@lists.php.net to get a copy of this message | ||
Can anybody please help me with the following problem ?
I am trying to run a shell command via popen but nothing happens....
Here's an example:
$fd = popen("/usr/sbin/sendmail -t ","w");
fputs($fd, "To: somebody@somebody.com\n");
fputs($fd, "From: anotherone@anotherone.com\n");
fputs($fd, "Reply-To: anotherone@anotherone.com\n");
fputs($fd, "Subject: Testmail\n\n");
fputs($fd, "Just a test.\n");
pclose($fd);
It isn't restricted to sendmail, I can't run any program from PHP (not even a
simple "ls"...).
This is a list of items I checked so far:
- safe_mode in php.ini is off,
- the user PHP runs under (which is the same as the one apache runs under ?) CAN
execute the commands when working at the shell (bash) - sendmail, ls - no
problems...
Is there any option I can turn on for logging what PHP does ?
My box is running under Suse Linux 6.4, PHP version is 4.1.1., configured to run
as an apache-module ( './configure' '--with-mysql'
'--with-apxs=/usr/sbin/apxs').
Apache is version 1.3
I'm really frustrated, everything else works so please if you know of anything
that could help me with my problem - let me know...
kr,
Joerg