Disabled PHP functions on GoDaddy.com
During a support issue with a user of one of my web applications I made a fairly important discovery about GoDaddy.com and how they have PHP installed on their servers. Many functions - 44 on the server that my client was on - are disabled. Now, this may be just with their economy package and they have them enabled on the higher priced packages as an incentive to upgrade, but it caught me off guard.
What triggered the problem is that during the installation script it seemed that the SQL file that should have created tables and filled in default values was doing neither. It turns out that most of the file functions are disabled and my script was unable to open the SQL file.
The functions I really needed were fopen(), fread(), and fclose(). Of course there were other that were important, but the file handling functions were the ones that I couldn’t work around.
My solution?
Well, it wasn’t a good one. The first step of the index script now checks for the half dozen or so functions that are critical to my program but disabled on GoDaddy servers. If any of these functions does not exist (they show as non existent if they’re disabled) the script displays and error message and exits. Unfortunately that’s the only way I could think of to handle the problem. With the file functions disabled there really wasn’t a way to get the data I needed.
Question, Comments...
Do you have more questions. Please either leave a comment below or join us in our new forum.