Wow, after 8+ hours of working on this single permissions problem, I tried one thing after I created this thread:
Code:
chmod 777 /usr/local/bin/flip.pl
chmod 777 /var/www/htdocs/images/
And everything is working fine. (lol the Bold button is upside down)