Go Daddy

Soldato
Joined
18 Aug 2011
Posts
2,853
Location
Norfolk
I have set up an account with these, registered a domain and paid for hosting.

For those that have done the same, how do I get the website live?

I have uploaded the relevant files, pictures etc to the file manager by going
Web Hosting > Manage > File Manager > Web Root (public_html/www) > Go > then put it under the public_html folder

But...then what?

When I go to "Preview Website" and click Preview, I just get a text file with the code for the home page I created? :confused:
 
Yea, I get a download thing too unless I put in the IP address then it's some kind of holding site which says "something exciting coming soon" and I can login and it just takes me to the web hosting management page.

I tried the preview thing earlier but it just opens the "home" page in notepad?

Guess I will have to contact them. :/
 
The .htm files are being delivered as attachments for reasons I don't know. The .css file works fine though.

Is there a .htaccess file in the directory which is forcing this?

Also, try changing .htm to .html.

I do have a .htaccess file in there (although I can't see it in the file manager to delete).

I have changed everything from .htm to .html but nothing changed.

Code in the .htaccess file is:

Code:
AddType application/x-httpd-php .php .htm .html
 
have you saved it as "index.html" or "index.php" and uploaded that to the public folder?

Code could use a rewrite too after reading through the downloaded file :)

Don't have anything saved as index.html or index.php.

Yes I know the code isn't great, it was my first attempt and I was learning as I went along as most of my experience is with Java and I can't design to save my life.

Most of the stuff in the css file is redundant. :o
 
Last edited:
I've found it to be much quicker changing hosts in this sort of situation, rather than wasting time trying to trouble shoot the issues you get from hosts who don't have user friendly systems at all.

Unfortunately he has paid for the domain name and 3 years hosting. Is it easy to cancel?
 
As for the error it seems php handler issue. you need to add those rules in .htaccess, for this I am sure your hosting provider should help you... which I dont expect from godaddy they are worst in support .. better change your provider .. you can try WebhostUK they should be able to help you in minutes with this issue.

I'm going to try now. Should be fun...
 
Thanks for the replies so far everyone.

Just looking at the type Go Daddy has the files saved as they are "application/x-httpd-php"

I guess that's the issue. I can't see the .htaccess file to delete it though.
 
Last edited:
Nah, it was me. :)

Should I upload a blank .htaccess file then to replace the other one?

I guess I would be best off deleting all the uploads I have done and start again?

EDIT: Replaced the .htaccess file with a blank copy and I can preview all the pages now. I guess it's time to get it live and test it I guess - anyone know where that option is?
 
Last edited:
Ok, it's up and running but my contact form seems to have gone up the spout.

I tested it on my PC using XAMPP and mail server and it worked fine.

It sent an email to the person contacting and to Gary Marcks, but now it's just meh...

PHP:
		        <?php
			// define variables and set to empty values
			$nameErr = $emailErr = "";
			$name = $email = $comment = "";

			if ($_SERVER["REQUEST_METHOD"] == "POST") 
			{
   				if (empty($_POST["name"])) 
				{
     				$nameErr = "Name is required";
   				} 
				else 
				{
     				$name = test_input($_POST["name"]);
     				// check if name only contains letters and whitespace
     				if (!preg_match("/^[a-zA-Z ]*$/",$name)) 
					{
       					$nameErr = "Only letters and white space allowed"; 
     				}
   				}
   
   				if (empty($_POST["email"])) 
				{
     				$emailErr = "Email is required";
   				} 
				else 
				{
     				$email = test_input($_POST["email"]);
     				// check if e-mail address is well-formed
     				if (!filter_var($email, FILTER_VALIDATE_EMAIL)) 
					{
       					$emailErr = "Invalid email format"; 
     				}
   				}
     
   				if (empty($_POST["comment"])) 
				{
     				$comment = "";
   				} 
				else 
				{
     				$comment = test_input($_POST["comment"]);
   				}
			}

			function test_input($data) 
			{
   				$data = trim($data);
   				$data = stripslashes($data);
   				$data = htmlspecialchars($data);
   				return $data;
			}
		?>

	<p><span class="error">* required field.</span></p>
	
	<form method="post" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']);?>"> 
	
   	<label>Name:</label> <input type="text" name="name">
   	<span class="error">* <?php echo $nameErr;?></span>
   	<br><br>

   	<label>E-mail:</label> <input type="text" name="email">
   	<span class="error">* <?php echo $emailErr;?></span>
   	<br><br>

   	<label>Comment:</label> <textarea name="comment" rows="5" cols="40"></textarea>
   	<br><br>

	<input id="submit" input type="submit" name="submit" value="Submit">
	<br><br>
	</form>
	
	<?php
		//email the site owner
		$to      = '[email protected]';
		$subject = 'QUESTION TO GARY MARCKS PLASTERING';
		$message = '$name has asked: "$comment."';
		$headers = 'From: $email' . "\r\n" .
		'Reply-To: [email protected]' . "\r\n" .
		'X-Mailer: PHP/' . phpversion();

		mail($to, $subject, $message, $headers);
	
		//email the site visitor
		$userto      = '$email';
		$usersubject = 'Thank you for contacting Gary Marcks Plastering';
		$usermessage = 'Thank you, $name, for contacting Gary Marcks Plastering. Your query will be answered as soon as possible.';
		
		mail($userto, $usersubject, $usermessage, $headers);
	?>

I guess the [email protected] is one obvious error?

Is it because of the .htaccess page and now the code isn't recognizing the code as php?
 
Back
Top Bottom