Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2005
    Posts
    31
    Plugin Contributions
    0

    Default Problem with auto loader (Blank line and distort character)

    I add a new class and put it in the auto_loaders with name config.xxx.php. It did initialize but when access by IE, all pages show with a blank line at the top and all characters distorted with size nearly doubled.
    I have been trying the whole morning without success and cannot find an answer in this forum.
    Please help!

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

    Default Re: Problem with auto loader (Blank line and distort character)

    Quote Originally Posted by Gamma View Post
    ... when access by IE, all pages show with a blank line at the top and all characters distorted with size nearly doubled.
    That's a classic symptom of extra code showing in browser source before regular page content.
    If you click View Source, you'll likely see extra spaces or characters above the normal HTML content ... and those are likely located in your custom-added files ... perhaps you have left extra characters in your new files? Or maybe you have some syntax errors?

    If you remove your class file (and any other related files you've added as part of this class), does the problem disappear? If so, then you know where your problem resides.
    .

    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
    Mar 2005
    Posts
    31
    Plugin Contributions
    0

    Default Re: Problem with auto loader (Blank line and distort character)

    Quote Originally Posted by DrByte View Post
    If you remove your class file (and any other related files you've added as part of this class), does the problem disappear? If so, then you know where your problem resides.
    I have cut the code to minimum:

    In the config.xxx.php
    PHP Code:
    <?php
    if (!defined('IS_ADMIN_FLAG')) {
     die(
    'Illegal Access');

      
    $autoLoadConfig[190][] = array('autoType'=>'class',
                                    
    'loadFile'=>'test.php');
      
    $autoLoadConfig[200][] = array('autoType'=>'classInstantiate',
                                    
    'className'=>'test',
                                    
    'objectName'=>'zc_test');                                
    ?>
    In the class file:
    PHP Code:
    <?php
    if (!defined('IS_ADMIN_FLAG')) {
      die(
    'Illegal Access');
    }
    class 
    test extends base {
    }
    ?>
    It does not solve the problem.

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

    Default Re: Problem with auto loader (Blank line and distort character)

    If you delete those files from the server, what happens?

    What is the URL where this can be seen?
    .

    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
    Mar 2005
    Posts
    31
    Plugin Contributions
    0

    Default Re: Problem with auto loader (Blank line and distort character)

    Quote Originally Posted by DrByte View Post
    If you delete those files from the server, what happens?

    What is the URL where this can be seen?
    DrByte. Thank you very much for your help!
    After I deleted the files from the server, it returns to normal.

  6. #6
    Join Date
    Mar 2005
    Posts
    31
    Plugin Contributions
    0

    Default Re: Problem with auto loader (Blank line and distort character)

    If I insert the following lines below breakpoint 180 of config.core.php,
    it works fine.

    $autoLoadConfig[190][] = array('autoType'=>'class',
    'loadFile'=>'test.php');
    $autoLoadConfig[200][] = array('autoType'=>'classInstantiate',
    'className'=>'test',
    'objectName'=>'zc_test');

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

    Default Re: Problem with auto loader (Blank line and distort character)

    So, if it works that way, then you had done something incorrect in your custom config.xxxxxx.php file ... perhaps extra blank lines at the end of the file?
    .

    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.

  8. #8
    Join Date
    Mar 2005
    Posts
    31
    Plugin Contributions
    0

    Default Re: Problem with auto loader (Blank line and distort character)

    Quote Originally Posted by DrByte View Post
    So, if it works that way, then you had done something incorrect in your custom config.xxxxxx.php file ... perhaps extra blank lines at the end of the file?
    There is no blank lines at the end of the file and no space after ?>.

  9. #9
    Join Date
    Mar 2005
    Posts
    31
    Plugin Contributions
    0

    Default Re: Problem with auto loader (Blank line and distort character)

    Finally, the problem was solved by conversion of the config.xxx and class files from utf-8 to ANSI/ASCII. I don't know why it works. If someone know the reason, please tell.

 

 

Similar Threads

  1. v151 ionCube Loader and Zend Guard Loader Causing admin issues?
    By bi11i in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 6 Oct 2013, 07:01 PM
  2. CJ Loader (CSS/Javascript Loader) plugin function is not loaded by zen cart?
    By tripflex in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Jul 2011, 03:55 PM
  3. Russian/Polish Character problem with MySQL
    By hyperjase in forum General Questions
    Replies: 0
    Last Post: 1 Jun 2011, 09:11 AM
  4. Problem with ascii character
    By shabizon in forum General Questions
    Replies: 0
    Last Post: 11 Nov 2010, 06:54 PM
  5. Replies: 0
    Last Post: 16 Sep 2010, 06:10 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