Hi,
I encountered some problems with the shell function in php. I want to execute a java program on the server by running a php function on a php webpage.
The java program writes some chars to a local file on the server.
test.php
<?php
$WshShell = new COM("WScript.Shell");
$cmd = ' "C:\\Program Files\\Java\\jdk1.6.0_14\\bin\\java" Importer 1 2 updated.txt 7';
$WshShell->exec($cmd);
echo "okay";
?>
When test.php is executed via command line on the server,
c:\php test.php
the java program runs.
However, if I executed it through web browser, the Java program is not called.
http://127.0.0.1/test.php
Is it because the Apache user is not allowed to use the command line functionality on windows?
System configuration:
Microsoft windows XP, Professional X64 edition, Version 2003, service pack 2 PHP version: 5.2.6.6 Apache 2.2 IIS 6