PHP Feedback form and PHP5

Hi

I’ve had a problem with php feedback form action which i have used loads of times in the past, I then realised alot of my sites have a new problem. Turns out server has been updated to php5. Can anyone tell me if that would cuase a problem and if there is a cure.

Cheers

Anthony


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

PHP5 introduces some new default behaviors that may or may not affect
the internals of PFF.

One of these is the deprecation (removal, in geek-speak) of the “long-
form” variables like $HTTP_POST_VARS in favor of $_POST and similar.
If PFF uses the long-form, and your hosting provider has not toggled
the backward-compatibility option on (register_long_arrays = on) then
you might end up with a form that does not appear to contain any
fields at all.

Walter

On Sep 10, 2010, at 1:43 PM, agallagher wrote:

Hi

I’ve had a problem with php feedback form action which i have used
loads of times in the past, I then realised alot of my sites have a
new problem. Turns out server has been updated to php5. Can anyone
tell me if that would cuase a problem and if there is a cure.

Cheers

Anthony


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


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

By the way, PHP5 has been out for YEARS, and PHP4 has been deprecated
for YEARS. It’s really not recommended that anyone use it, because it
hasn’t been kept up to date for security upgrades. A host that is
still only using PHP4 should be looked at sideways and considered
something of a security threat to you and your clients.

Walter

On Sep 10, 2010, at 2:10 PM, Walter Lee Davis wrote:

PHP5 introduces some new default behaviors that may or may not
affect the internals of PFF.


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

Hi Walter

Thanks for the help. I’m a little confused, if PHP5 has been out for years, do you think the problem could be something other than this upgrade?

Are people still using the PHP feedback form action or have I been left behind without realising it?

From what the host (heartinternet.com) tell me I have to add some code to the root telling it to use PHP4. This sounds a bit crazy as it will mean me updating every site I have built with a form or they won’t work. Have I got this right do you think.

Here’s what the support team said

“Thanks for contacting us. This may be related to a HP upgrade we made. We have updated our version of php so the default used is php5 rather than php4. If you were previously using php4 and the upgrade has caused you problems then adding the following line to your .htaccess file in the root of your site and renaming php.ini files to php4.ini will revert it to the old version.”

What do you think of this.

Thanks Walter

Anthony


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

On Sep 10, 2010, at 3:49 PM, agallagher wrote:

Hi Walter

Thanks for the help. I’m a little confused, if PHP5 has been out for
years, do you think the problem could be something other than this
upgrade?

I suspect that the change to PHP5 was made by your host some time ago,
but PHP4 was left in place as an “optional” system for people who had
production code that wasn’t PHP5-safe. At some point, your host
decided enough was enough and force-upgraded everyone, perhaps because
one of their servers got hacked or some scary security alert finally
convinced them.

Are people still using the PHP feedback form action or have I been
left behind without realising it?

Nope, and it’s a great system with loads of applications. There are
always many other ways to do things, but it remains the go-to method
for building interactive forms in Freeway.

From what the host (heartinternet.com) tell me I have to add some
code to the root telling it to use PHP4. This sounds a bit crazy as
it will mean me updating every site I have built with a form or they
won’t work. Have I got this right do you think.

Here’s what the support team said

“Thanks for contacting us. This may be related to a HP upgrade we
made. We have updated our version of php so the default used is
php5 rather than php4. If you were previously using php4 and the
upgrade has caused you problems then adding the following line to
your .htaccess file in the root of your site and renaming php.ini
files to php4.ini will revert it to the old version.”

Well sure, you can do it, but I think the better thing would be to
work with Tim Plumb to see if he can update the Action. PHP5 is head,
shoulders, and knees above PHP4, so it’s worthwhile to get your
application to work with it, rather than to go back to PHP4. There
will come a time when you can’t find 4 any more anywhere.

Walter


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

Hi Walter

Thanks again, Tim Plumb had already updated the action and all is working perfectly again. Thank you.


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

Tim Plumb had already updated the action and all is working perfectly again. Thank you.

Hi Anthony - do you mean that you were using an older version of the action?

David


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

Hi David - Yes I was, but once I loaded the new one all i had to do was delete the old one and the the new one took the settings from the old one, if that makes sense. All I had to then was to open any sites using the old action and upload.


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

It does pay to keep an eye on ActionsForge as the opening page gives you a link to the 20 latest ones.

David


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

Thanks for the above dialogues …

It sounds like I have the same issues, however I did look on Tim’s FreewayActions website and on ActionsForge and cannot see an updated Action. Tim’s website says it’s at 2.4.8 but what downloads is 2.4.7 and I cannot find PHP Feedback Form on ActionsForge any help and a link to the newly revised Action from Tim would be invaluable. TIA Peter

Sorry I now see the discussion was 11 Years ago so this probably is not the answer!!!

You may want to try the built in Send Form Action (in Freeway 7), as that does handle more modern PHP versions without error.

Walter

Thanks Walter,

Converted now and works fine …

The only thing, is there a way to order the items in the form to comply with the order on the webpage.

Also I notice if you miss out the email address in the form it still succeeds then arrives at the destination without an email ???

Read the Freeway manual for more info on this Action. It has a lot of features regarding e-mail. You can choose a field to be the “from” address, or you can set a single address to do the sending (many ISPs require that form-mail processors send only from a valid address within your domain) and this is all configurable.

As far as the order of fields go, they will appear in the e-mail in the source order of your HTML document. If you select Show Items in the cog menu under the left pane of Freeway, you should see all of your form elements in the order they appear in the document. If they are absolutely positioned (CSS button or check-box is on when they are selected), then they can be re-ordered by dragging them up and down in the left-hand list. They should not be affected, layout-wise, by this change if they are absolutely positioned. If they are in relative (inline) positions, then the source order will be much more alike to their appearance on the screen, because they are placed in that order by virtue of being inserted within a run of text in that order.

I usually recommend that you lay out form fields in a table (with its borders hidden – I’m not a monster) so that labels and fields are related to one another structurally and semantically.

Hope this helps – I am working from memory here, as I no longer have a Mac that can run Freeway, and I’m either hand-coding or using Xway these days.

Walter

It’s worth noting that many email providers require permitted addresses to receive email as well. For this reason, the version of Send Form built in to Freeway 7 shouldn’t be used with a field for the sender address, however an updated version can be found in the knowledge base which deals with this by using a field for Reply-To instead.

The updated version can be found here: Softpress KnowledgeBase :: Built-in Action Updates

HELP!!

Hi Simon, thanks for you suggestion, I’ve tried that, but the replacement action now does not come from the users email, but from from the web server address.

I’ve tried to locate a copy of the original “Send Form” action, but it seems not to be anywhere I can find anywhere.

Can you please either send me a replacement or a link to where it is.

In hope! Peter

If you’re using the option to use item for reply-to address, selecting the email address field of your form, what you should see on the emails you receive is that it comes from your web server address but Reply-To is set to the email address entered into the form.

When you reply to such an email, you should see your email is going to the address entered into the form rather than your web server address. It’s done this way to allow the convenience of just pressing reply without pretending to send email on behalf of someone else, which a lot of email providers will (and should) reject.

For example, if our contact form was using the entered email as the from address and someone with an @gmail.com address used the form, our email provider would reject it and we’d never see the email. This is because our web server is not permitted to send emails on behalf of gmail.com.

If you need to use the older Action however, deleting the Action you’ve installed will revert to the version in the app. In Finder, open the Go menu and hold Alt, then choose Library. In the location that opens, go into Application Support and find the Freeway folder for the version you’re using. You’ll find the Send Form Suite in the Actions folder under that and can simply trash it, then restart Freeway.

Hi Simon,

Many thanks that works just fine …

Although it does appear to forward the message wen there is no email address present!
Should I expect that??

If you set the e-mail field to “required” in the Inspector, then the browser (should, theoretically) not allow the contact form to submit without it being valued with something that looks like an e-mail address. (It doesn’t check that it’s a real address, only that it is “shaped” like one.) To get this feature to work, your page must be set to HTML5 or HTML5 Strict mode in the Page inspector.

Walter

The Action also integrates this into the PHP script so even if a visitor bypasses the required fields in the browser, the script won’t send an email if they’re absent.