Most hosting companies today, which offer PHP hosting tend to disable certain PHP functions mostly for security reasons. Contacting support to check if a function is available or not can sometimes be really tough. To save you all this trouble, here is a short script, which will tell you if a function is available. In this example, I will use the exec function:
<?php
if(function_exists(’exec‘)) {
echo “exec function is enabled”;
}
else {
echo “exec is not available”;
}
?>
This uses the function_exists function to test whether exec is enabled. To test with others simply replace exec with the function you are interested in :)
To perform the test, simply place this code in a file named testing.php and upload the file to your hosting space. Then access it via your browser.