Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
How to execute firefox on linux from php
I would like to have a php script that will start firefox on the server where it's running. I need this because I am using a command on firefox to create thumbnail for the opened page.
Currently, if i am using this command from the command line, it is working: "/usr/lib/firefox-3.0.7/firefox -savepng http://www.site-name.com/
--display=:0.0" and firefox generates my thumbnails and saves it.
If I execute the same command above using shell_exec from php, nothing happens and the returned value from shell_exec is NULL.
I tried giving the php script 777 permision, changed owner to root, nobody, still nothing.
What must I do in order to make a php script to execute firefox?