Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Nov 2006
    Posts
    56
    Plugin Contributions
    0

    Default Re: Store - FATAL ERROR?

    I am indeed using Site Ground and I still have not found any solution....

    Have checked that the directories match as suggested by AJEH. they do. No new modification dates. Nothing working.

    any one find a solution?

  2. #12
    Join Date
    Jan 2006
    Location
    Vancouver, BC
    Posts
    71
    Plugin Contributions
    0

    Default Re: Store - FATAL ERROR?

    I haven't yet but SiteGround reopened my ticket and said:
    "We have developed a patch especially for the purpose of solving issues between ZenCart and PHP like the ones you have been experiencing. As we haven't had clients with custom templates, the patch was not tested on such ZenCart installations and so we are not aware whether it may need further adjustments or not. "

    and that:
    "that the problem is in the custom template itself as it could use the problematic PHP class (dir). If this is the issue we can fix it very easily."

    We'll see...

  3. #13
    Join Date
    Nov 2006
    Posts
    56
    Plugin Contributions
    0

    Default Re: Store - FATAL ERROR?

    After talking with Site Ground, they applied a patch, but that patch seems to have wiped out my template, which is fixable, but now I am getting a new error...

    I cannot find any modules - order, payments, etc....

    I get this when I click on the install button:

    Warning: reset() [function.reset]: Passed variable is not an array or object in /home/touchpla/public_html/store/admin/modules.php on line 275

    Warning: Variable passed to each() is not an array or object in /home/touchpla/public_html/store/admin/modules.php on line 276


    I described my error here:

    http://www.zen-cart.com/forum/showthread.php?t=62396

    please provide any help there...

  4. #14
    Join Date
    Nov 2006
    Posts
    56
    Plugin Contributions
    0

    Default Re: Store - FATAL ERROR?

    SiteGround was indeed the problem for me. I have received a solution. Here is what we did:

    1. Site Ground voluntarily applied a "patch" - this made the store work, but NO TEMPLATE, and no payment or order total modules showed up at al...

    - Here are details about the so called patch:

    Here is the what we did:

    Go to the zencart folder and edit this file: includes/classes/template_func.php

    In the file search for a function named get_template_part. It should contain this code:

    if ($dir = @dir($page_directory)) {
    while ($file = $dir->read()) {
    if (!is_dir($page_directory . $file)) {
    if (substr($file, strrpos($file, '.')) == $file_extension && preg_match($template_part, $file)) {
    $directory_array[] = $file;
    }
    }
    }
    sort($directory_array);
    $dir->close();
    }

    Comment this code(only the lines showed above). And add this lines:

    $fileta = shell_exec("ls -1A $page_directory");
    $fileta = ereg_replace("[\r|\n]", ' ', $fileta);
    $fileta_be = explode(" ", $fileta);
    foreach ($fileta_be as $fileto) {
    if (substr($fileto, strrpos($fileto, '.')) == $file_extension && preg_match($template_part, $fileto)) {
    $directory_array[] = $fileto;
    }
    }
    sort($directory_array);

    Save and reload the page.


    2. I asked Site Ground to do a restore of my store folder into a new folder (allowing me to compare the two). I was going to be charged for the restore. But $30 bucks seemed much better than hours looking at code...

    3. The site magically started working today - the template re-appeared and I had to re-install a couple modules, but they worked just fine.

    - not sure if site ground really did a restore or what to make it finally work.


    Perhaps the above code will be of some service.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 1
    Last Post: 9 Oct 2011, 06:24 AM
  2. Fatal error - can't load admin or store?
    By itseemedsosimple in forum General Questions
    Replies: 4
    Last Post: 8 Feb 2011, 07:22 AM
  3. Replies: 10
    Last Post: 1 Jun 2008, 06:38 AM
  4. Store Fatal Error
    By foryou in forum Installing on a Windows Server
    Replies: 5
    Last Post: 28 May 2007, 03:05 AM
  5. Fatal error: Cannot redeclare class table in ...store/includes/
    By Kansai_mike in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 15 Dec 2006, 06:35 AM

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