Re: executing a java app from a php script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It could be a problem with access to execute Java. If the user running the
process (under a web server) is without rights to execute this will not
work.

You can try running the script with CLI from the command line or you can
take a look at the java extension for PHP (www.php.net/java).

- Frank

> Hi,
> 
> I'm trying to do a bit of java execution as part of a php routine and
the
> following just doesn't work:
> 
> <?php
> $cover = "c:\\javatest\\44438.pdf";
> $cover_fin = "c:\\javatest\\44438_fin.pdf";
> $cover_enc = "c:\\javatest\\44438_enc.pdf";
> $docname = "c:\\javatest\\Lovejoy1.pdf";
> 
> $cmd = "java -cp C:\\j2sdk1.4.2_04\\jre\\lib\\itext.jar
> com.lowagie.tools.concat_pdf ".$cover." ".$docname." ".$cover_fin;
> $temp = passthru($cmd);
> ?>
> 
> Even adding tha path to 'java' doesn't help.
> 
> This command works fine from the command line. It adds two pdf files
> together. If I can get this to work, I'll also add the encryption
routine.
> 
> Any ideas
> 
> 
> George in Oxford
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux