php path on heroku doesnt works in exec -


i got php application on heroku. while enable php, run command, i've found somewhere @ stackoverflow:

heroku config:add ld_library_path=/app/php/ext:/app/apache/lib setting config vars , restarting zfq... done, v7 ld_library_path: /app/php/ext:/app/apache/lib 

this command command line works fine:

heroku run ./php/bin/php -v running `./php/bin/php -v` attached terminal... up, run.3208 php 5.3.10 (cli) (built: mar 26 2012 08:15:52) copyright (c) 1997-2012 php group zend engine v2.3.0, copyright (c) 1998-2012 zend technologies 

but code:

$nickname = $_post['nickname']; $filename = "1.txt"; $cmd      = './php/bin/php -v > "' . $filename . '" 2>&1 &';  exec($cmd, $output); $contents = file_get_contents($filename); unlink($filename);  exit_ajax($contents); 

returns sh: ./php/bin/php: not found

if change ./php/bin/php ~/php/bin/php - returns false

to ./php - returns sh: ./php: not found

that works fine

$cmd = "/app/php/bin/php -v " ... 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -