Results 1 to 10 of 10
  1. #1
    Join Date
    May 2012
    Posts
    6
    Plugin Contributions
    0

    help question Header Warning and PHP Fatal error after uploaded a Dutch Language pack

    I've been having this problem since yesterday, I did a lot of Googling but did not find a solution, sinçe i'm fairly new to ZenCart I might even have overlooked something. The problem started when I uploaded a Dutch Language pack, now whenever I want to add something to the Cart I get a blank page. I only get the issue when I use the Dutch Language in my store, if I use the standard English; everything works as it should

    Here is the Debug:

    Code:
    [25-May-2012 15:34:57 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/vhosts/website.nl/httpdocs/includes/languages/dutch.php:1) in /var/www/vhosts/website.nl/httpdocs/includes/init_includes/init_templates.php on line 78
    
    [25-May-2012 15:34:57 UTC] PHP Fatal error:  Call to a member function RecordCount() on a non-object in /var/www/vhosts/website/httpdocs/includes/modules/sideboxes/category_row.php on line 18
    Line 78 in init_templates.php
    Code:
      header("Content-Type: text/html; charset=" . CHARSET);
    Line 18 in category_row.php
    Code:
      $num_categories = $categories->RecordCount();
    Help would be greatly appreciated.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Header Warning and PHP Fatal error

    Have you checked your /cache folder for error log files ?
    http://www.zen-cart.com/content.php?124-blank-page

  3. #3
    Join Date
    May 2012
    Posts
    6
    Plugin Contributions
    0

    Default Re: Header Warning and PHP Fatal error

    Quote Originally Posted by stevesh View Post
    Have you checked your /cache folder for error log files ?
    Yes, the outputs in my first post come from the error log file (httpdocs/cache/mydebug-verylongernumber.log)

  4. #4
    Join Date
    May 2012
    Posts
    6
    Plugin Contributions
    0

    Default Re: Header Warning and PHP Fatal error

    I'm still looking for a sulution to this

  5. #5
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Header Warning and PHP Fatal error

    Most likely a stray character or line added to dutch.php.

    http://www.zen-cart.com/content.php?...s-already-sent

  6. #6
    Join Date
    May 2012
    Posts
    6
    Plugin Contributions
    0

    Default Re: Header Warning and PHP Fatal error

    Quote Originally Posted by stevesh View Post
    Most likely a stray character or line added to dutch.php.

    http://www.zen-cart.com/content.php?...s-already-sent
    I already looked at this and its not the case. There is no additional line or character anywhere in line 1 of dutch.php.

    The Fatal Error seems to be the likely cause but I have no idea what to do with it:


    Code:
    [25-May-2012 15:34:57 UTC] PHP Fatal error:  Call to a member function RecordCount() on a non-object in /var/www/vhosts/website/httpdocs/includes/modules/sideboxes/category_row.php on line 18

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

    Default Re: Header Warning and PHP Fatal error

    You probably don't have any categories enabled for that language, and thus the $categories object doesn't have any elements, so it can't have any results from RecordCount().
    .

    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
    May 2012
    Posts
    6
    Plugin Contributions
    0

    Default Re: Header Warning and PHP Fatal error

    Quote Originally Posted by DrByte View Post
    You probably don't have any categories enabled for that language, and thus the $categories object doesn't have any elements, so it can't have any results from RecordCount().
    I just checked and all my categories show up fine, when I click them I get to see my products, its just that when I press "Add to Cart" in the Dutch localization that I get redirected to a blank page. When I add the product to my cart in English and switch to Dutch once I get redirected I get another error when I hit "Go to Checkout"

    This is the error from my Cache when I hit "Go to Checkout" in the Dutch localization, it also brings me to a blank page.


    Code:
    [26-May-2012 11:12:25 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/vhosts/gezondepetshop.nl/httpdocs/includes/languages/dutch.php:1) in /var/www/vhosts/gezondepetshop.nl/httpdocs/includes/init_includes/init_templates.php on line 78
    
    [26-May-2012 11:12:25 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/vhosts/gezondepetshop.nl/httpdocs/includes/languages/dutch.php:1) in /var/www/vhosts/gezondepetshop.nl/httpdocs/includes/functions/functions_general.php on line 45
    But these are only warnings, not Fatal Errors like in my first post.

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

    Default Re: Header Warning and PHP Fatal error

    Quote Originally Posted by SFNinja View Post
    (output started at /var/www/vhosts/gezondepetshop.nl/httpdocs/includes/languages/dutch.php:1)
    If you don't fix that problem, then the errors won't go away.

    Get rid of the extra characters in the file.
    They may be invisible characters, such as a ByteOrderMark set by your text editor or by whomever you obtained the files from.
    Your files need to be saved as UTF-8-without-BOM. You do that by setting your text editor's encoding settings to utf8-without-BOM, then save the file. Then re-upload the file to your server.
    Wash,rinse,repeat for all your language files.

    If you look at the language files that came with Zen Cart, you'll see that they all contain a small note explaining this to you. It doesn't matter if it's English or another language. You can't have BOM's in the language files (or any of the files, for that matter).
    .

    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.

  10. #10
    Join Date
    May 2012
    Posts
    6
    Plugin Contributions
    0

    Default Re: Header Warning and PHP Fatal error

    wow, thanks a lot! I opened the dutch.php with notepad++ and changed the encoding from UTF-8 to utf8-without-BOM like you said and now its working !
    I actually did try this earlier but in notepad (stupid me) and I thought I had solved the invisible character issue.

    Thanks a lot for helping me out DrByte, and stevesh too

 

 

Similar Threads

  1. Dutch Language pack error
    By rikdegraaff in forum Addon Language Packs
    Replies: 3
    Last Post: 6 Mar 2011, 10:22 PM
  2. Cannot save products after installing Dutch language pack
    By Dustie in forum Addon Language Packs
    Replies: 1
    Last Post: 5 Dec 2010, 07:03 PM
  3. Dutch Language pack isn't used
    By TheDNA in forum Addon Language Packs
    Replies: 0
    Last Post: 15 Mar 2010, 06:21 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