Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2010
    Location
    northern california coast
    Posts
    11
    Plugin Contributions
    0

    Default explode() expects parameter 2 to be string ... in functions_general.php line 566

    Hi everybody!

    I recently installed zen-cart ver 1.39b and I'm developing my website on my localhost before going "live."

    My DEBUG log reveals the following error:

    "PHP Warning: explode() expects parameter 2 to be string, array given in C:\xampp\htdocs\catalog\includes\functions\functions_general.php on line 566


    The section of code referred to in the error log is as follows:


    // Return a product ID from a product ID with attributes
    function zen_get_prid($uprid) {
    $pieces = explode(':', $uprid);

    return $pieces[0];
    }


    Line 566 is the line that reads:
    $pieces = explode(':', $uprid);

    According to the log, this error is reoccurring.

    I haven't touched the functions_general.php file and have no idea why I'm getting this error or how to fix it.

    Any assistance would be very much appreciated.

    Thank you.

  2. #2
    Join Date
    Aug 2005
    Posts
    26,245
    Plugin Contributions
    9

    Default Re: Debug log reveals error in functions_general.php file

    I recently installed zen-cart ver 1.39b and I'm developing my website on my localhost
    You should supply what versions of apache, mysql, and php your local is running
    Zen-Venom Get Bitten
    Get Your Business Found

  3. #3
    Join Date
    Mar 2010
    Location
    northern california coast
    Posts
    11
    Plugin Contributions
    0

    Default Re: Debug log reveals error in functions_general.php file

    I'm sorry. I'm using:

    + Apache 2.2.14
    + MySQL 5.1.41
    + PHP 5.3.1

  4. #4
    Join Date
    Mar 2010
    Location
    northern california coast
    Posts
    11
    Plugin Contributions
    0

    Default Re: Debug log reveals error in functions_general.php file

    I don't know what happened, but the problem no longer exists. Thanks for your interest in helping me.

  5. #5
    Join Date
    Apr 2006
    Posts
    383
    Plugin Contributions
    0

    Default Re: Debug log reveals error in functions_general.php file

    I've noticed this error 3 times today from 3 different visitors (a live site version 1.39d), php 5.3.2, Apache 2.2.15, MySQL 5.0.90.

    Note: checked all the changed files, including functions_general.php and all appear to have updated correctly (file dates and size).

    Any ideas (before I re-install updates or update Apache, etc)?

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

    Default Re: Debug log reveals error in functions_general.php file

    Note: This obviously was not on a Windows server, but the same error: "PHP Warning: explode() expects parameter 2 to be string, array given in.. line 566".

    More info after looking at logs: Example: After a new customer placed an order via Paypal Express, error occurred between the time of returning from Paypal to checkout confirmation and logging off.

  7. #7
    Join Date
    Apr 2006
    Posts
    383
    Plugin Contributions
    0

    Default Re: Debug log reveals error in functions_general.php file

    I've upgraded MySQL to 5.1.46, will see if that helps.

  8. #8
    Join Date
    Apr 2006
    Posts
    383
    Plugin Contributions
    0

    Default Re: Debug log reveals error in functions_general.php file

    Upgrading MySQL made no difference.

    Contribs include only the following: Ceon Manual Card, Column Divider Pro, Contactus Recaptcha, Direct Bank Deposit, Reward Points, ckeditor plugin for zen, and a template (Modern Zen) and Ceon advshipper and zones (commercial add-ons). All (so far as I know) the latest updates.

  9. #9
    Join Date
    Jan 2004
    Posts
    58,464
    Blog Entries
    3
    Plugin Contributions
    111

    Default Re: explode() expects parameter 2 to be string ... in functions_general.php line 566

    Does this suggested fix resolve the problem for you? http://www.zen-cart.com/forum/showthread.php?t=158213
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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
    Apr 2006
    Posts
    383
    Plugin Contributions
    0

    Default Re: explode() expects parameter 2 to be string ... in functions_general.php line 566

    Quote Originally Posted by DrByte View Post
    Does this suggested fix resolve the problem for you? http://www.zen-cart.com/forum/showthread.php?t=158213
    That appears to have fixed it. Thanks for the link.

 

 

Similar Threads

  1. Replies: 8
    Last Post: 6 Jan 2010, 02:34 PM
  2. Error on line 44 (functions_general.php)
    By john9 in forum General Questions
    Replies: 22
    Last Post: 12 Dec 2009, 04:23 PM
  3. Error in functions_general.php line 499 to 516
    By rich00693 in forum General Questions
    Replies: 2
    Last Post: 3 May 2009, 03:26 AM
  4. error in functions_general.php on line 41
    By Jayreis in forum Basic Configuration
    Replies: 4
    Last Post: 8 Aug 2006, 06:57 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
  •