This is a recurring topic in stackoverflow, but finally I couldn't find any clear solution.
I'VE THIS PHP SCRIPT ON MY LOCAL XAMPP (OS X)
test.php
<?php exec('lpr -MyPrinter photos/image.jpg'); ?>
IT WORKS IF I CALL IT FROM TERMINAL
kurt$ php test.php
BUT IT DOES NOT WORK IF I CALL IT FROM BROWSER
http://localhost/mysite/test.php
Consider that my security requirements are very low, because I'll use this script locally only for personal purposes. Can you address me to the right solution?