Bug #11754 Updated: exec() function not working in Win32
| From: | kalowsky@php.net | Date: | Fri, 27 Jul 2001 14:46:55 +0000 |
| Subject: | Bug #11754 Updated: exec() function not working in Win32 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-61222@lists.php.net to get a copy of this message | ||
ID: 11754
Updated by: kalowsky
Reported By: stephen@pierzchala.com
Old Status: Feedback
Status: Closed
Bug Type: Program Execution
Operating System: Win32 (2000)
PHP Version: 4.0.6
New Comment:
no user feedback. if the bug still exists, please reopen it.
Previous Comments:
------------------------------------------------------------------------
[2001-06-27 22:04:45] sniper@php.net
So which exec() in your script doesn't work?
Please make it short as possible.
------------------------------------------------------------------------
[2001-06-27 15:02:28] stephen@pierzchala.com
- Standard Win32 PHP install
- Apache 1.3.20, Win32
- PHP running as a module
- Unix Tools running on Win32 platform
DEMO SCRIPT:
<?
if ($query != "" || $query != NULL) {
$do_time = time();
$test = $do_time.".txt";
exec("egrep -i $query c:/Apache/logs/access.log > c:/Apache/htdocs/output/$test");
@$data=fopen("c:/Apache/htdocs/output/$test", "r");
if (!@$data=fopen("c:/Apache/htdocs/output/$test", "r")) {
echo("<font class=\"larger\">There May Have Been An Error With Your Query As
No Output File Was Generated.<br>");
echo("Please Check The Syntax Of Your Query.</font>");
} else {
$file=fpassthru($data);
}
} else {
echo("<font class=\"larger\">There Was No Query To Analyze.<br>");
echo("Please Re-Enter Your Query.</font>");
}
exec("c:/Apache/htdocs/del.bat c:\Apache\htdocs\output\$test");
?>
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=11754&edit=1