toptiara Posted October 30, 2006 Posted October 30, 2006 Hi guys, I just migrated my site from one host to another. Everything was working fine up until I moved hosts, but now my contact us page has stopped working. Here's the content of my contact_us.php <?php /* $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send') && tep_email_isfromdomain($_POST['email'])) { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_ISFROMDOMAIN_ERROR); } elseif (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { // http://www.anders.com/cms/75/Crack.Attempt/Spam.Relay $_POST['email'] = preg_replace( "/\n/", " ", $_POST['email'] ); $_POST['name'] = preg_replace( "/\n/", " ", $_POST['name'] ); $_POST['email'] = preg_replace( "/\r/", " ", $_POST['email'] ); $_POST['name'] = preg_replace( "/\r/", " ", $_POST['name'] ); $_POST['email'] = str_replace("Content-Type:","",$_POST['email']); $_POST['name'] = str_replace("Content-Type:","",$_POST['name']); $name = tep_db_prepare_input($_POST['name']); $email_address = tep_db_prepare_input($_POST['email']); $enquiry = tep_db_prepare_input($_POST['enquiry']); $enquiry = tep_db_prepare_input($enquiry . "\n\n IP: " . $_SERVER['REMOTE_ADDR']); if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('contact') > 0) { ?> <tr> <td><?php echo $messageStack->output('contact'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?> <tr> <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { ?> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <tr> <td class="main"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td> </tr> <tr> <td> </td> </tr> <td class="main"><?php echo ENTRY_NAME; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('name'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_EMAIL; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('email'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_ENQUIRY; ?></td> </tr> <tr> <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15, tep_sanitize_string($_POST['enquiry']), '', false); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } ?> </table></form></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Basically, the page loads, you can fill out the form ok, but clicking on the button doesnt appear to do anything :( Thanks Hand made jewellery and tiaras on our website Please bear with me. Im an osC noobie!
digbydo Posted October 30, 2006 Posted October 30, 2006 check with your new hosts which type of formmail/sendmail they use and the correct path to it. one-click installation.. Dave's info
toptiara Posted October 31, 2006 Author Posted October 31, 2006 check with your new hosts which type of formmail/sendmail they use and the correct path to it. I checked and they use sendmail. This was the same function as my previous host, so I don't understand why it was working just fine before, but isn't now. Anyone else have any ideas please? Hand made jewellery and tiaras on our website Please bear with me. Im an osC noobie!
toptiara Posted October 31, 2006 Author Posted October 31, 2006 I checked and they use sendmail. This was the same function as my previous host, so I don't understand why it was working just fine before, but isn't now. Anyone else have any ideas please? Oh and I dont know if this is related or not - If I have an item in my cart now and I try to remove it by checking the box and clicking update - the item doesnt get removed it just stays there, Any ideas please? Hand made jewellery and tiaras on our website Please bear with me. Im an osC noobie!
toptiara Posted November 1, 2006 Author Posted November 1, 2006 Oh and I dont know if this is related or not - If I have an item in my cart now and I try to remove it by checking the box and clicking update - the item doesnt get removed it just stays there, Any ideas please? Last try in case anyone can help me pelase? Hand made jewellery and tiaras on our website Please bear with me. Im an osC noobie!
toptiara Posted November 3, 2006 Author Posted November 3, 2006 Last try in case anyone can help me pelase? :sigh: Well I'm clutching at straws now. Could this be an issue with my store not aligning properly with my database? I just migrated hosts - transferred all my stuff over ok. All appears to be working ok with the exception of the shopping cart (cant remove or update contents in it directly, but can add new items if I go to the item and click add to cart) and the contact form. I'm in the process of trying a different contact script to see if that works, but failing that I might have to try something drastic - like recreating the store from scratch. Dont really want to have to do that unless i have to though! Thanks Hand made jewellery and tiaras on our website Please bear with me. Im an osC noobie!
toptiara Posted November 8, 2006 Author Posted November 8, 2006 :sigh: Well I'm clutching at straws now. Could this be an issue with my store not aligning properly with my database? I just migrated hosts - transferred all my stuff over ok. All appears to be working ok with the exception of the shopping cart (cant remove or update contents in it directly, but can add new items if I go to the item and click add to cart) and the contact form. I'm in the process of trying a different contact script to see if that works, but failing that I might have to try something drastic - like recreating the store from scratch. Dont really want to have to do that unless i have to though! Thanks Well my new hosting company have not been any assistance whatsoever. Site was fine before I moved it and now half of it (the most important stuff like email and contact form) is now broken and I don't even know where to start looking to fix it. Seriously peeved with my new host and wondering if I should just cut my losses and start from scratch with a new one. As far as I can work out anybody who offers Fantastico will allow me to set up a base install and then I just need to rebuild it all from scratch. Only downside is I don't remember what I changed to get to where I am today! Oh well. the joys of open source software and limited support Hand made jewellery and tiaras on our website Please bear with me. Im an osC noobie!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.