Jump to content
Larry Ullman's Book Forums

pdxkar

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by pdxkar

  1. 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".
×
×
  • Create New...