Sounds like it's a file permissions problem. On my system (ubuntu) apache runs as the user "www-data". Check if you have this user as well:
Code:
cat /etc/passwd | grep www
and if you do then likely you need to set the script so that the group "www-data" can execute it.
Code:
chown :www-data <your-script> && chmod 755 <your-script>
You may need to change the library so it can be read by this group, not sure.