I recently made the mistake of starting a web hosting account with GoDaddy. Let me start by saying that any comments or answers that I should walk away from the money I spent with GoDaddy and go with someone else will be flagged. I have heard this countless times and do not wish to hear it again.

Perhaps I am naive but I thought that PHP was enabled by default on shared web hosting. Certainly PHP should be enabled, my account started with two webform mailer scripts, webformmailer.php and gdform.php. There also exists a php.ini file that cannot be modified or deleted. It seems to prevent certain things like registering globals and other security concerns on a shared hosting environment.

PHP is not enabled though. A simple test script spits back text, telling me the PHP handler doesn't exist or it is just not installed.

<?php phpinfo(); ?>

The above just returns text.

There was no .htaccess file so I decided to add one myself. It made no difference.

AddHandler application/x-httpd-php .php

Options +ExecCGI +FollowSymLinks

The php.ini file that they provided in my account is as follows:

register_globals = off
allow_url_fopen = off

expose_php = On
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

; Only uncomment zend optimizer lines if your application requires Zend Optimizer support


; -- Be very careful to not to disable a function which might be needed!
; -- Uncomment the following lines to increase the security of your PHP site.

;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
;             phpinfo, exec, system, dl, fsockopen, set_time_limit,
;                     popen, proc_open, proc_nice,shell_exec,show_source,symlink"

After contacting customer support they insist that there is nothing wrong with my account. I must be doing something very stupid here because I can't find any instance on the web where somebody experienced a similar problem with GoDaddy.

  • 1
    Try running <?php echo date();?> and see if it returns anything. I have a suspicion that GoDaddy disables phpinfo() for security purposes. If it still fails, comment here please. – ionFish Feb 18 '13 at 13:24
  • @ionFish Nope... still just text. – maple_shaft Feb 18 '13 at 13:27
  • 1
    Voting to close. GoDaddy does offer PHP standard on their hosting plans. If it's not working, this is a support issue, not something outside people are going to solve for you. – Su' Feb 18 '13 at 16:05
  • @Su' I suspected as much, I just wanted to verify that it wasn't somehow my fault. You are wrong on this. – maple_shaft Feb 18 '13 at 16:08
  • I got a Godaddy account and it has no problems using phpinfo. You can enable ssh within your control panel and find out whats going on. – Simon Hayter Feb 18 '13 at 20:43

Searching suggests that GoDaddy shared hosting does indeed have php enabled by default.

PHP is a popular and simple server scripting language that enables Web developers to embed dynamic content into Web pages. PHP 5 is enabled for all Linux hosting accounts. PHP 5 is enabled for Windows hosting accounts running IIS 7, only.

Seeing the text of your .php file sent back to you like this generally suggests that the httpd server is misconfigured. As this is a server side issue and you are on shared hosting then the only people who can fix this are GoDady.

You should press your issue with them - provide them the link to your php page that is not loading correctly to demonstrate the issue.

  • Thank you, I wanted a sanity check. I was curious though... they have a one click install for Wordpress but I don't need it so I never attempted to install it. Is it possible that PHP will only be enabled by installing Wordpress, seeing as how most GoDaddy sites use either their website builder tool or Wordpress? – maple_shaft Feb 18 '13 at 13:53
  • @maple_shaft: I really don't know GD except by reputation. It's not going to hurt to try the one click install - the worst that happens is that it provides you more ammunition... I would remove any tweaks I had made to php.ini, .htaccess etc and confirm that it still doesn't work. Backup my files. Install WP and see what happens. If it still doesn't work you have more ammo if it does - winner. – user2483 Feb 18 '13 at 14:07
  • If it works then you'll need to disable it (delete) and undo some bits and pieces it places in the .htaccess etc. – user2483 Feb 18 '13 at 14:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.