RE: executing a java app from a php script

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

 



Frank,

This script is only ever going to be used by me, but I'd like to avoid the
command line.

I've checked the permissions and there's no problem there.

I've now gone the extra step of having the java command written to a batch
file and then I try and exec{} or passthru{} the batch file but with the
same negative result as before.

Any suggestions?

Cheers

George

> -----Original Message-----
> From: Frank M. Kromann [mailto:frank@xxxxxxxxxxxx]
> Sent: 14 June 2004 6:00 pm
> To: George Pitcher
> Cc: php-windows@xxxxxxxxxxxxx
> Subject: Re:  executing a java app from a php script
>
>
> 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
>
>

-- 
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