You are here: Problem with executing a command from within my script « PHP Programming Language « IT news, forums, messages
Problem with executing a command from within my script

Posted by Mike Gaskins on 07/24/06 20:36

I'm working on a web-based mail quarantine management system, and am
running into some problems getting it to run the command to release a
message.

The main exertp of the script is below:

<?php

echo "Releasing /var/amavis/quarantine/" . $_POST['release'] . " to
user " . $_POST['user'] . "<br><br>";
$command = "/usr/sbin/amavisd-release " . $_POST['release'] . " " .
$_POST['secretid'];
echo $command . "<br>";
passthru($command, $return_val);
echo "<br>" . $return_val;
?>

End script

This command works fine from the command line, but won't run using this
code. It comes back with a return code of 13 each time. I've also
tried the exec and popen functions in place of passthru() with no luck.
If it matters any, amavisd-release is an executable Perl script.

Any ideas?

Mike Gaskins

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация