Jump to content
Larry Ullman's Book Forums

Recommended Posts

On the Shipping Information page, when a phone number is provided that has an area code greater than "214", after the "continue on to billing" button is clicked, the following error results:  "An error occurred in script 'C:\wamp64\www\effortlessECommerce\effortless_ecommerce_2nd\ex2\html\checkout.php' on line 158: Your order could not be processed due to a system error."

 
This is because the add_customer stored procedure's "p" (aka "phone") parameter is stored as an "int", and ints have a maximum value of 2,147,483,647.  Therefore, a phone number with an area code larger than 214 will fail.
 
I fixed the error like this:
1) Go to PHPMyAdmin.
2) Click "Procedures"
3) Click the "edit" button next to "add_customer"
4) Scroll down to the second to last row and change parameter "p" from an "int" to a "char".
5) Change parameter "p"'s "length/values" field from blank to "10" (no quote marks).
6) Click "Go" button.
 
Now it "works on my machine".

Share this post


Link to post
Share on other sites

Blargh! That surprises me that I did that. Sorry about the hassle, but kudos for figuring it out and thanks for posting the solution! I'll get that corrected.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...