Forums / General Questions / Contact Us Form Error Message - Help needed please

Contact Us Form Error Message - Help needed please

Locked

Started by angelicdezigns on 18 Aug 2006, 8:50 PM · Views: 4,051

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
18 Aug 2006, 8:50 PM
#1
angelicdezigns avatar

angelicdezigns

Zen Follower

Join Date:
Jun 2006
Posts:
109
Plugin Contributions:
0

Contact Us Form Error Message - Help needed please

Hi Guys,

Well I am understanding a lot more about zencart, and I love it, but I have had problems with the contact us form, I know it definatly worked, then my friend did an upgrade for me, and I have just tried it out, and I am getting the following error message, when I click on send

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.0.55 (Red Hat) Server at my site.co.uk Port 80

I am stumped and have checked my email options etc, and they all look fine, so was wondering if some kind person may know what has happened.

Thanks in advance
Nikki

18 Aug 2006, 9:02 PM
#2
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Contact Us Form Error Message - Help needed please


More information about this error may be available in the server error log.
Apache/2.0.55 (Red Hat) Server at my site.co.uk Port 80

Please post the error logs here(which can be get from cpanel)

Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php

advanced.programmer at gmail dot com
In love with Zen Cart!!

18 Aug 2006, 9:18 PM
#3
angelicdezigns avatar

angelicdezigns

Zen Follower

Join Date:
Jun 2006
Posts:
109
Plugin Contributions:
0

Re: Contact Us Form Error Message - Help needed please

Hi superprg - Thanks for that, Do you mean my hosts cpanel?

I did a search in and all I found was this..
I am getting an Internal 500 error asking me to check the logs. How do I do this?

To check the error logs you will need SSH access which will give you the ability to ‘cd’ into the logs directory where you can look at the logs with UNIX style tools such as ‘less’, ‘tail’ and ‘grep’.

This answer makes no sense to me at all :cry:

I just dont know where to find the error logs to post here for you..so sorry

Kind Regards
Nikki

18 Aug 2006, 9:22 PM
#4
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Contact Us Form Error Message - Help needed please

This type of error also occurs when you dont properlyl copy the file via FTP

Anyways, see this folder
includes\modules\pages\contact_us

and make sure that you have the files and there are no spaces at the end of the file

Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php

advanced.programmer at gmail dot com
In love with Zen Cart!!

18 Aug 2006, 9:36 PM
#5
angelicdezigns avatar

angelicdezigns

Zen Follower

Join Date:
Jun 2006
Posts:
109
Plugin Contributions:
0

Re: Contact Us Form Error Message - Help needed please

Hiya,

I have found these, and I know this may sound silly, but I wouldnt know if there was something wrong with them or not, the only thing I can see that looks a bit odd, is the bits that say
$zc_validate_email = zen_validate_email($email_address);

wasnt sure if I had to replace it with
$zc_validate_email = zen_validate_email($myemailaddress);

Sorry to sound so dim :blush:

Just wondered if someone could have a browse over this and see what is wrong?

Many Thanks
Nikki

HEADER_PHP

<?php /** * Contact Us Page * * @package page * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: header_php.php 3230 2006-03-20 23:21:29Z drbyte $ */ require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php')); $error = false; if (isset($_GET['action']) && ($_GET['action'] == 'send')) { $name = zen_db_prepare_input($_POST['contactname']); $email_address = zen_db_prepare_input($_POST['email']); $enquiry = zen_db_prepare_input(strip_tags($_POST['enquiry'])); $zc_validate_email = zen_validate_email($email_address); if ($zc_validate_email and !empty($enquiry) and !empty($name)) { // auto complete when logged in if($_SESSION['customer_id']) { $sql = "SELECT customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id FROM " . TABLE_CUSTOMERS . " WHERE customers_id = :customersID"; $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer'); $check_customer = $db->Execute($sql); $customer_email= $check_customer->fields['customers_email_address']; $customer_name= $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname']; } else { $customer_email='Not logged in'; $customer_name='Not logged in'; } // use contact us dropdown if defined if (CONTACT_US_LIST !=''){ $send_to_array=explode("," ,CONTACT_US_LIST); preg_match('/\<[^>]+\>/', $send_to_array[$_POST['send_to']], $send_email_array); $send_to_email= eregi_replace (">", "", $send_email_array[0]); $send_to_email= eregi_replace ("<", "", $send_to_email); $send_to_name = preg_replace('/\<[^*]*/', '', $send_to_array[$_POST['send_to']]); } else { //otherwise default to EMAIL_FROM and store name $send_to_email = EMAIL_FROM; $send_to_name = STORE_NAME; } // Prepare extra-info details $extra_info = email_collect_extra_info($name, $email_address, $customer_name, $customer_email); // Prepare Text-only portion of message $text_message = OFFICE_FROM . "\t" . $name . "\n" . OFFICE_EMAIL . "\t" . $email_address . "\n\n" . '------------------------------------------------------' . "\n\n" . strip_tags($_POST['enquiry']) . "\n\n" . '------------------------------------------------------' . "\n\n" . $extra_info['TEXT']; // Prepare HTML-portion of message $html_msg['EMAIL_MESSAGE_HTML'] = strip_tags($_POST['enquiry']); $html_msg['CONTACT_US_OFFICE_FROM'] = OFFICE_FROM . ' ' . $name . '<br />' . OFFICE_EMAIL . '(' . $email_address . ')'; $html_msg['EXTRA_INFO'] = $extra_info['HTML']; // Send message zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us'); zen_redirect(zen_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; if (empty($name)) { $messageStack->add('contact', ENTRY_EMAIL_NAME_CHECK_ERROR); } if ($zc_validate_email == false) { $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } if (empty($enquiry)) { $messageStack->add('contact', ENTRY_EMAIL_CONTENT_CHECK_ERROR); } } } // end action==send // default email and name if customer is logged in if($_SESSION['customer_id']) { $sql = "SELECT customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id FROM " . TABLE_CUSTOMERS . " WHERE customers_id = :customersID"; $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer'); $check_customer = $db->Execute($sql); $email= $check_customer->fields['customers_email_address']; $name= $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname']; } if (CONTACT_US_LIST !=''){ foreach(explode(",", CONTACT_US_LIST) as $k => $v) { $send_to_array[] = array('id' => $k, 'text' => preg_replace('/\<[^*]*/', '', $v)); } } // include template specific file name defines $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_CONTACT_US, 'false'); $breadcrumb->add(NAVBAR_TITLE); ?>

ON_LOAD_MAIN

if (document.contact_us){ if (document.contact_us.contactname) {document.contact_us.contactname.focus()} };

22 Aug 2006, 7:42 AM
#6
angelicdezigns avatar

angelicdezigns

Zen Follower

Join Date:
Jun 2006
Posts:
109
Plugin Contributions:
0

Re: Contact Us Form Error Message - Help needed please

Just thought I would bump this, as I still cant find out what I have done wrong :cry:

so near yet so far..lolll

Thanks in Advance
Nikki

22 Aug 2006, 9:12 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Contact Us Form Error Message - Help needed please

This is where I'd start:
http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

Sorry, it's not quick, but it's the most effective way.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Aug 2006, 9:26 AM
#8
angelicdezigns avatar

angelicdezigns

Zen Follower

Join Date:
Jun 2006
Posts:
109
Plugin Contributions:
0

Re: Contact Us Form Error Message - Help needed please

Thanks alot DrByte, I will try this method, fingers crossed ? :thumbsup:
Regards
Nikki

22 Aug 2006, 9:56 AM
#9
angelicdezigns avatar

angelicdezigns

Zen Follower

Join Date:
Jun 2006
Posts:
109
Plugin Contributions:
0

Re: Contact Us Form Error Message - Help needed please

Hi DrByte,

I have downloaded the original release, then opened them in winmerge, and I get a message saying "the selected files are identical" this happened on both the header.php and the on_load_main files, is that right?

Sorry to be a pain :wacko:

Kind Regards
Nikki

22 Aug 2006, 9:59 AM
#10
angelicdezigns avatar

angelicdezigns

Zen Follower

Join Date:
Jun 2006
Posts:
109
Plugin Contributions:
0

Re: Contact Us Form Error Message - Help needed please

Oops, I just looked in define pages editor under contact us, and this is all thats there

<p><font color="#151b8d">We welcome your feedback and requests for estimates.<br> Please send an email to:</font></p>

Is this my problem:blush:

and if it is, how exactly do I enter the email address (sorry, I am new to html aswell)

Kind Regards
Nikki

22 Aug 2006, 10:10 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Contact Us Form Error Message - Help needed please

For most of your files, unless you've customized something, you "want" them to say "files are identical".
In WinMerge, if you click "View", and uncheck "Show Identical Files", then you'll only see things that are "different", making the analysis process much easier.

I would have expected a problem in the header_php.php file, since the problem is only happening after you click Submit.

You should compare the /includes/functions files.

I would also compare your tpl_contact_us_default.php template file to be sure it's intact.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Aug 2006, 10:50 AM
#12
angelicdezigns avatar

angelicdezigns

Zen Follower

Join Date:
Jun 2006
Posts:
109
Plugin Contributions:
0

Re: Contact Us Form Error Message - Help needed please

Hi DrByte,

Thank you, I will try the other things you suggested, but for some reason I do not have the option to uncheck "Show Identical Files" as there is no show identical files option, see below.

I am sure I will work it out.. I have learnt lots thanks to you guys :thumbsup:

Kind Regards
Nikki

http://i9.photobucket.com/albums/a56/angel_in_disguize_247/zenwinmerge.jpg

22 Aug 2006, 11:05 AM
#13
angelicdezigns avatar

angelicdezigns

Zen Follower

Join Date:
Jun 2006
Posts:
109
Plugin Contributions:
0

Re: Contact Us Form Error Message - Help needed please

Yipppeeee, Ive done it. Not sure how I did it, but I went into email options again, and reset the contact us email dropdown list and it works. Ive done that quite a few times and it didnt work, so not sure what happened this time, as I did the same thing.

Thanks Drbyte