# CSS positioning

**URL:** <https://boards.straightdope.com/t/css-positioning/581618>\
**Category:** Factual Questions\
**Created:** [May 12, 2011, 3:52am UTC](https://boards.straightdope.com/t/css-positioning/581618 "2011-05-12T03:52:05Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![Kaio](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Kaio](https://boards.straightdope.com/u/Kaio)\
**Post date:** [May 19, 2011, 12:03am UTC](https://boards.straightdope.com/t/css-positioning/581618/21 "2011-05-19T00:03:44Z")

</div>

I did find this on the Dreamhost wiki, but it’s greek to me:

> [@](#):
>
> DreamHost currently allows four different PHP configurations:
> 
> ```
> User-installed PHP running as a CGI application
> PHP 4 running as a CGI application
> PHP 5 running as a CGI or FastCGI application
> PHP 5 running as an Apache module (on DreamHost PS only) 
> 
> ```
> 
> DreamHost no longer supports mod\_php on shared servers for these reasons (see the comment from Pete on the linked page for explanation). This functionality may still be available on some servers, but the ability to run mod\_php may be removed at any time. New domains cannot be set to run mod\_php on shared servers, and any domain which is changed away from using mod\_php on a shared server cannot be set back.
> 
> Similarly, domains that are currently set to use PHP 4 will still run under PHP 4, but new domains cannot be set to use it, and setting a domain to use PHP 5 is an irreversible action.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [May 19, 2011, 12:10am UTC](https://boards.straightdope.com/t/css-positioning/581618/22 "2011-05-19T00:10:21Z")

</div>

Is that contact.php?

What about thankyou.php?

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [May 19, 2011, 12:14am UTC](https://boards.straightdope.com/t/css-positioning/581618/23 "2011-05-19T00:14:30Z")

</div>

And honestly, I’m not sure what FastCGI is either, but see if disabling it (you can always change it back later) changes anything:  
[https://panel.dreamhost.com/index.cgi?tree=domain.manage&current\_step=Index&next\_step=ShowEdithttp](https://panel.dreamhost.com/index.cgi?tree=domain.manage&current_step=Index&next_step=ShowEdithttp)

It’s under Web Options -\> PHP mode. Change the type to PHP 5.2 CGI, maybe?

---

<div class="post-metadata">

**Author:** ![Kaio](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Kaio](https://boards.straightdope.com/u/Kaio)\
**Post date:** [May 19, 2011, 12:21am UTC](https://boards.straightdope.com/t/css-positioning/581618/24 "2011-05-19T00:21:40Z")

</div>

The PHP is placed into thankyou.php. contact.php calls it by \<form method=“post” action=“thankyou.php”\>

So, I’ve tried changing PHP mode to just PHP 5.2, and Dreamhost tells me it’ll take some hours to propagate and go into effect. In any case, it still doesn’t work now.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [May 19, 2011, 12:34am UTC](https://boards.straightdope.com/t/css-positioning/581618/25 "2011-05-19T00:34:27Z")

</div>

> [@Kaio](#):
>
> The PHP is placed into thankyou.php. contact.php calls it by \<form method=“post” action=“thankyou.php”\>
> 
> So, I’ve tried changing PHP mode to just PHP 5.2, and Dreamhost tells me it’ll take some hours to propagate and go into effect. In any case, it still doesn’t work now.

Is there nothing else in the working thankyou.php on your host? The expected “You have successfully submitted your inquiry. Please allow up to 48 hours for a response.” on a successful submit doesn’t seem to be in the snippet you posted. See if you can do a search for that text across all your files and see where that line comes from.

---

<div class="post-metadata">

**Author:** ![Kaio](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Kaio](https://boards.straightdope.com/u/Kaio)\
**Post date:** [May 19, 2011, 1:24am UTC](https://boards.straightdope.com/t/css-positioning/581618/26 "2011-05-19T01:24:41Z")

</div>

No, of course, the rest of the HTML is below the script. I posted the script only, as that’s the part that’s malfunctioning. There’s an entire HTML page below it. The thank you page on my host is doing exactly what it’s supposed to do.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [May 19, 2011, 2:02am UTC](https://boards.straightdope.com/t/css-positioning/581618/27 "2011-05-19T02:02:02Z")

</div>

Would you mind posting the entire HTML page for thankyou.php, just in case? I’m asking because (as far as I can tell) the script is referencing functions and variables not present in that snippet and I’m trying to see where they’re coming from. It may be a part of the problem.

---

<div class="post-metadata">

**Author:** ![Kaio](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Kaio](https://boards.straightdope.com/u/Kaio)\
**Post date:** [May 19, 2011, 5:34am UTC](https://boards.straightdope.com/t/css-positioning/581618/28 "2011-05-19T05:34:02Z")

</div>

It’s referencing variables from the form on contact.php.

contact.php:

```auto

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Lawston Fown | Actor, Voiceover Artist, Creative Collaborator | David Goodloe</title>
<link href="DG-styles.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/JavaScript" src="includes/validatecontact.js">
</script>

</head>

<body>

<? include("includes/mainnav.php"); ?>

<? include("includes/banner.php"); ?>

<div id="layout">
 <div id="content">
 
<!-- Main copy starts here: edit only between these flags -->

  <h1>Contact </h1>
 
 <p>David Goodloe <br />
   Agent info here. </p>
   
 <h2>Via Email (<span class="required">»</span> indicates required field)</h2>

<form name="contact" id="contact" action="thankyou.php" method="post" onsubmit="return validate(this)">
<p><span class="required">»</span> Name: <input name="name" id="name" type="text" style="position:relative; left:25px;" /><br />
<span class="required">»</span> Email: <input name="emailaddr" id="emailaddr" type="text" style="position:relative; left:28px;" /><br />
<span class="required">»</span> Phone: <input name="phone" id="phone" type="text" style="position:relative; left:21px;" /></p>
<p><span class="required">»</span> Which service are you interested in? 
	<select name="service" id="service" style="position:relative; left:49px;">
      <option value="" selected>Please select</option>
      <option value="Actor">Actor</option>
      <option value="Voiceover">Voiceover</option>
	  <option value="Other">Other</option>
	</select>
<br />
How did you hear about me?  
<input name="referredby" type="text" id="referredby" style="position:relative; left:118px;" size="19" />
</p>
<p><span class="required">»</span> Message: 
<textarea name="messagetext" id="messagetext" cols="30" rows="3" style="position:relative; left:10px; vertical-align:text-top;"></textarea></p>

 <script type="text/javascript">
 var RecaptchaOptions = {
    theme : 'clean'
 };
 </script>
 
 <?php
    require_once('recaptcha/recaptchalib.php');
    $publickey = "public_key_here"; // you got this from the signup page
    echo recaptcha_get_html($publickey);
 ?>

<input type="submit" value="Submit" style="margin-top:15px; margin-left:150px;" />
</form>
 
  <!-- Main copy ends -->  

 </div>
   
  <? include("includes/footer.php"); ?>
    
</div>
</body>
</html>

```

thankyou.php:

```auto

<?php

require_once('recaptcha/recaptchalib.php');
$privatekey = "private_key_here";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if(!$resp->is_valid) {
header("location:captchaerror.php");
die();

  } else {
    // Your code here to handle a successful verification
	
$email = "email@email.com";

$continue = "index.php";
// This line prevents values being entered in a URL

if ($HTTP_SERVER_VARS['REQUEST_METHOD'] != "POST"){exit;}

$name = stripslashes($HTTP_POST_VARS['name']);
$emailaddr = $HTTP_POST_VARS['emailaddr'];
$phone = stripslashes($HTTP_POST_VARS['phone']);
$service = stripslashes($HTTP_POST_VARS['service']);
$referredby = stripslashes($HTTP_POST_VARS['referredby']);
$messagetext = stripslashes($HTTP_POST_VARS['messagetext']);

$subject = "Lawston Fown Webform: $service";
$message = "Name: $name
 Email Address: $emailaddr
 Phone: $phone
 Referred by: $referredby

";
$message .= "Which Service?: $service

";
$message .= "Message: $messagetext

";

$headers = "From: " . $emailaddr . "
" . "Return-Path: " . $emailaddr . "
" . "Reply-To: " . $emailaddr . "
";

mail($email,$subject,$message,$headers);

}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Lawston Fown | Actor, Voiceover Artist, Creative Collaborator | David Goodloe</title>
<link href="DG-styles.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="media/shadowbox/shadowbox.css" />

</head>

<body>

<? include("includes/mainnav.php"); ?>

<? include("includes/banner.php"); ?>

<div id="layout">
 <div id="content">
 
<!-- Main copy starts here: edit only between these flags -->

  <h1>Thank You </h1>
  <p>You have successfully submitted your inquiry. Please allow up to 48 hours for a response. </p>
  
<!-- Main copy ends -->  

 </div>
   
  <? include("includes/footer.php"); ?>
    
</div>

</body>
</html>

```

I’ve munged the personal info (email address, public/private keys), but everything else is as it is. Again, none of the [recaptcha code](http://code.google.com/apis/recaptcha/docs/php.html) is at issue, on either page. That works fine, I’ve already tested it. It’s just the stuff after

```auto

  } else {
    // Your code here to handle a successful verification

```

that’s causing problems.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [May 19, 2011, 7:18am UTC](https://boards.straightdope.com/t/css-positioning/581618/29 "2011-05-19T07:18:38Z")

</div>

Yay! I figured it out. It has to do with Dreamhost’s PHP configuration, [which disables register\_long\_arrays](http://wiki.dreamhost.com/Register_long_arrays), a setting that your old script relied on.

To fix the problem, in thankyou.php, replace:

All occurrences of **HTTP\_SERVER\_VARS\*\* with \*\*\_SERVER**  
AND  
all occurrences of **HTTP\_POST\_VARS\*\* with \*\*\_POST**

The fixed snippet should look like:

```auto

// This line prevents values being entered in a URL
if ($_SERVER['REQUEST_METHOD'] != "POST"){exit;}

$name = stripslashes($_POST['name']);
$emailaddr = $_POST['emailaddr'];
$phone = stripslashes($_POST['phone']);
$service = stripslashes($_POST['service']);
$referredby = stripslashes($_POST['referredby']);
$messagetext = stripslashes($_POST['messagetext']);

```

ETA: You can re-enable FastCGI now, too. Sorry about that.

---

<div class="post-metadata">

**Author:** ![Kaio](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Kaio](https://boards.straightdope.com/u/Kaio)\
**Post date:** [May 19, 2011, 4:33pm UTC](https://boards.straightdope.com/t/css-positioning/581618/30 "2011-05-19T16:33:47Z")

</div>

You were working on my code at 2am? I’m flattered. 😃

I need to run a bunch of errands, but I’ll try this later today and let you know how it works. Thanks for all your help.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [May 19, 2011, 6:54pm UTC](https://boards.straightdope.com/t/css-positioning/581618/31 "2011-05-19T18:54:36Z")

</div>

> [@Kaio](#):
>
> You were working on my code at 2am? I’m flattered. 😃
> 
> I need to run a bunch of errands, but I’ll try this later today and let you know how it works. Thanks for all your help.

It’s more fun than working on my code at 2am 🙂 One makes me smile, the other makes me want a sledgehammer.

---

<div class="post-metadata">

**Author:** ![Kaio](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Kaio](https://boards.straightdope.com/u/Kaio)\
**Post date:** [May 20, 2011, 10:10pm UTC](https://boards.straightdope.com/t/css-positioning/581618/32 "2011-05-20T22:10:41Z")

</div>

Yay, it works. It is beeyootiful. Thank you.

I suppose this means I ought to update the other forms using this code now, too.

[Previous page](https://boards.straightdope.com/t/css-positioning/581618.md?page=1)
