Jump to content

Run php in linux command line


figo2476

Recommended Posts

Hi:

 

Basically, run.php will do some stuff for PDF & it will run shell command lines by shell_exec()

e.g.

shell_exec("/var/www/vhosts/site.com/httpdocs/applications/home/utils/linux/pdf2image")

 

I run:

run.php in command line, then sh complains

 

error:

sh: /var/www/vhosts/site.com/httpdocs/applications/home/utils/linux/pdf2image: No such file or directory

sh: /var/www/vhosts/site.com/httpdocs/applications/home/utils/extract/pdf2image: No such file or directory

 

comments:

It happens that I can run ./pdf2image inside the correct directory in shell. If I specify the full path in shell

like /var/www/vhosts/site.com/httpdocs/applications/home/utils/linux/pdf2image, it will complain No such file or directory

 

any hint?

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/105200-run-php-in-linux-command-line/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.