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
    Location
    Arizona
    Posts
    27,761
    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

  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
    413
    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
    413
    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
    413
    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
    413
    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
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    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
    Apr 2006
    Posts
    413
    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. v153 PHP Warning: addslashes() expects parameter 1 to be string
    By BlackOrchidCouture in forum General Questions
    Replies: 2
    Last Post: 17 Sep 2014, 10:47 PM
  2. v139e PHP Warning: strlen() expects parameter 1 to be string, array given in
    By irishshopper in forum Basic Configuration
    Replies: 4
    Last Post: 7 Mar 2013, 08:06 PM
  3. Replies: 41
    Last Post: 19 Sep 2012, 04:04 AM
  4. Replies: 13
    Last Post: 5 May 2011, 03:48 AM
  5. Replies: 0
    Last Post: 26 Jun 2010, 12:29 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