Running Commands from PHP
Posted: Fri Sep 09, 2005 10:12 am
I'm trying to make a PHP wrapper for webkit2png. webkit2png is a command line program for OS X takes a screenshot of a site with the Safari rendering engine.
The command to run webkit2png is:
This command creates three png files in the local images directory which I chmod'ed to 777.
In php I try:
When running the php file from the command line with:
It works.
When calling the page from a web browser it does not work. I figure it has something to do with my Apache settings but I'm not sure where to look. Any ideas?
Thanks.
The command to run webkit2png is:
Code: Select all
/usr/bin/python ./webkit2png-0.4.sh http://google.com --dir=./images/In php I try:
Code: Select all
<?php
shell_exec('/usr/bin/python ./webkit2png-0.4.sh http://google.com --dir=./images/');
?>Code: Select all
php screenshot.phpWhen calling the page from a web browser it does not work. I figure it has something to do with my Apache settings but I'm not sure where to look. Any ideas?
Thanks.