Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2

    RodG's post (http://www.zen-cart.com/showthread.p...53#post1230753) should be a wake-up call to any plugin authors who use PHP mysql* functions rather than using the Zen Cart $db-related functions. Since v1.5.2 converted to use mysqli* functions, any plugin that uses mysql* functions will experience an error when used in v1.5.2.

  2. #2
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2

    If only the following PHP mysql* functions need upgrading:
    mysql_fetch_array
    mysql_query

    then for me it looks like these important mods will require an upgrade:
    SuperOrders
    EasyPopulate4
    OzPost

    But are there any other PHP mysql* functions that need to be addressed?

  3. #3
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2

    There are many others:

    http://www.php.net/manual/en/ref.mysql.php

    But which of these PHP mysql* funcitions are not compatible with zencart 152.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2

    Quote Originally Posted by dw08gm View Post
    There are many others:

    http://www.php.net/manual/en/ref.mysql.php

    But which of these PHP mysql* funcitions are not compatible with zencart 152.
    I'm guessing that the answer is "none of them".

  5. #5
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2

    Whoops. My bad. Briefly confused mysql* with the mysqli* functions.

    What I intended to ask is whether any of the PHP mysqli* functions are incompatible with or otherwise to be replaced by specific Zen Cart 152+ $db-related functions.

    Happy Holidays

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2

    Quote Originally Posted by dw08gm View Post
    Whoops. My bad. Briefly confused mysql* with the mysqli* functions.

    What I intended to ask is whether any of the PHP mysqli* functions are incompatible with or otherwise to be replaced by specific Zen Cart 152+ $db-related functions.

    Happy Holidays
    Understood, since mysqli* does fall under mysql*! I should have more properly phrased the functions as mysql_*.

    Just like the previous versions of Zen Cart abstract the database calls (using mysql_* functions) via the query_factory class, v1.5.2 provides the same interface abstraction using mysqli_* calls -- thus making the transition from the (now deprecated) mysql_* calls transparent to any code that calls the $db interface (or the zen_db* functions). If I found the need to use a mysqli_* function that is not currently abstracted by the Zen Cart database class, I'd create a suggestion for Zen Cart to include that function's processing within the database class structure.

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2

    Since it sounds like ZC v1.5.3 is coming soon, I thought that I'd refresh this thread to remind plugin authors to check their plugins for compatibility with ZC 1.5.2 (and later) relative to the use of any PHP mysql_* direct function calls. Since the $db object in ZC 1.5.2+ uses a mysqli interface, it is incompatible with any use of PHP mysql_* functions!

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

    Default Re: Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2

    Clarification: The current version of PHP is what's incompatible with the old mysql_xxxx() function calls.
    Your custom code should always be using the built-in $db object, and NOT writing your own direct calls to mysql_xxxx() or mysqli_xxxxx() functions.

    And, keep in mind that the syntax is different between the mysql_xxxx() and mysqli_xxxx() functions. You can't just change them out for the other ones. You must also change a number of parameters. THAT is one big reason why you should just use the built-in $db object methods in your ZC plugins. And also the fact that the $db object handles security correctly, and making your own calls to mysql functions does not.
    .

    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.

 

 

Similar Threads

  1. v151 Plugin authors: Overrides of /includes/functions/html_output.php
    By lat9 in forum Contribution-Writing Guidelines
    Replies: 2
    Last Post: 3 May 2014, 08:48 AM
  2. Replies: 0
    Last Post: 15 Aug 2013, 03:24 AM
  3. Backup MYSQL Plugin for GoDaddy?
    By Timbo53 in forum General Questions
    Replies: 4
    Last Post: 1 Apr 2011, 04:25 PM
  4. Compatibility with mysql 5
    By sparklefish in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 20 Mar 2011, 06:56 PM
  5. Need recommendation for POS Use with Zen Best compatibility.
    By Redcinamn in forum General Questions
    Replies: 1
    Last Post: 19 Mar 2008, 01:56 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