Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Intermittent error: "missing file" query_factory.php

    Occasionally (varying from a couple of times a day to once in a couple of days) I see the following error in the log (both catalog and admin side):

    [02-Jul-2013 11:08:23] PHP Warning: require(includes/classes/db/mysql/query_factory.php): failed to open stream: No such file or directory in /domains/eenwebsite.nl/public_html/includes/functions/sessions.php on line 54
    [02-Jul-2013 11:08:23] PHP Fatal error: require(): Failed opening required 'includes/classes/db/mysql/query_factory.php' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /domains/eenwebsite.n/public_html/includes/functions/sessions.php on line 54
    As far as I know the site (usually) works without problems, but just to be sure I checked to see if the file is there.

    I guess this must be a server issue, but since query_factory.php is the only file which sometimes is "missing" I was wondering if this might be a known issue and maybe it's related to a ZC setting?

    It's a Zen Cart 151 store running on PHP5.3 (linux server). The site has several modifications, but not anything I can imagine to be related to the error. Unfortunately I can't possible say when it started as I don't have old logs of the site.

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

    Default Re: Intermittent error: "missing file" query_factory.php

    Not a known issue.

    But it does suggest that something's odd with the session scenario where that part of the code is firing, since that line 54 only fires if the $db object doesn't exist when it ought to.

    Ultimately that part of the code is due for some optimizing, but in order to offer a simple fix for you, we'd need to know what exact pattern of behavior will consistently trigger the error. That's the most important piece of the puzzle.
    .

    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
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Intermittent error: "missing file" query_factory.php

    Thanks for the reply.

    I now remember seeing this line was added to the top application_top.php:
    Code:
    apc_delete_file('/domains/website.nl/public_html/includes/classes/db/mysql/query_factory.php');
    This modification got lost in an upgrade from 1.3.8 to 1.5.1., and I am hesitant to re-add it without knowing what it exactly does.

    It seems to be related and I think the host added it. So I will give to host a call to see if they know more about it.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Intermittent error: "missing file" query_factory.php

    That looks like they're using APC to accelerate PHP scripts by caching the files, and for some reason they're having difficulty getting the cache to work correctly, so they're hacking in extra code changes to accommodate.
    .

    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
    Nov 2007
    Location
    Upstate NY
    Posts
    232
    Plugin Contributions
    0

    Default Re: Intermittent error: "missing file" query_factory.php

    Hi

    We have a new installation of ZC 1.5.1. I installed Easy Populate CSV for ZC 1.5 but it was failing, so I tried EZ Pop 4. I also increased the memory allocation in php config.

    After i uploaded the files for Easy Populate 4 the admin went to a blank page. So I deleted the files (there were no over-writes, it's just a few files) and I still have a white screen. Error log shows this:

    I don't think I have an EZP issue since I didn't even run SQL on it. We're on a PHP 5.3 VPS. I replaced the files listed below with fresh copies out of the 1.5 package but still nothing. Front end is fine.

    So, I'm putting this here since this post has a similar issue. These 3 lines are generated in a debug file every few minutes. Just these lines. Error logs on the server are fine.

    [18-Sep-2013 19:05:38 America/New_York] PHP Warning: require(includes/languages/english.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/.../public_html/::our_admin::/includes/init_includes/init_languages.php on line 35

    [18-Sep-2013 19:05:38 America/New_York] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/languages/english.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/.../public_html/::our_admin::/includes/init_includes/init_languages.php on line 35

    [18-Sep-2013 19:05:38 America/New_York] PHP Warning: require(includes/classes/db/mysql/query_factory.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/.../public_html/includes/functions/sessions.php on line 54

    [18-Sep-2013 19:05:38 America/New_York] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/classes/db/mysql/query_factory.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/.../public_html/includes/functions/sessions.php on line 54

  6. #6
    Join Date
    Nov 2007
    Location
    Upstate NY
    Posts
    232
    Plugin Contributions
    0

    Default Re: Intermittent error: "missing file" query_factory.php

    So I've gone through asll teh SQL for both versions and crawled through all the directories both of them touch, All EZ Pop files are gone, all of the SQL was undone by the first uninstall. I never ran SQL for the second one.

    When I had the ineffective EZ Pop installed the admin worked. So, I just uploaded the files again and ran the SQL in cPanel. The version is easy_populate_csv_for_zencart_v1.5.x_v1.2.5.7c

    The 3 error above are gone and now the debug file only shows this. None of the EZ Pop files are in those folders.

    [18-Sep-2013 22:34:58 America/New_York] PHP Fatal error: Call to undefined function zen_validate_password() in /.../public_html/::my_admin::/includes/functions/admin_access.php on line 316
    [18-Sep-2013 22:34:58 America/New_York] PHP Fatal error: Class 'queryFactoryResult' not found in /.../includes/classes/db/mysql/query_factory.php on line 213

    Currently the admin login page loads, I enter my login and then it goes to a blank page and throws the error above.

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

    Default Re: Intermittent error: "missing file" query_factory.php

    Quote Originally Posted by Tapper View Post
    [18-Sep-2013 22:34:58 America/New_York] PHP Fatal error: Call to undefined function zen_validate_password() in ...
    That error will appear when you swap out the functions_general.php and/or password_funcs.php files with versions of those files that belong to other ZC releases.
    .

    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.

 

 

Similar Threads

  1. v151 New usps module says "ERROR missing saveusps.php"
    By linniedarling in forum Addon Shipping Modules
    Replies: 2
    Last Post: 23 Mar 2014, 02:33 PM
  2. "PHP Warning" but no error in the file
    By Oredayo in forum General Questions
    Replies: 5
    Last Post: 18 Dec 2011, 08:05 AM
  3. Error - missing "database_upgrade_default.php"
    By Stormshade in forum Upgrading from 1.3.x to 1.3.9
    Replies: 10
    Last Post: 21 Jul 2007, 03:47 PM
  4. Error Log full of "missing tpl_products_general_info_default.php"
    By notset4life in forum General Questions
    Replies: 2
    Last Post: 7 Apr 2007, 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