Page 1 of 6 123 ... LastLast
Results 1 to 10 of 60
  1. #1
    Join Date
    Nov 2006
    Posts
    11
    Plugin Contributions
    0

    help question [Done v1.3.7] account creation bug when displaying create-account-success page

    Earlier today I installed zencart on my server. I used wget unzip changed the ownership and group on the files to be used by my apache user. Install went smoothly. I go to create a test user and I get the following error.

    Code:
    Warning:  Invalid argument supplied for foreach() in /home/httpd/vhosts/eastmedent.com/httpdocs/store/includes/templates/template_default/templates/tpl_create_account_success_default.php on line 26
    I did a little research on the forums, thinking that this was a common problem, oddly I found that it only happened when upgrading or using a mod by NotGoddess. Both of which I haven't done, as this is a default install, completely fresh.

    A little about my server:
    Apache on Red Hat
    PHP 4.3.2
    MYSQL 3.23.58

    I gave it a shot at debugging what's going on and I'm feeling it has to do with line 41 of the the create_account_success header_php.php. But today is one of those days where I just can't think.
    PHP Code:
      $addressArray[] = array('firstname'=>$addresses->fields['firstname'],
                              
    'lastname'=>$addresses->fields['lastname'],
                              
    'address_book_id'=>$addresses->fields['address_book_id'],
                              
    'format_id'=>$format_id,
                              
    'address'=>$addresses->fields); 
    Any help would be greatly appreciated.

    Thanks,
    David

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: account creation bug

    I can't reproduce the problem unless I delete code from the files, making the array unavailable.


    in the header_php.php file, as you mentioned, line 41 produces the array:
    Code:
      $addressArray[] = array('firstname'=>$addresses->fields['firstname'],
                              'lastname'=>$addresses->fields['lastname'],
                              'address_book_id'=>$addresses->fields['address_book_id'],
                              'format_id'=>$format_id,
                              'address'=>$addresses->fields);
    Then line 26 of the template produces the output by looping through the array:
    Code:
      foreach ($addressArray as $addresses) {
    If the header_php.php file is missing code, then I could see this happening.

    I suppose if you failed to actually save a valid address, then the error would appear too, since that array isn't initialized outside of the loop that produces the address data for output.

    To initialize the array and suppress the error, you could add this on line 37 of the header_php.php file:
    Code:
    $addressArray = array();
    , right above this line:
    Code:
    while (!$addresses->EOF) {
    Thus, if you have some sort of database problem preventing the address from being saved, or a sessions problem preventing the customer's session id from being retained, then you'll see no address displayed, but also no error.
    .

    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.

  3. #3
    Join Date
    Nov 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: account creation bug

    Thanks for your quick reply. The thing is I didn't delete anything from any files as it was a completely fresh install. I have two instances of zencart on my server for two different clients and its the first time this happened. As for saving a valid address I am using my actual address, not some made up one.

    But after initializing the array like you said the create_account_sucesss page seems to work fine.

    I can't imagine that this is a database issue because even before when the error was occuring my info was being inserted correctly, though I couldn't log in.

    Even though you provided a work around, DrByte, if you're interested in looking into this problem further, I'd be more then happy to provide any information you need.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: account creation bug

    I'm puzzled as to why there would be no data returned, and thus trigger the error you mentioned ... as long as you're not importing customer records.

    Can you reproduce the error on-demand if the fix above is not applied? Can it be produced repeatedly? If so, please post your server (ie: PHPinfo output) and browser specs.
    .

    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.

  5. #5
    Join Date
    Nov 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: account creation bug

    On my powerbook, yeah I can always produce the error in Firefox 2. Using Safari on my coworkers computer it seemed works fine, with the fix off. See php info here.

  6. #6
    Join Date
    Apr 2006
    Posts
    413
    Plugin Contributions
    0

    Default Re: account creation bug when displaying create-account-success page

    Your two client sites wouldn't be sharing the same database would they?

  7. #7
    Join Date
    Nov 2005
    Posts
    63
    Plugin Contributions
    0

    Default Re: account creation bug when displaying create-account-success page

    I'd like to jump in on this one.......same thing just happened to me. I did a fresh install, new database, everything. Everything was working fine (much smoother than the site I just got done upgrading) but when I went to create a new account I got that same error mentioned above. Also, my page displays funny. The text runs way off to the right side of the page, with the continue button almost off the cart page entirely. All my other pages are fine. I did reload the original file just in case it had become corrupt or something but the error continued. Also reloaded the file that is working now in my live store to see if that helped but the error continues as well. I'm open to any solutions as well. If you would like to test my page go here:
    http://www.astudiojdesign.com/new_st...ain_page=login

  8. #8
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: account creation bug when displaying create-account-success page

    Did you apply the fix I mentioned earlier?
    http://www.zen-cart.com/forum/showth...487#post287867

    (Sorry, that's a rhetorical question, since I can see the error on your site if I force the main_page setting. Please apply the fix and then advise if there's still a problem.)
    .

    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.

  9. #9
    Join Date
    Nov 2005
    Posts
    63
    Plugin Contributions
    0

    Default Re: account creation bug when displaying create-account-success page

    Yes, that helped with the error and formatting problem except it's still not working right. Everything appears to look correct but I have a box under my "success" congratulations message and in the box it says "primary address" in blue but nothing else. I clicked the continue button but it takes me back to the home page. I should mention that I received the email confirmation stating I have successfully created my account. I refreshed my page and tried logging in again but all that happens is the create account page keeps repeating itself. I never am able to log in or check out.

  10. #10
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: account creation bug when displaying create-account-success page

    You're saying that:
    1. this is a fresh v1.3.6 install with NO addons ?
    2. switching to "classic" template has the same effect?
    3. you can create an account, but *always* get the indicated error?
    4. you can see the account in the admin?
    5. the address info as seen in the admin is correct?
    6. you cannot log in using this account ?
    7. you cannot access My Account to review the information ?


    What version of PHP?
    What version of MySQL?
    What operating system is your server running?
    .

    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.

 

 
Page 1 of 6 123 ... LastLast

Similar Threads

  1. create account success page not displaying!
    By rebelman in forum General Questions
    Replies: 1
    Last Post: 2 Jul 2011, 09:16 PM
  2. account creation success blank page
    By perfcomp in forum General Questions
    Replies: 4
    Last Post: 22 Sep 2009, 02:46 AM
  3. Blank Page on Create Account Success
    By RAM1001 in forum General Questions
    Replies: 5
    Last Post: 31 Aug 2009, 11:44 AM
  4. Bypass create account success page and go to My Account instead?
    By dealbyethan.com in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 Dec 2007, 01:50 PM
  5. By-pass Account Create Success Page
    By s_mack in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 22 Dec 2006, 02:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR