Zen Cart Logo
Forums / General Questions / ' in email adress causes problems

' in email adress causes problems

Locked

Views: 2,117

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
9 Jul 2006, 12:25 PM
#1
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

' in email adress causes problems

Some of our customers have an apostrophe in their email address. When we try to send email via admin this throws a 1064 SQL error, presumably because the ' throws out the parsing. Any ideas how to work around/rectify?

9 Jul 2006, 2:23 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: ' in email adress causes problems

What version of Zen Cart are you using?

9 Jul 2006, 3:08 PM
#3
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: ' in email adress causes problems

Sorry, should have put that in the orignal post. The store configuration is:

Server OS: Linux 2.4.20-021stab028.19.777-enterprise
Database: MySQL 3.23.58
HTTP Server: Apache/2.0.51 (Fedora)
PHP Version: 4.3.10 (Zend: 1.3.0)
Zen Cart 1.3.0.2
Database Patch Level: 1.3.0.2

I'm using a modified version of the pupleshades template.

Regards

Peter

9 Jul 2006, 3:12 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: ' in email adress causes problems

Have to admit I have never seen an email address with an apostrophe in it ...

Note: php v4.3.10 is rather outdated and you should see about upgrading to v4.4.2 ...

9 Jul 2006, 3:18 PM
#5
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: ' in email adress causes problems

Ajeh:

Have to admit I have never seen an email address with an apostrophe in it ...

We've got many customers in Ireland (think O'Connor, O'Meera...). Most of the email addresses drop the apostrophe but there are a few that don't.

The PHP version is the one supplied and supported by my hosting company. I'll be upgrading as soon as they have anew supported version.

Regards

Peter

9 Jul 2006, 3:33 PM
#6
superprg avatar

superprg

Totally Zenned

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

Re: ' in email adress causes problems

pglock:

Some of our customers have an apostrophe in their email address. When we try to send email via admin this throws a 1064 SQL error, presumably because the ' throws out the parsing. Any ideas how to work around/rectify?
Apostrophe in an email address? I dont think thats allowed in most of the cases but yeah some countries do use it....
The problem is definitely due to the problem in parsing because of aporstrophe in the email
See here:
http://www.regular-expressions.info/email.html

Well, the solution would be that you would have to change the script wherever email verification is being done and also make sure it gets inserted into mysql properlly and get retreived properly too
Thanks
San

9 Jul 2006, 3:41 PM
#7
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: ' in email adress causes problems

OK, thnks for the info. It looks like a codefest is required.

Regards

Peter

9 Jul 2006, 3:51 PM
#8
superprg avatar

superprg

Totally Zenned

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

Re: ' in email adress causes problems

pglock:

OK, thnks for the info. It looks like a codefest is required.

Regards

Peter
Hmm, nothing complex though

Try this
http://codegrrl.com/!/faq/view/apostrophe_in_email_all/

Please make sure that you backup files before you edit any
Let us know if it corrects the problem
Thanks !
San

9 Jul 2006, 4:07 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: ' in email adress causes problems

pglock:

Some of our customers have an apostrophe in their email address. When we try to send email via admin this throws a 1064 SQL error...

Do the customers receive their "welcome" emails properly?
Do they receive order-confirmation emails properly?

14 Jul 2006, 10:09 PM
#10
pglock avatar

pglock

New Zenner

Join Date:
Jun 2006
Location:
UK
Posts:
65
Plugin Contributions:
0

Re: ' in email adress causes problems

Sorry for the delay in replying, other issues with the new site (mostly DNS, not Zen Cart).

Yes, customers are recieving emails OK. It is only two customers out of 4000+ that have an apostrophe in their email so it's not a major issue for day to day operation but does affect newsletters.

I'll look at the phpmail 'stripslash' approach in the next update (August).

Regards

Peter