If this is your first visit, check our documentation. To post, register or login.
Forums / Installing Zen Cart / Installing on a Linux/Unix Server / Class 'queryFactory' not found on v1.3.9f

Class 'queryFactory' not found on v1.3.9f

Started by siliconbug on 11 Oct 2010, 6:56 AM · Views: 8,323

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

siliconbug

Zen Follower

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

Post #1 by siliconbug

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,512
Plugin Contributions:
176

Post #2 by drbyte

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.

.
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.

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

siliconbug

Zen Follower

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

Post #3 by siliconbug

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:
126
Plugin Contributions:
0

Post #4 by siliconbug

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,512
Plugin Contributions:
176

Post #5 by drbyte

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.

.
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.

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

siliconbug

Zen Follower

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

Post #6 by siliconbug

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,512
Plugin Contributions:
176

Post #7 by drbyte

"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?

.
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.

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

siliconbug

Zen Follower

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

Post #8 by siliconbug

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,512
Plugin Contributions:
176

Post #9 by drbyte

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).

.
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.

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

siliconbug

Zen Follower

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

Post #10 by siliconbug

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:
126
Plugin Contributions:
0

Post #11 by siliconbug

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,512
Plugin Contributions:
176

Post #12 by drbyte

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

.
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.

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

siliconbug

Zen Follower

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

Post #13 by siliconbug

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,512
Plugin Contributions:
176

Post #14 by drbyte

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();

.
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.

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

siliconbug

Zen Follower

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

Post #15 by siliconbug

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,512
Plugin Contributions:
176

Post #16 by drbyte

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?

.
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.

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

siliconbug

Zen Follower

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

Post #17 by siliconbug

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,512
Plugin Contributions:
176

Post #18 by drbyte

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

.
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.

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

siliconbug

Zen Follower

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

Post #19 by 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 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,512
Plugin Contributions:
176

Post #20 by drbyte

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.

.
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.