Re: shell_exec fails to compile java class?

From: Date: Wed, 04 Nov 2009 14:34:52 +0000
Subject: Re: shell_exec fails to compile java class?
References: 1  Groups: php.general php.general 
Request: Send a blank email to php-general+get-299602@lists.php.net to get a copy of this message
דניאל דנון wrote:
Hello! I need to use shell_exec (or any other similar function) in order to compile a java class-file. I have all the needed components installed on my computer (Windows XP with Java SDK) - I can use "java c:\path...." in order to compile using Start->Run. When I try to do the same with shell_exec or `` it returns null and it doesn't compiles. Even when there are errors - it doesn't show them at all. I've tried to use instead of "java c:\path..." the full java command line compiler path but it didn't work either. When I try functions such as "echo test" it works. Clearly I'm missing here something - problem is... what?
create an ant builder or .bat and call that instead; most likely because the environment isn't set up correctly when executing via php; thus when using ant or bat you can set everything up correctly as needed. always use PHP on linux but permissions and the scope / permissions of the account php runs under may come in to play? nathan

« previous php.general (#299602) next »