PDA

View Full Version : Parked Domains & Web Forms


polishcrusader
04-06-2006, 10:34 PM
:confused: Can someone tell me what I need to do to fix this? I have a web form that I created on my web site. If I access that form via the main account domain name - everything works as planned. I also have a parked domain under that account. If I access my website with the parked domain URL and try to submit a form entry, I get a form error

"This request to submit this form needs to be made by <My Primary Account Domain>. Please contact the webmaster if this is an error."

What do I need to correct to allow any of my parked domains to use the form without error? Thanks.

jcnelson
05-06-2006, 02:40 AM
This isn't an answer, rather more of a clue that may help someone that is more knowlegeable that I am find an answer for you.

pgm-form_submit.php located in the root folder checks for "this_ip=" on line 7 of sohoadmin/config/isp.conf.php

The section that checks this starts on Line 47 of pgm-form_submit.php

---------------------------------------------------------------
# Check referrer and session data
$refer = eregi_replace('http://','',$_SERVER['HTTP_REFERER']);
$check_ip = eregi_replace("pgm-form_submit.php","",$this_ip);
if ( !eregi($check_ip,$refer) ) {
echo "This request to submit this form needs to be made by ".$check_ip.". Please contact the webmaster if this is an error.";
exit;
}
---------------------------------------------------------------

If a person were to alter the code above to include an else statement before the exit that would look for the second domain it may work. Once it is altered upload the changed pgm-form_submit.php to the sohoadmin/client_files/base_files folder. When you log in again it will rewrite over the original pgm-forum_submit.php and save your changes.

Note: at first thought you may be thinking why not just remove the check completely, however that would leave you open to anyone using the form to send mail.