Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Posts
    2
    Plugin Contributions
    0

    Default Database Error after Installation

    I have installed ZC and I cannot access the admin pages

    zc_install determines

    System Inspection Results
    • Webserver = Apache/2.0.59 (FreeBSD) PHP/5.2.0
    • HTTP Host = www.phskhockey.org.au
    • Path_Translated = /home/phskhockey/public-html/zen-cart/zc_install_done/index.php(SCRIPT_FILENAME)
    • Server Free Disk Space = 210.49 GB
    • PHP O/S = FreeBSD
    • PHP API Mode = apache2handler
    • PHP Max Execution Time per page = 60
    • Register Globals = OFF
    • MySQL Support = ON
    • MySQL Version = 5.0.27 Click here for more info
    • PHP Version = 5.2.0
    • PHP Safe Mode = OFF
    • PHP Sessions Support = ON
    • PHP Session.AutoStart = OFF
    • PHP session.use_trans_sid = OFF
    • Current SQL Cache Folder = /home/phskhockey/public-html/zen-cart/cache -->Writeable
    • Suggested SQL Cache Folder = /home/phskhockey/public-html/zen-cart/cache
    • PHP magic_quotes_runtime setting = OFF
    • PHP GD Support = ON
    • GD Version = GD bundled (2.0.28 compatible)
    • PHP ZLIB Compression Support = ON
    • PHP cURL Support = OFF Click here for more info
    • PHP Upload Support = ON upload_max_filesize=8M; post_max_size=8M
    • PHP Upload TMP dir =
    The error occurs when I attempt to admin login

    Fatal error: Call to a member function Execute() on a non-object in ... /zen-cart-v1.3.6-full-fileset-10272006/includes/functions/sessions.php on line 61

    I included some debugs in sessions.php which indicate that the database factory object $db does not exist at that point.

    problem occurs in includes/functions/sessions.php


    $qid = "select count(*) as total
    from " . TABLE_SESSIONS . "
    where sesskey = '" . zen_db_input($key) . "'";


    >> $total = $db->Execute($qid);


    I added some echos in sessions.php


    $qid = "select count(*) as total
    from " . TABLE_SESSIONS . "
    where sesskey = '" . zen_db_input($key) . "'";

    echo "DEBUG query = <BR>\n" . $qid . "<br>\n" ;

    echo "DEBUG isset(\$db)=" . isset($db) . "<BR>\n" ;

    $total = $db->Execute($qid);


    When running in admin login they show

    the admin login box and
    DEBUG query =
    select count(*) as total from zen_sessions where sesskey = '084871d5163abc9d8da5753de018917e'
    DEBUG isset($db)=

    Running from ZC shows a similar problem has occured but the ZC default page looks well formed and highly functional

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

    Default Re: Database Error after Installation

    Matthew,
    Welcome to Zen Cart

    You've stumbled on a problem related to changes introduced by PHP in their 5.2.0 release.

    Here's a workaround:

    http://www.zen-cart.com/forum/showpo...7&postcount=26
    .

    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
    Dec 2006
    Posts
    2
    Plugin Contributions
    0

    Default Re: Database Error after Installation

    THat was quick !!

    Good One

    Has fixed the problem . . . ( and why didn;t I think of that approach myself :)

    MB

 

 

Similar Threads

  1. 500 Error - FastCGI error message after database installation page.
    By hungoveragain in forum Installing on a Windows Server
    Replies: 8
    Last Post: 24 Sep 2010, 03:37 PM
  2. Database installation error
    By Irfan in forum Installing on a Windows Server
    Replies: 3
    Last Post: 2 Jul 2009, 09:06 PM
  3. import files to database after installation
    By dereckgriffith in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 5 May 2008, 10:59 AM
  4. Installation error 1064 when creating database
    By tonyprodger in forum Installing on a Windows Server
    Replies: 2
    Last Post: 6 May 2007, 08: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