Calling jar from PHP

claigmaenvimi

New Member
I've got a jar file I created that can generate a PDF file. I've called it from the command line like this - \[code\]java -jar project.jar 'Author, An---A Title'\[/code\]This works fine but when I call the same jar file from a PHP file with the following code it creates a file with the correct name but its empty and has zero bytes. \[code\]<?php echo exec("java -jar project.jar 'Author, An---A Title'");?>\[/code\]I'm sure this is a problem not with the jar (since it works from the commandline) and I'm almost sure its not from the PHP file (since it created the empty file, so it must have been read), so I think the problem might be with permissions on the directory? I'm using linux and the PHP is running through XAMMP which is in the OPT directory. Any ideas?Thanks in advance.
 
Back
Top