Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2011
    Location
    Colorado, USA
    Posts
    46
    Plugin Contributions
    0

    Default WordPress: Including application_top fails in init_db_config_read.

    I eventually tracked this down when I was trying to use Sidebox Anywhere with WordPress (v3.3.1 - Genesis 1.8). Execution stalls at:
    PHP Code:
    $configuration $db->Execute('select configuration_key as cfgkey, configuration_value as cfgvalue
                                     from ' 
    TABLE_CONFIGURATION''$use_cache150); 
    The select runs in phpMyAdmin. Has anyone come across this or can you help me with how to debug this.

    Many Thanks

  2. #2
    Join Date
    Jun 2011
    Location
    Colorado, USA
    Posts
    46
    Plugin Contributions
    0

    Default Re: WordPress: Including application_top fails in init_db_config_read.

    I just found this in one of the debug files.

    PHP Fatal error: Call to a member function sql_cache_exists() on a non-object in /home/xyz/public_html/store/includes/classes/db/mysql/query_factory.php on line 125

  3. #3
    Join Date
    Jun 2011
    Location
    Colorado, USA
    Posts
    46
    Plugin Contributions
    0

    Default Re: WordPress: Including application_top fails in init_db_config_read.

    Since this has been moved to the add-ons forum I wanted to mention that this happens whenever I include a file from zen cart that requires application_top.php into WordPress, not just with Sidebar Anywhere.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: WordPress: Including application_top fails in init_db_config_read.

    Zen Cart was never written to run from within WordPress.
    Evidently WordPress uses variables that are of the same name as those that Zen Cart uses, and is using them for different purposes.

    Thus, whatever you're trying to do ... can't.
    .

    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. #5
    Join Date
    Jun 2011
    Location
    Colorado, USA
    Posts
    46
    Plugin Contributions
    0

    Default Re: WordPress: Including application_top fails in init_db_config_read.

    I am trying to add the bestsellers sidebox to the sidebar of a WordPress blog. Zen Cart is in a sub-folder 'store'. I had a basic implementation working in a previous version of WordPress and I know others currently have it working.

    I tracked it down to this line in query_factory.php
    PHP Code:
    if ( $zf_cache AND $zc_cache->sql_cache_exists($zf_sql$zf_cachetime) ) 
    values
    zf_cache = 1
    zf_sql = select configuration_key as cfgkey, configuration_value as cfgvalue from configuration
    zf_cachetime = 150
    If there is nothing wrong with these values I will try and track down what may be causing the conflict.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: WordPress: Including application_top fails in init_db_config_read.

    No, there's nothing wrong with those values.
    .

    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.

  7. #7
    Join Date
    Jun 2011
    Location
    Colorado, USA
    Posts
    46
    Plugin Contributions
    0

    Default Re: WordPress: Including application_top fails in init_db_config_read.

    Thanks Doc. I will report back any findings, successful or otherwise, just in case anyone else is having the same issue.

  8. #8
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: WordPress: Including application_top fails in init_db_config_read.

    I just wanted to drop in to add this to this thread.

    I've ONLY ever been able to get Zen Cart sideboxes to appear in WordPress widgets when my widget code includes a call to an external file using a require or include statement. Dropping the code from the external file directly inside a WordPress widget always lead to the sidebar disappearing from the point the Zen Cart sidebox code starts.. What causes this is WELL over my paygrade to understand fully...

    I'm sure there is a way to do this without using an include or require, but it is definitely over my meager little skills to execute..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 

Similar Threads

  1. To read session in the init_db_config_read.php
    By arvind21 in forum General Questions
    Replies: 0
    Last Post: 22 Jun 2009, 02:42 PM
  2. Replies: 6
    Last Post: 11 May 2009, 03:35 AM
  3. Errors in application_top
    By cdjohn31 in forum General Questions
    Replies: 8
    Last Post: 3 Oct 2007, 10:52 AM
  4. Q: including application_top.php in another script
    By calguy1000 in forum General Questions
    Replies: 0
    Last Post: 15 Dec 2006, 05:34 PM
  5. application_top
    By bobrushworth in forum General Questions
    Replies: 3
    Last Post: 6 Oct 2006, 02:40 AM

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