Forums / Upgrading from 1.3.x to 1.3.9 / Call to undefined function: cfg_select_option() after upgrading

Call to undefined function: cfg_select_option() after upgrading

Locked

Started by syringahobbycraft on 4 Dec 2007, 11:30 PM · Views: 2,559

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
4 Dec 2007, 11:30 PM
#1
syringahobbycraft avatar

syringahobbycraft

New Zenner

Join Date:
Sep 2007
Posts:
9
Plugin Contributions:
0

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 :censored: maintenance.
I even downloaded a fresh copy of the file and still the the same error. :frusty::frusty:
Please, Tell me how to fix this. Thanks in advance!

5 Dec 2007, 12:08 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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

SyringaHobbyCraft:

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.

5 Dec 2007, 6:18 AM
#3
syringahobbycraft avatar

syringahobbycraft

New Zenner

Join Date:
Sep 2007
Posts:
9
Plugin Contributions:
0

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

Thanks! All fixed... I think anyway. :blink::smile: Lesson Learned.

4 Aug 2009, 3:39 PM
#4
gottoys avatar

gottoys

New Zenner

Join Date:
Mar 2009
Posts:
12
Plugin Contributions:
0

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 EXISTSzen_.

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

4 Aug 2009, 5:59 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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.

5 Aug 2009, 1:04 AM
#6
gottoys avatar

gottoys

New Zenner

Join Date:
Mar 2009
Posts:
12
Plugin Contributions:
0

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!!