Parse error on Facebook Application with GoDaddy hosting php4 & php5

Posted on July 12, 2007
Filed Under Underground |

Developing a Facebook application on a server hosted with GoDaddy, we kept on getting a parse error on line# such and such when the application was tested.

What was the problem?

The problem was that GoDaddy runs php version 4 and version 5 concurrently with the Linux hosting configuration 2.0 . Facebook applications only run on php version 5. When checking the version of php, the script   <?php phpinfo(); ?>   indicates that GoDaddy is running php version 4.3.

How to fix this?

Well, there are a lot of proposed fixes out there. Difficult to find and GoDaddy documentation and customer service is unclear and muddled. The simple fix, include a .htaccess file in the root directory with the following line below:

AddHandler x-httpd-php5 .php

Link for more info from GoDaddy

Thus, all your php now looks like php5 to GoDaddy and your Facebook applications work. Same thing for Joomla btw.

Comments

Leave a Reply