Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2010
    Posts
    2
    Plugin Contributions
    0

    Default Blank Page after form completion

    I have the most recent version of Zen Cart (installed it a few days ago) and I have no add ons

    I *have* made changes to some core files (deleted the advanced_search.php due to restrictions by my webhost and edited the english.php file under /includes/languages/ for a few aesthetic things, but past that really nothing)

    What's currently going on:

    After the completion of any form on the site (register, log in, unsubscribe from newsletter, etc.) instead of returning to the home page or other relevant page, it displays a blank page and the browser asserts that it is done loading. If I manually return to the main site, the form is always completed successfully, it just fails to return you to a page which displays information.

    I'm worried that this may extend to things like the shopping cart or checkout, but I haven't gotten to creating a product list, so there's no telling yet.

    What could be causing this? Is there a sitewide function for redirect on completion/submission of a form? Does each .php file have it's own unique redirect code? What's going on here?

    Halp!

  2. #2
    Join Date
    Jul 2009
    Location
    Prague, Czech Republic
    Posts
    530
    Plugin Contributions
    0

    Default Re: Blank Page after form completion

    First thing I would check is that you haven't got any blank lines at the end of any files you have edited. Dreamweaver for example, is notorius for doing this (though I've never experienced it myself I have to say), but that's the usual cause of this happening.

    Basically, check to see if there is any blank lines or spaces after the last '?>'

  3. #3
    Join Date
    Mar 2004
    Posts
    688
    Plugin Contributions
    0

    Default Re: Blank Page after form completion

    http://www.zen-cart.com/index.php?ma...roducts_id=860

    Install the above debugging tool from DrByte - the log file will be written to your cache folder and you can see what line the error is on - hopefully that helps.

  4. #4
    Join Date
    Apr 2010
    Posts
    2
    Plugin Contributions
    0

    Default Re: Blank Page after form completion

    Ok I have found 3 separate issues with the debugging tool and I'm not 100% sure as to how to go about fixing them (not exactly a php wizard)

    [13-Apr-2010 08:21:30] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/content/a/d/m/admin420/html/includes/languages/english.php:1393) in /home/content/a/d/m/admin420/html/includes/init_includes/init_templates.php on line 78
    [13-Apr-2010 08:21:30] PHP Warning: session_regenerate_id() [<a href='function.session-regenerate-id'>function.session-regenerate-id</a>]: Cannot regenerate session id - headers already sent in /home/content/a/d/m/admin420/html/includes/functions/sessions.php on line 167
    [13-Apr-2010 08:21:30] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/content/a/d/m/admin420/html/includes/languages/english.php:1393) in /home/content/a/d/m/admin420/html/includes/functions/functions_general.php on line 44
    for the code in question, here's the init_templates.php snippet

    PHP Code:
    /**

     * send the content charset "now" so that all content is impacted by it

     */

    (line 78)  header("Content-Type: text/html; charset=" CHARSET); 
    sessions.php

    PHP Code:
      function zen_session_recreate() {
        global 
    $http_domain$https_domain$current_domain;
          if (
    $http_domain == $https_domain) {
          
    $saveSession $_SESSION;
          
    $oldSessID session_id();
    (
    line 167)      session_regenerate_id();
          
    $newSessID session_id();
          
    session_id($oldSessID);
          
    session_id($newSessID);
          if (
    STORE_SESSIONS == 'db') {
            
    session_set_save_handler('_sess_open''_sess_close''_sess_read''_sess_write''_sess_destroy''_sess_gc');
          }
          
    session_start();
          
    $_SESSION $saveSession;
          if (
    IS_ADMIN_FLAG !== true) {
            
    whos_online_session_recreate($oldSessID$newSessID);
          }
        } (
    there's an 'else' flag here, but the second half of the function is commented out) 
    and functions_general.php

    PHP Code:
      function zen_redirect($url) {

        global 
    $request_type;

        
    // Are we loading an SSL page?

        
    if ( (ENABLE_SSL == true) && ($request_type == 'SSL') ) {

          
    // yes, but a NONSSL url was supplied

          
    if (substr($url0strlen(HTTP_SERVER DIR_WS_CATALOG)) == HTTP_SERVER DIR_WS_CATALOG) {

            
    // So, change it to SSL, based on site's configuration for SSL

            
    $url HTTPS_SERVER DIR_WS_HTTPS_CATALOG substr($urlstrlen(HTTP_SERVER DIR_WS_CATALOG));

          }

        }



      
    // clean up URL before executing it

        
    while (strstr($url'&&')) $url str_replace('&&''&'$url);

        while (
    strstr($url'&amp;&amp;')) $url str_replace('&amp;&amp;''&amp;'$url);

        
    // header locates should not have the &amp; in the address it breaks things

        
    while (strstr($url'&amp;')) $url str_replace('&amp;''&'$url);



    (
    line 44)    header('Location: ' $url);



        
    zen_exit();

      } 
    Are there any glaring script errors in the areas mentioned? or is the problem more likely with the english.php page?

  5. #5
    Join Date
    Mar 2004
    Posts
    688
    Plugin Contributions
    0

    Default Re: Blank Page after form completion

    Now that you've done that - check to make sure, like twaddle said, there aren't any blank lines at the ends of the:
    /home/content/a/d/m/admin420/html/includes/languages/english.php
    file.

    If there's a
    space below the following line at the end - put your cursor there and hit the backspace to remove it as this should be the very last thing written in the file.
    ?>

 

 

Similar Threads

  1. v150 Blank Sidebox Blank Page after adding code for livechat software
    By whatisthat456 in forum Basic Configuration
    Replies: 8
    Last Post: 3 May 2012, 10:40 AM
  2. Sage Pay Form v1.0.1 - redirect to blank page after hit cancel
    By mattys in forum Addon Payment Modules
    Replies: 2
    Last Post: 10 Sep 2010, 08:05 PM
  3. Blank fields after form validation error
    By olivqa in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 24 Apr 2010, 04:06 PM
  4. Again, blank page after register, also after click login
    By tokoindonesia in forum General Questions
    Replies: 3
    Last Post: 29 Dec 2009, 04:32 AM
  5. Create Account Form Blank after Submit
    By VitalBodies in forum General Questions
    Replies: 5
    Last Post: 1 Mar 2009, 02:55 PM

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