Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2007
    Posts
    9
    Plugin Contributions
    0

    Default Call to undefined function: cfg_select_option() after upgrading

    I could really use some help here. I have my store in maintenance mode. I installed 1.3.8 and upgraded the database. Had a few problems here and there, but nothing that couldn't be fixed by reading the forums.

    I think, I can't remember for sure, that when I got 1.3.8 installed I put the store into maintenance mode again. Now that I am ready to get out of maintenance I can't.
    Here is the error I am getting:
    Fatal error: Call to undefined function: cfg_select_option() in /home/xxxxxx/public_html/admin/configuration.php(192) : eval()'d code on line 1
    I also get the same error for other functions in admin.
    What I have done to try to fix it:
    1: upload the the configuration.php from 1.3.7.1 I still get the same error
    2: upload the configuration.php from 1.3.7 Same error and I lost my patch level
    I fixed the patch level, but I still can't get out of maintenance.
    I even downloaded a fresh copy of the file and still the the same error.
    Please, Tell me how to fix this. Thanks in advance!

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

    Default Re: Fatal Error after uprade to 1.3.8

    Quote Originally Posted by SyringaHobbyCraft View Post
    Call to undefined function: cfg_select_option()
    Your problem has nothing to do with your /admin/configuration.php file.

    Your problem is related to something you've done in your database.

    When you upgraded, did you edit your database file and rename "zen_" to "" to remove some prefixes?
    Doing that is dangerous, because there are several data records in your database which require the zen_ part ... namely the zen_cfg_select_option() function calls. If you've renamed that info in your database, then you've busted the normal function of your admin configuration switch controller.
    .

    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
    Sep 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: Call to undefined function: cfg_select_option() after upgrading

    Thanks! All fixed... I think anyway. Lesson Learned.

  4. #4
    Join Date
    Mar 2009
    Posts
    12
    Plugin Contributions
    0

    Default Re: Call to undefined function: cfg_select_option() after upgrading

    I have had the same problem described here. I have gone back in and changed my database so that the zen_ is in the beginning of each table. I have two sites that I have done this with, each has the same database structure. one of them now works, the other does not. I replaced the zen_ by exporting the database and using a txt editor I used the replace function and replaced CREATE TABLE IF NOT EXISTS ` with CREATE TABLE IF NOT EXISTS `zen_.

    this changed all of the tables in my DB and I then went into my config files and changed the prefix back to 'zen_'

    I am able to get to my store and everything comes up as well as edit and add products, pretty much everything works great except being able to change the index listing in the admin - config area. any help is greatly appreciated.

    Thank you

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

    Default Re: Call to undefined function: cfg_select_option() after upgrading

    The problem is you changed the wrong thing.

    There are many database entries in the "configuration" table that contain "zen_cfg_xxxxx" in them. And, since you did a mass replace of all instances of "zen_", you wiped those out. So, replacing all the CREATE TABLE statements by putting back the "zen_" on those lines did nothing at all to fix the real problem of damaged data in the records for the configuration table.

    That's why you still have the problem.

    The better solution would have been to take a clean copy of the database backup and either use it as-is including the zen_ prefix on all the table names, or find all the DROP and CREATE TABLE statements and just rename *those* occurrences of "zen_".
    .

    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.

  6. #6
    Join Date
    Mar 2009
    Posts
    12
    Plugin Contributions
    0

    Default Re: Call to undefined function: cfg_select_option() after upgrading

    Thank you for the reply, what I actually did to fix it was export my live sites database (that was working properly).

    Copied the products sections from my secondary site DB into that exported file so that the only difference was the products (so I didn't have to input all of them again) and uploaded the changed file. This successfully. It was a bit time consuming but I was able to accomplish what I needed without having to rebuild the site. I am sure reinstalling would have been quicker but I like punishing myself and trying to "fix things" which is how I got into this mess to begin with!!! lol


    sorry for the long winded message and thank you for helping me out!!

 

 

Similar Threads

  1. v151 Call to undefined function zen_datetime_short() after installing Print Invoice Popup
    By DML73 in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 21 Jul 2014, 06:12 PM
  2. Call to undefined function zen_user_has_gv_balance()
    By gaurav10feb in forum General Questions
    Replies: 9
    Last Post: 1 Jan 2011, 11:02 PM
  3. Call to undefined function
    By Forum5 in forum General Questions
    Replies: 10
    Last Post: 14 Sep 2010, 02:43 PM
  4. Call to undefined function zen_get_products_manufacturers_url
    By chelgeson in forum General Questions
    Replies: 1
    Last Post: 30 Jun 2009, 05:07 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