R
R
ruboss2015-11-04 23:40:55
linux
ruboss, 2015-11-04 23:40:55

How to work with file by absolute path in java launched via exec in php on linux?

I run jar through the console - everything works

java -Xms128m -Xmx512m -d64 -jar indexer.jar /var/www/html/storage/movie.mp4 1 1 i7

I run the jar script from php via exec - it does not find the file "/var/www/html/storage/movie.mp4"
$answer = exec('java  -d64 -jar indexer.jar '.$path.' '.$type.' '.$movieId.' '.Constant::INDEX, $out);

What could be the problem? Don't have file permissions? Or something with exec paths?
Works on Windows

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
ruboss, 2015-11-04
@ruboss

Did chmod + chown and everything worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question