Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Class 'queryFactory' not found on v1.3.9f

Class 'queryFactory' not found on v1.3.9f

Views: 8,311

Results 1 to 20 of 25
11 Oct 2010, 6:56 AM
#1
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Class 'queryFactory' not found on v1.3.9f

My system is upgraded from v1.3.8a to v1.3.9f on a php v5.3.2 server, and I keep receveing such error message when a new order comes in:

PHP Fatal error: Class 'queryFactory' not found in /shop/includes/functions/sessions.php on line 55

    $db = new queryFactory();
    $db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);

Most posts I've found are related to an old version of ZenCart on php v5.2+, and I don't know how to fix on v1.3.9f:cry:

11 Oct 2010, 7:05 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Class 'queryFactory' not found on v1.3.9f

Evidently you're missing an important file from your site: /includes/classes/db/mysql/query_factory.php
And, if you're missing that file, that almost certainly means you're also missing several others.

THE MOST COMMON cause of "not found" errors, is that a required file is missing from the server, or is damaged. And that's often a result of using weak FTP programs or experiencing timeouts while uploading via FTP.

Double-check every file to make sure it uploaded properly.

11 Oct 2010, 7:19 AM
#3
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: Class 'queryFactory' not found on v1.3.9f

Thanks,
/includes/classes/db/mysql/query_factory.php is there, and I'll upload again to see if it helps.

13 Oct 2010, 8:04 AM
#4
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: Class 'queryFactory' not found on v1.3.9f

Problem exists...and I notice that it only happens when a customer uses paypal to finish the order. I'll upload payment modules again to see if it helps.

13 Oct 2010, 8:18 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: Class 'queryFactory' not found on v1.3.9f

siliconbug:

I keep receveing such error message when a new order comes in:

PHP Fatal error: Class 'queryFactory' not found in /shop/includes/functions/sessions.php on line 55Um, what do you mean by "keep receiving"? How exactly are you "receiving" those messages?
siliconbug:

I notice that it only happens when a customer uses paypal to finish the order.
Which PayPal module, and why?
If you're using "Website Payments Standard", why? Using Express Checkout is much more reliable, and less prone to errors.

13 Oct 2010, 9:55 AM
#6
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: Class 'queryFactory' not found on v1.3.9f

When a customer places an order and pays via Paypal (Standard), the error message will be generated.

However, the payment still goes through, and the order is completed.

I'll switch to Paypal Express and keep watching.

13 Oct 2010, 9:58 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: Class 'queryFactory' not found on v1.3.9f

"generated" ... as in "displayed on the screen"? if so, where on the screen?
or do you mean "delivered to you in an envelope by the postman"?
or something else?

13 Oct 2010, 4:10 PM
#8
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: Class 'queryFactory' not found on v1.3.9f

The error message is generated by enable_error_logging.php

My paypal account shows I get the money, and the admin page of ZenCart shows the order details correctly. (Maybe there's something I miss)

13 Oct 2010, 6:12 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: Class 'queryFactory' not found on v1.3.9f

So it's not actually hurting any transactions or breaking any customer interactions on the site?

Has it persisted with Express Checkout? (I expect it will not continue after switching to the EC module, which is more contemporary and fits better into the flow of checkout).

14 Oct 2010, 1:14 AM
#10
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: Class 'queryFactory' not found on v1.3.9f

No, all transactions still runs smoothly.

BTW, I also notice that I get that same error message when I run Google base feeder v1.8.2 (hit the "confirm" button in the page to generate a new XML file).

28 Oct 2010, 7:45 PM
#11
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: Class 'queryFactory' not found on v1.3.9f

This error message still exists even when customers use Paypal Express, but as I said, all transactions go smoothly.

28 Oct 2010, 7:57 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: Class 'queryFactory' not found on v1.3.9f

"Where" does the error exist? Just in logs? Or actually on-screen?

2 Nov 2010, 9:38 AM
#13
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: Class 'queryFactory' not found on v1.3.9f

Just in log. (/cache/myDEBUG-xxxxxxxxxx-xxxxxx.log)
I'll upgrade to 1.3.9h later to see if it helps.

3 Nov 2010, 8:09 AM
#14
drbyte avatar

drbyte

Sensei

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

Re: Class 'queryFactory' not found on v1.3.9f

You can try editing /includes/functions/sessions.php and adding this line as shown, at line 55:```
//PHP 5.2.0 bug workaround ...
[B]if (!class_exists('queryFactory')) require('includes/classes/db/' .DB_TYPE . '/query_factory.php');[/B]
$db = new queryFactory();

9 Nov 2010, 12:07 AM
#15
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: Class 'queryFactory' not found on v1.3.9f

Getting worse?

PHP Warning: require(): open_basedir restriction in effect. File(includes/classes/db/mysql/query_factory.php) is not within the allowed path(s): (......) in /web/includes/functions/sessions.php on line 55

PHP Warning: require(includes/classes/db/mysql/query_factory.php): failed to open stream: Operation not permitted in /web/includes/functions/sessions.php on line 55

PHP Fatal error: require(): Failed opening required 'includes/classes/db/mysql/query_factory.php' (include_path='...') in /web/includes/functions/sessions.php on line 55

9 Nov 2010, 1:52 AM
#16
drbyte avatar

drbyte

Sensei

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

Re: Class 'queryFactory' not found on v1.3.9f

If your store is in the /shop/ folder, then why is it trying to access the /web/ folder?

Sounds like you've got wrong paths in your configure.php files?

9 Nov 2010, 8:48 AM
#17
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: Class 'queryFactory' not found on v1.3.9f

My mistake. :p

I have 2 shops, one is under /shop/, and the other is under /web/. Both of them get the same problem, and settings in each configure.php are correct.

In this case, error messages are:

PHP Warning: require(): open_basedir restriction in effect. File(includes/classes/db/mysql/query_factory.php) is not within the allowed path(s): (......) in /shop/includes/functions/sessions.php on line 55

PHP Warning: require(includes/classes/db/mysql/query_factory.php): failed to open stream: Operation not permitted in /shop/includes/functions/sessions.php on line 55

PHP Fatal error: require(): Failed opening required 'includes/classes/db/mysql/query_factory.php' (include_path='...') in /shop/includes/functions/sessions.php on line 55

9 Nov 2010, 9:14 AM
#18
drbyte avatar

drbyte

Sensei

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

Re: Class 'queryFactory' not found on v1.3.9f

You removed the "allowed paths". It's hard to help if you don't give the exact details.

9 Nov 2010, 10:54 AM
#19
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: Class 'queryFactory' not found on v1.3.9f

PHP Warning: require(): open_basedir restriction in effect. File(includes/classes/db/mysql/query_factory.php) is not within the allowed path(s): (/usr/bin/php:/etc:/var/run:/tmp:/var/spool/php:/var/services) in /shop/includes/functions/sessions.php on line 55

PHP Warning: require(includes/classes/db/mysql/query_factory.php): failed to open stream: Operation not permitted in /shop/includes/functions/sessions.php on line 55

PHP Fatal error: require(): Failed opening required 'includes/classes/db/mysql/query_factory.php' (include_path='.:/usr/php/lib/php') in /shop/includes/functions/sessions.php on line 55

9 Nov 2010, 3:05 PM
#20
drbyte avatar

drbyte

Sensei

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

Re: Class 'queryFactory' not found on v1.3.9f

siliconbug:

PHP Warning: require(): open_basedir restriction in effect. File(includes/classes/db/mysql/query_factory.php) is not within the allowed path(s): (/usr/bin/php:/etc:/var/run:/tmp:/var/spool/php:/var/services) in /shop/includes/functions/sessions.php on line 55Evidently your server is misconfigured, specifically disallowing access to your /shop/ folder.
None of those paths includes your /shop/ or /web/ folders.

This is a problem you need to report to your hosting company so they can fix the server's PHP configuration.