GetDotted Domains

Viewing Thread:
"PHP script changes"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Sun 06/06/04 at 23:49
Regular
"whoneedsatagline?"
Posts: 194
Watch out for any PHP scripts on your pages now that Freeola are updating the security levels. If you were used to naming fields in forms, and just expecting them to appear in PHP as $fieldname, it won't work any more. Now you need to use $_POST["fieldname"].

Same goes for fields attached to the URL, they need to be $_GET["fieldname"], and values like $REMOTE_ADDR have to be referred to as $_SERVER["REMOTE_ADDR"].

Better security, but I've had to change quite a bit of old PHP code just now.
Sun 06/06/04 at 23:49
Regular
"whoneedsatagline?"
Posts: 194
Watch out for any PHP scripts on your pages now that Freeola are updating the security levels. If you were used to naming fields in forms, and just expecting them to appear in PHP as $fieldname, it won't work any more. Now you need to use $_POST["fieldname"].

Same goes for fields attached to the URL, they need to be $_GET["fieldname"], and values like $REMOTE_ADDR have to be referred to as $_SERVER["REMOTE_ADDR"].

Better security, but I've had to change quite a bit of old PHP code just now.
Mon 07/06/04 at 01:53
Regular
"Eff, you see, kay?"
Posts: 14,156
Yes you should be using superglobals anyway. regardless.
Mon 07/06/04 at 10:37
Regular
"Pouch Ape"
Posts: 14,499
Cool. I've just started re-doing my site, so I'm glad someone told me this before I did it all! Cheers.
Mon 07/06/04 at 11:24
Regular
"NULL"
Posts: 1,384
If you're feeling lazy (this way isn't as secure) then this method allows you to very easily modify an entire script to work with register_globals set to off. Just copy and paste at the top of each page:


// Apply to other arrays simply by replacing the first argument of the 'foreach()' function with the array name.

foreach($_GET as $a=>$b){$$a=$b;} // $_GET
foreach($_POST as $a=>$b){$$a=$b;} // $_POST

?>

That's the only code snippet I've ever put in the Zend Code Gallery :)
Mon 07/06/04 at 18:58
Regular
Posts: 332
Hello - After the server upgrades I'm now having trouble with the FREEOLA supplied Email FORM: freeola.info/supportdocs/form_to_mail/form_to_mail.php

I've asked freeola support for advice but they just replied telling me to look at their status page, which is where I stared!?

Do I need to change something in my form or does the freeola php code need changing.

Thanks in advance...
Mon 07/06/04 at 19:10
Regular
"NULL"
Posts: 1,384
What exactly is the problem? Do you get any error messages? If so, what are they? Do you have a web site we can see your form on? Can you paste the relevant code in here (assuming it isn't too long).
Mon 07/06/04 at 19:46
Regular
Posts: 332
This is the error I get:

The form was not submitted for the following reasons:
Invalid recipient e-mail address () to continue
Please use your browser's back button to return to the form and try again.
This form is powered by Jack's Formmail.php 4.1b!

I'm assuming that FREEOLA haven't made the necessary changes to their own php code since the upgrade ??? All the form code I'm using is based on their help page (I posted the address earlier...)
Mon 07/06/04 at 20:50
Regular
"whoneedsatagline?"
Posts: 194
I bet you're right about them not having changed their own scripts. You ought to be able to see the script in your cgibin folder, although FTP's so slow as to be useless at the moment.

BTW, I'll challenge your longest ever newbie claim ;-)
Mon 07/06/04 at 21:42
Regular
Posts: 332
I can't find the script in my cgi-bin. It must be picked up by some sort of default concatenation ?

Hopefully freeola will re-read my support email!

------------------------------
See what you mean about newbie :)
Tue 08/06/04 at 10:53
Regular
Posts: 332
I'm having a bit of a hard time with getting an answer from freeola support :(

All they keep doing is referring me to the status page (about 4 times!) to see the changes I have to make.

Incase I've lost the plot can someone confirm where these changes have to be made? I'm using an HTML FORM which calls the FREEOLA mail_to_form.php script. I'm assuming the changes are PHP code so have to be made in THEIR script ???

If there is something I should be doing then I would like to know what...

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Thank you very much for your help!
Top service for free - excellent - thank you very much for your help.
Everybody thinks I am an IT genius...
Nothing but admiration. I have been complimented on the church site that I manage through you and everybody thinks I am an IT genius. Your support is unquestionably outstanding.
Brian

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.