Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's 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 its 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

Mike123456Mike123456 Posts: 1Member
Hello,
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?
Sign In or Register to comment.