You are here: Re: Trying to execute Java command on server via PHP « PHP Programming Language « IT news, forums, messages
Re: Trying to execute Java command on server via PHP

Posted by Tim Van Wassenhove on 10/07/17 11:37

On 2006-01-06, Good Man <heyho@letsgo.com> wrote:
> For example, the command that PHP gets is:
> java -classpath /myDir:/myDir/CADViewer.jar CADViewer /myDir/
> /myDir/conversions/3857/floor_1_chart.dwf
> /myDir/conversions/3857/floor1.txt

Have you tried with /full/path/to/java ... ?

> I don't think this is a server permissions issue as all files/JARs
> involved are CHMOD'ed properly for execution/writing by the apache
> 'user'. Nor do I think this is a 'directory' restrictive thing, because I
> can type that command regardless of the directory I am in and have it
> work properly (as absolute paths are specified).

Are you doing some image transformations? Or something else that uses java.awt
stuff? Very often a webserver doesn't have a X installation, and this will make
java choke. The solution is to start java with the option
-Djava.awt.headless=true

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://timvw.madoka.be>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация