[Pro] PHP problems all over the place -help!

I hope Tim can help out. This will aggravate me until I return from that conference, for sure.

As for the forms and where they reside, the form I have on my personal web site is on Have-Host. The two Whitehall forms are on a different server that runs through Microsoft Exchange and is controlled by an IT guy.

The Empathy Care site is hosted on Have-Host, BUT e-mails for it reside on, again, a Microsoft Exchange server and controlled by that same IT guy. He told me there are very powerful spam blockers and a multitude of other things that are set up for both Whitehall and Empathy. He thinks this is a spam issue of some sort, but honestly, I don’t get the impression he really has a clue, either. And he doesn’t know web stuff, just the IT stuff. They’re related, but I gather they’re not all THAT related.

Anyway, I’m off for some dinner and wine and anything apart from this. Thank you so very, very much, Mike, for doing your best to help resolve this. I almost one the problem to be generated by me so that I can fix it. I just don’t believe that’s the case.

Laura

P.S. I won’t be back on much at all this evening. I’m brain dead from this stuff.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On Feb 6, 2010, at 11:21 PM, LauraB wrote:

Anyway, I’m off for some dinner and wine and anything apart from this.

P.S. I won’t be back on much at all this evening. I’m brain dead
from this stuff.

Then I am sure the glass of wine will taste all that much better, I
also beleive it can work wonders for dead brains at times :slight_smile: bon appetit


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Laura

Before you completely give up try the following:

Copy the example form table from the document you downloaded and paste it into a fresh, blank page in the whitehillboca site. You will not need to reapply the action because it will be copied over too.

Set the parameters in the action as you were doing before BUT in the top selector change it to: Use a Page for each error

Create error pages for each of the 3 types of error ie Not in Domain, Server Failure, Invalid email

These can be very basic - they only need to contain a few words like “Not in Domain” or “Server Error”

Select these pages and your normal success pages in the relevant pickers.

Upload and test - if you then get an error page we will know what is causing the error.

Report back.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

David, I won’t be able to get to this until I return from my conference on Tuesday. I’m sorry, because I really do appreciate your help.

Laura

P.S. This is that kind of week. Anything I touch seems to turn to dust.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

No problem - we’ll be here.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

In a perfect world, my problems would have vanished while I was off to that conference. They haven’t. I have a few “urgent” messages out to James Wilkinson (and have had for a few days), in case his Have-Host server is doing something odd.

Meanwhile, I have a couple of new questions that may or may not have anything to do with this mystery. I notice in looking into files, both on the servers when I FTP to the path, and in my resource folders, that my online application form for Whitehall Boca – onlineapp.html – apparently generates something called onlineapp.go.php. The two files live in the same folder. The PHP file, upon doing a “get info,” indicates the default app to open it as a Microsoft Excel worksheet. Of course, I can open it in a txt file and it shows just fine. Maybe that’s just some weirdness.

Anyway, the actual “onlineapp.go.php” material is pasted below, in case anyone knows how to read it and can see right away if there’s something wrong with that.

(I also have a message out to Tim Plumb, but he may be away.)

This for me truly is a crisis, and I’ll reiterate I’m willing to pay for someone who knows how to get to the bottom of this issue.

The PHP code:

<?php $notindomain_errorpage = "errorinsending.html"; $server_errorpage = "errorinsending.html"; $invalidaddress_errorpage = "errorinsending.html"; $successpage = "successinsending.html"; $recipient="email@hidden"; $subject="Online Application"; // Set the server variables for older (PHP4,3 etc) systems if (!isset($_SERVER)){ $_POST = &$HTTP_POST_VARS; $_SERVER = &$HTTP_SERVER_VARS; } $servername = $_SERVER['SERVER_NAME']; if ($_SERVER['REQUEST_METHOD']=="POST") { if (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])>7 || !strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])) { header( "Location: ".$notindomain_errorpage ); exit; } else { $msg="The following information was submitted from a form on ".$servername.":\n\n"; foreach($_POST as $key => $val) { //filter out any form items called send or reset //image based submit and reset buttons will be in the format // send_x: 13 // send_y: 10 $myKeySlice = substr("$key",0,4); if ($myKeySlice != "send" && $myKeySlice != "rese"){ if ($key == "subject" || $key == "email" || $key == "name"){ //Prevent injection attacks by stripping tags and newlines from the data //Do this only on data that makes it into the e-mail header as newlines in a message body should still be valid $key = strip_tags($key); $val = strip_tags($val); if (eregi("\r",$key) || eregi("\n",$key)){ header( "Location: ".$notindomain_errorpage ); exit; } if (eregi("\r",$val) || eregi("\n",$val)){ header( "Location: ".$notindomain_errorpage ); exit; } } //replace any underscores in the input names (PHP puts these in!) with spaces $key = str_replace("_"," ",$key); //if the form item is called "subject" then set this as the subject line of the mail if ($key == "subject"){ $subject=$val; } else { if (is_array($val)){ $msg.="Item: $key\n"; foreach($val as $v) $msg.=" $v\n"; } else { $msg.="$key: $val\n"; } } } } //set up the default headers $headers = ""; //get the senders name (if specified) if ($_POST["Name"]) { $name = $_POST["Name"]; } else { $name = ""; } //get the senders email address (if specified) if (isset($_POST["Email"])) { $email = $_POST["Email"]; if (!preg_match('/^[a-zA-Z0-9_\.-]+@[a-zA-Z0-9-\.]+\.[a-zA-Z]+(\.[a-zA-Z]+)?$/', $email)){ header( "Location: ".$invalidaddress_errorpage ); exit; } } else { //the email is missing! //strip the domain from the address //www.domain.com -> domain.com if (substr($servername,0,4) == "www."){ $theaddress = substr($theaddress,4); } $email = "noreply@".$theaddress; $msg.="\n\n------------------------------------------------------------------"; $msg.="\nPLEASE NOTE: This is a message from the ".$servername." web site"; $msg.="\nand has been sent from a machine and not a person."; $msg.="\nPlease do not reply to this e-mail as it will bounce."; $msg.="\n------------------------------------------------------------------"; $recipient = "email@hidden"; } $headers .= "From: $name <$email>\r\n"; //add the correct headers for plain text //see: http://www.webmasterworld.com/php/3949990.htm $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=\"ISO-8859-1\"\n"; $headers .= "Content-transfer-encoding: 7bit\n"; $headers .= "Reply-To: $email\r\n"."Return-Path: $email"; error_reporting(0); if (mail($recipient, $subject, $msg, $headers)){// header( "Location: ".$successpage ); } else { header( "Location: ".$server_errorpage ); } } } else { header( "Location: ".$server_errorpage ); } ?>

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

By the way, Dave, I tried the PHP test you suggested, creating separate error pages for the three possibilities. When filled out correctly, it goes to the “server error” page. It doesn’t go to the success page, as it should.

You can see what that one is all about here:
http://www.whitehallboca.com/phptestform.html

Laura


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That onlineapp-go.php file is normal practice.

If your page was called contact.html then the file created (by the PHPFF action) would be contact-go.php

It may default to Excel to open it but it is actually just a text file.

The fact that you are getting a Server Error on the whitehall site suggests just that - A Server Problem. You will need to ask the host some questions about their PHP support or if there is any special script that they insist on for this sort of thing.

Certainly a Have-Host site shouldn’t give this sort of error.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Everything at this point suggests some kind of server problem. But it’s an unusual situation. James is at dinner somewhere. We’re trying to hook up now.

(Dang, isn’t this too exciting for words??)


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Laura,
I suspect because of your server issues that you didn’t get my email I
sent you yesterday.
Here it is again;


Hi Laura,
Firstly apologies for the problems you are having with the action and
I’m sorry I missed the thread in my email. I’ve not had too much time
to pick up on FWTalk lately and that thread has remained unread until
now. In future don’t feel bad about CCing or BCCing me on any issue
that involves one of my actions.

Generally if the action has been working OK and then stops I would
almost always put money on something changing on the server side of
things. The first thing to do is to set an error page for each of the
three error states and see where the error is cropping up from. I
suspect it will be the ‘server failure’ page as the other two (‘not in
domain’ and ‘invalid email address’) are quite specific.

Try this;

  1. Take the PHP code below and paste it into a plain text file, change
    the email address for your own and save the file as ‘mail.php’
  2. FTP the file into your server space
  3. Using your web browser surf to the uploaded file (Whitehall | Nursing & Rehabilitation - Boca Raton, FL
    for example)
  4. You should receive an email called “Testing, testing”
<?php
// The message
	$message = "Testing 1,2,3";
	
// Send
	mail('email@hidden', 'Testing, testing...', $message);
?>

If you don’t get the email then there is something wrong with the way
the server is sending the emails. If you do get the email then open
the attached text file up and change your email address for the one
you are using in the real form (the one you are having problems with).
Repeat the process with the browser and see if you get the resulting
email. If you don’t then there is an issue with the spam mail
filtering (I suspect), if you do get the email then I’ve got some
detective work to do to figure out what the issue is with the action!

Let me know how you get on with this.
Regards,
Tim.


Regards,
Tim.

On 9 Feb 2010, at 19:56, LauraB wrote:

In a perfect world, my problems would have vanished while I was off
to that conference. They haven’t. I have a few “urgent” messages out
to James Wilkinson (and have had for a few days), in case his Have-
Host server is doing something odd.

Meanwhile, I have a couple of new questions that may or may not have
anything to do with this mystery. I notice in looking into files,
both on the servers when I FTP to the path, and in my resource
folders, that my online application form for Whitehall Boca –
onlineapp.html – apparently generates something called
onlineapp.go.php. The two files live in the same folder. The PHP
file, upon doing a “get info,” indicates the default app to open it
as a Microsoft Excel worksheet. Of course, I can open it in a txt
file and it shows just fine. Maybe that’s just some weirdness.

Anyway, the actual “onlineapp.go.php” material is pasted below, in
case anyone knows how to read it and can see right away if there’s
something wrong with that.

(I also have a message out to Tim Plumb, but he may be away.)

This for me truly is a crisis, and I’ll reiterate I’m willing to pay
for someone who knows how to get to the bottom of this issue.

The PHP code:

<?php $notindomain_errorpage = "errorinsending.html"; $server_errorpage = "errorinsending.html"; $invalidaddress_errorpage = "errorinsending.html"; $successpage = "successinsending.html"; $recipient="email@hidden"; $subject="Online Application"; // Set the server variables for older (PHP4,3 etc) systems if (!isset($_SERVER)){ $_POST = &$HTTP_POST_VARS; $_SERVER = &$HTTP_SERVER_VARS; } $servername = $_SERVER['SERVER_NAME']; if ($_SERVER['REQUEST_METHOD']=="POST") { if (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])>7 || !strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])) { header( "Location: ".$notindomain_errorpage ); exit; } else { $msg="The following information was submitted from a form on ".$servername.":nn"; foreach($_POST as $key => $val) { //filter out any form items called send or reset //image based submit and reset buttons will be in the format // send_x: 13 // send_y: 10 $myKeySlice = substr("$key",0,4); if ($myKeySlice != "send" && $myKeySlice != "rese"){ if ($key == "subject" || $key == "email" || $key == "name"){ //Prevent injection attacks by stripping tags and newlines from the data //Do this only on data that makes it into the e-mail header as newlines in a message body should still be valid $key = strip_tags($key); $val = strip_tags($val); if (eregi("r",$key) || eregi("n",$key)){ header( "Location: ".$notindomain_errorpage ); exit; } if (eregi("r",$val) || eregi("n",$val)){ header( "Location: ".$notindomain_errorpage ); exit; } } //replace any underscores in the input names (PHP puts these in!) with spaces $key = str_replace("_"," ",$key); //if the form item is called "subject" then set this as the subject line of the mail if ($key == "subject"){ $subject=$val; } else { if (is_array($val)){ $msg.="Item: $keyn"; foreach($val as $v) $msg.=" $vn"; } else { $msg.="$key: $valn"; } } } } //set up the default headers $headers = ""; //get the senders name (if specified) if ($_POST["Name"]) { $name = $_POST["Name"]; } else { $name = ""; } //get the senders email address (if specified) if (isset($_POST["Email"])) { $email = $_POST["Email"]; if (!preg_match('/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-.]+.[a-zA- Z]+(.[a-zA-Z]+)?$/', $email)){ header( "Location: ".$invalidaddress_errorpage ); exit; } } else { //the email is missing! //strip the domain from the address //www.domain.com -> domain.com if (substr($servername,0,4) == "www."){ $theaddress = substr($theaddress,4); } $email = "noreply@".$theaddress; $msg.="n n------------------------------------------------------------------"; $msg.="nPLEASE NOTE: This is a message from the ".$servername." web site"; $msg.="nand has been sent from a machine and not a person."; $msg.="nPlease do not reply to this e-mail as it will bounce."; $ msg .= "n ------------------------------------------------------------------"; $recipient = "email@hidden"; } $headers .= "From: $name <$email>rn"; //add the correct headers for plain text //see: http://www.webmasterworld.com/php/3949990.htm $headers .= "MIME-Version: 1.0n"; $headers .= "Content-type: text/plain; charset="ISO-8859-1"n"; $headers .= "Content-transfer-encoding: 7bitn"; $headers .= "Reply-To: $emailrn"."Return-Path: $email"; error_reporting(0); if (mail($recipient, $subject, $msg, $headers)){// header( "Location: ".$successpage ); } else { header( "Location: ".$server_errorpage ); } } } else { header( "Location: ".$server_errorpage ); } ?>

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

FreewayActions.com - Freeware and commercial actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi, Tim:

I did as you suggested and FTP’d the mail.php text file directly into the whitehallboca server. It returned to me. I then changed the e-mail address to another person at Whitehall to double-test it. She, too, received the e-mail. (This is the client site in which the online application form had been working, and then abruptly stopped. No matter what anyone put in the fields, the form always returned the error page I had created instead of the success page.)

Paetec, the server on which Whitehall resides, is meanwhile doing some testing. They’re supposed to report back to me sometime soon. Will keep you advised on that one.

Meanwhile, I’m going to try and use your same process to test the issue at Empathy Care. In that case – and I know this gets confusing – the form beautifully returns information to anyone designated as the recipient as long as that person does NOT have an empathycare.org e-mail address. That’s what’s made me believe something weird happens on the server side that deals only with e-mail. The rest of the site is held on Have-Host. But I can’t test it just yet because Have-Host must be down for the moment and I can’t connect to the server at all to upload the mail.php file. Also, James is apparently not in a position to respond to e-mails until this evening.

Laura


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Laura,
It sounds like the mail function on the whitehallboca server should be
working now. Try the action again and set it to use three error pages
rather than the single one. If the server returns an error then you
should know a bit more about it.
The mail.php code is a stripped down, bare bones, mail script and uses
the same code as the action.
I’m not sure why the Empathy Care server would reject a mail from it’s
own domain. typically servers are set up so that a trusted address
originates from the same domain. Please let me know what you find out
from your host.
Regards,
Tim.

On 10 Feb 2010, at 19:15, LauraB wrote:

Hi, Tim:

I did as you suggested and FTP’d the mail.php text file directly
into the whitehallboca server. It returned to me. I then changed the
e-mail address to another person at Whitehall to double-test it.
She, too, received the e-mail. (This is the client site in which the
online application form had been working, and then abruptly stopped.
No matter what anyone put in the fields, the form always returned
the error page I had created instead of the success page.)

Paetec, the server on which Whitehall resides, is meanwhile doing
some testing. They’re supposed to report back to me sometime soon.
Will keep you advised on that one.

Meanwhile, I’m going to try and use your same process to test the
issue at Empathy Care. In that case – and I know this gets
confusing – the form beautifully returns information to anyone
designated as the recipient as long as that person does NOT have an
empathycare.org e-mail address. That’s what’s made me believe
something weird happens on the server side that deals only with e-
mail. The rest of the site is held on Have-Host. But I can’t test it
just yet because Have-Host must be down for the moment and I can’t
connect to the server at all to upload the mail.php file. Also,
James is apparently not in a position to respond to e-mails until
this evening.

FreewayActions.com - Freeware and commercial actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Whew . . . the problem for Whitehall is fixed. The Whitehall server, Paetec, was at fault here. It took them a day and a half to learn (after my initial call) that “partitions on their server were filled.” I don’t know what that actually means or what they did, but it’s working again. They told me that alerting them to the issue I was experiencing served as a red flag for a system-wide problem they hadn’t been aware of it. Gee. Happy to have helped.

As for my Empathy Care issue, that continues and can’t now be resolved until Have-Host comes back up across the board. Not sure what’s going on, but for Have-Host to go down in addition to the problem I was already dealing with has only compounded things. I’ll keep you all posted, primarily because you’ve all been so unbelievably helpful. I can’t say enough about the value of this forum.

Laura


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

A final note: My issue with the Empathy Care site and its forms is finally over. It was a server problem that Have-Host’s technicians finally identified and were able to fix.

Again, my thanks to all who contributed solutions and testing possibilities.

Laura


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I have also had problems with PHP Forms. I have used the action, which appears to be working. You get a confirmation “thanks” page, but the info is never sent to my email account listed.

I am hosted through GoDaddy, and have tried, in the action settings, turning on GoDaddy’s mail form, but then I just get an error message instead of a thanks page. Does anyone know why I wouldn’t be receiving the test emails?

The site is… http://joshaveryclayton.com/coachingcontact.html

Thank you.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

have tried, in the action settings, turning on GoDaddy’s mail form, but then I just get an error message instead of a thanks page.

What error are you getting?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

David,

Thank you so much for the response!

The error message is:

“The requested URL /gdform.php was not found on this server.”

And yes, I did set it up with GO Daddy over the phone to have my email registered with them.

If you go to the link and try to send a message, you will see the error message yourself.
http://joshaveryclayton.com/coachingcontact.html

This is the second way I have tried to instal the PHP form. I would prefer to just fill out the info according to the instructions without checking the box “use Go Daddy’s mail script” because I am planning on switching hosting services (which maybe will solve the problem anyways).

I have uploaded the site with the Go Daddy mail script button checked so you can see the error message. When I upload it without the box checked, it confirms the message was sent (by showing the thank you page I designed), but it never reached my inbox.

Thank you for any help/suggestions!!!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

When I upload it without the box checked, it confirms the message was sent (by showing the thank you page I designed), but it never reached my inbox.

Reaching the thanks page is not an indication that the email was actually sent I’m afraid - only that the redirect works.

Firstly have you confirmed that the GoDaddy form script is on the server and its correct location (path)

I dont have the action in front of me but does it expect you to put in the full path to the gdform.php page or a relative path - I think this is where it is falling down.

The path is I suspect wrong or is it the filename for the script page (gdform.php)

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I would prefer to just fill out the info according to the instructions without checking the box “use Go Daddy’s mail script” because I am planning on switching hosting services (which maybe will solve the problem anyways).

Yes and Yes. GD has some funny things going on - that was why Tim had to modify the action in the first place. So moving to another host would help - one that supports PHP of course (and unix based). I assume that PHP is enabled in your account?

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yeah PHP is enabled. GD seemed to think everything was fine on their end.

I’m extremely new to this, so outside of installing the actions and following the directions, I am a bit clueless. I noticed their is another action that allows the same thing. It might be helpful to install and run that and see the response, no?

Do you recommend any particular hosting service if I decide to move?

As always, thanks.

Josh


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options