Contact us file error
Contact us file error
Hi,
I am getting the following error from my contact_us.php file:
[03-May-2021 08:31:39 Europe/London] PHP Fatal error: Uncaught Error: Call to undefined function tep_validate_email() in /home/catalog/templates/default/includes/pages/contact_us.php:20
<?php
/*
$Id$
CE Phoenix, E-Commerce made Easy
https://phoenixcart.org
Copyright (c) 2021 Phoenix Cart
Released under the GNU General Public License
*/
if (tep_validate_form_action_is('send')) {
$error = false;
$name = tep_db_prepare_input($_POST['name']);
$email_address = tep_db_prepare_input($_POST['email']);
$enquiry = tep_db_prepare_input($_POST['enquiry']);
if (!tep_validate_email($email_address)) {
What is the cause of this and how do I fix it?
Thanks
I am getting the following error from my contact_us.php file:
[03-May-2021 08:31:39 Europe/London] PHP Fatal error: Uncaught Error: Call to undefined function tep_validate_email() in /home/catalog/templates/default/includes/pages/contact_us.php:20
<?php
/*
$Id$
CE Phoenix, E-Commerce made Easy
https://phoenixcart.org
Copyright (c) 2021 Phoenix Cart
Released under the GNU General Public License
*/
if (tep_validate_form_action_is('send')) {
$error = false;
$name = tep_db_prepare_input($_POST['name']);
$email_address = tep_db_prepare_input($_POST['email']);
$enquiry = tep_db_prepare_input($_POST['enquiry']);
if (!tep_validate_email($email_address)) {
What is the cause of this and how do I fix it?
Thanks
-
- Lead Developer
- Posts: 2637
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 181 times
Re: Contact us file error
Lines 20-26 of that file:
Code: Select all
<?php
if ($messageStack->size('contact') > 0) {
echo $messageStack->output('contact');
}
if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
?>
Re: Contact us file error
Thanks for your reply. You are correct, like you I checked this file against core files downloaded when error occurred. I believe this changed file was introduced by one of many addons. I don't know which and reverting to the core file downloaded may break shop. I'll try that and see how it impacts shop.ecartz wrote: ↑Tue May 04, 2021 1:26 amLines 20-26 of that file:No reference to tep_validate_email. And I checked. That file never did have a reference to tep_validate_email in core. So the easiest fix would be to use the core versions of that file and contact_us.php -- presumably versions from after this change: https://github.com/CE-PhoenixCart/Phoen ... 6ff329436bCode: Select all
<?php if ($messageStack->size('contact') > 0) { echo $messageStack->output('contact'); } if (isset($_GET['action']) && ($_GET['action'] == 'success')) { ?>
Re: Contact us file error
I found out the culprit file contact_us.php was introduced by an addon called honeypot I added to my install. The contact_us.php included in the changed phoenix files introduced this. I wonder if author of addon can sort out this bug. Similar error in logs all over the place.ecartz wrote: ↑Tue May 04, 2021 1:26 amLines 20-26 of that file:No reference to tep_validate_email. And I checked. That file never did have a reference to tep_validate_email in core. So the easiest fix would be to use the core versions of that file and contact_us.php -- presumably versions from after this change: https://github.com/CE-PhoenixCart/Phoen ... 6ff329436bCode: Select all
<?php if ($messageStack->size('contact') > 0) { echo $messageStack->output('contact'); } if (isset($_GET['action']) && ($_GET['action'] == 'success')) { ?>
-
- VIP Member
- Posts: 223
- Joined: Fri Oct 25, 2019 2:14 pm
- Has thanked: 24 times
- Been thanked: 14 times
Re: Contact us file error
You'll probably need to contact Jack on the oscommerce forum. I don't think he participates here."I wonder if author of addon can sort out this bug. Similar error in logs all over the place."
Dan
Re: Contact us file error
Thanks but unfortunately, no joy with contacting addon author as getting registered on that forum seems to be harder than breaking into fortknox. Phew! This is one why I'm very wary of addons for this software.
-
- VIP Member
- Posts: 1996
- Joined: Mon Oct 07, 2019 4:39 am
- : Buy Me A Beverage
- Has thanked: 26 times
- Been thanked: 175 times
Re: Contact us file error
Yes, you should be wary of third party addons which is why we only use Pro Supporters addons or addons by Certified Developers
-
- PhoenixCart Developer
- Posts: 1184
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
- Has thanked: 38 times
- Been thanked: 102 times
Re: Contact us file error
You should consider this instead:
app.php/addons/free_addon/maths_captcha
Very easy to install, very efficient against bots,
app.php/addons/free_addon/maths_captcha
Very easy to install, very efficient against bots,
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
Re: Contact us file error
Thanks very much. I've installed it with ease and very impressed with it so far.raiwa wrote: ↑Fri May 21, 2021 3:33 pm You should consider this instead:
app.php/addons/free_addon/maths_captcha
Very easy to install, very efficient against bots,
I have to do a back track of my shop install to rip out all the changes honeypot made to core files and files added. This has been a nightmare of an addon. Is this maths_captcha addon just for bots or for fake accounts as well?
-
- PhoenixCart Developer
- Posts: 1184
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
- Has thanked: 38 times
- Been thanked: 102 times
Re: Contact us file error
Just bots.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27