X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   General talk (https://forum.x-cart.com/forumdisplay.php?f=29)
-   -   Upgrade your store (https://forum.x-cart.com/showthread.php?t=38953)

intel352 05-10-2008 09:09 PM

Re: Upgrade your store
That was a concern of mine as well, but in practice, it hasn't had any noticeable effect on performance.

If you want to improve performance, check my thread in Bugs/Fixes, that has a patch for X-Cart 4.0 that drastically improves performance for most users. (i.e. - hefty page loads of 10-30s reduced to 1s, Emerson of EWDHosting can vouch for that)

Jerrad 05-26-2008 07:34 AM

Re: Upgrade your store
I'm having a few problems after upgrading to PHP/MYSQL 5:

The admin orderpages are loading fast, but after I make a status change and press the button 'apply changes', it takes ages until the next page appears (with the button 'go back').
But opening a second admin session shows that the status change already is done before the orderpage in the first admin session reaches this next page...

Furthermore, after the upgrade I can't change the order in which the orderlist is displayed. Clicking on 'order' or 'date' doesn't change anything...
Before the upgrade it worked fine and none of the files or templates were changed during the upgrade.

Other problem are the emails.
After a order is placed (and visible in the admin) it can take up to half an hour until I receive the email.
Same goes for the profile created emails I'm receiving, and sometimes I'm receiving the same email 2-4 times (with intervals of 3-4 minutes)...

Anybody got a idea what could be causing this?

Jerrad 05-26-2008 01:59 PM

Re: Upgrade your store
I just discovered that the same problem occurs when a customers registers during checkout - the page 'just' keep hanging forever on the register page... :?

BUT, I also discovered that turning off HTTPS for users login and registration solves this and the next step in checkout opens almost instant.
Same goes for the page load problem in the admin when changing a order status - the next page loads instant.

So, looks this is related to my (private) SSL certificate, which must be causing these problems after moving to another server.

I will contact my host tomorrow and I hope they can find the problem fast, cause I'm having the same page load problem after a order is placed - it keeps on hanging on the 'payment wait' page...

robertswww 05-27-2008 09:27 AM

Re: Upgrade your store

Originally Posted by Jerrad
So, looks this is related to my (private) SSL certificate, which must be causing these problems after moving to another server.

That sounds correct. If you keep the same domain name and just move to another server with the same web host, your same cert should be able to move over fine.

Just make sure that both of your servers are running the same server software, then you can move your existing SSL Cert.

Your SSL cert and its private key can be exported from your original server (and any intermediary certs), and then imported into your new server.

Your web host will need to finalize things on their end and then restart your web server.

Also, make sure your config.php file still points to the correct domain for you https connections.

Let us know what solution your web host comes up with.


Jerrad 05-28-2008 09:16 AM

Re: Upgrade your store
I'm happy to say that all the problems are solved!
My host made some changes to the SSL and also noticed that we weren't upgraded to php5 yet...
After the SSL changes and upgrade to php5 all the problems mentioned in the above posts were instantly gone. :D/

It's great to have a online store again where customers actually can register and place orders... :wink:

Btw, my host informed me also about some kind of bug between php5 and mysql5 which stops the function imap_open() to work (properly), which is needed for pop3/imap fetching used by some helpdesk scripts.
Anybody maybe heard before about this bug and knows a solution or workaround to get the imap_open() to function again?

Thanks! :-)

intel352 05-28-2008 09:51 AM

Re: Upgrade your store
Are you running any scripts that use imap_open?

I have no clue why MySQL 5 would interfere in any way with imap_open, as it doesn't depend on MySQL. Can you get your host to provide more info?

Jerrad 05-28-2008 10:17 AM

Re: Upgrade your store
We're currently testing with a helpdesk script that uses the imap_open() for for pop3/imap fetching.

According to our host it seems that the combination of php5 with mysql5 causes a bug which affects the imap_open()...
Before moving to the new server the script worked fine on php4 with mysql4. And even on php4 with mysql5 it worked without any problems.
But after the upgrade to php5 with mysql5 the pop3/imap fetching stopped working and my host came up with the bug story... 8O

Any ideas or suggestions?

intel352 05-28-2008 10:35 AM

Re: Upgrade your store
Likely it's still nothing to do with MySQL5, at least, not with that function directly. BTW, this should be a new thread, you might want to start a new one.

Anyways, you'll need to post the exact errors that are being recorded. This is more likely due to PHP 5 and/or code that is PHP 5 incompatible.

We'll also need to know what version of PHP is being used specifically, same for MySQL.


donmck 05-28-2008 11:57 AM

Re: Upgrade your store
x-cart V4.0.17 and MYSQL5.X data base compatibility

After message exchanges with Emerson (EWDhosting.com) on this issue, I decided to approach Qualiteam, as it wasn't clear to me that the official patch meant that my store was fully compatible with MYSQL5.X data base, or would it simply make it capable of working with potential problems. I was prepared to test my cart on a suitable server, and suggested this, but as they were able to satisfy me, and offer a verbal guarantee of compatibility, with the offer of adapting the patch due to unforeseen troubles, I have settled for this arrangement.

I have also taken the liberty of providing the email exchange between myself and Qualiteam, as I feel it will not only help Qualiteam, but also many x-cart users. I never like quoting others messages in an open forum, however I told Qualiteam that I wished to report back to this forum with details, and as there were no objections, I have gone ahead.

The basic exchange minus the niceties listed below:

Cheers Don...

================================================== ===============
What I would like you to do is verify the compatibility of my http://www.dontronics-shop.com site with your patch, which I believe you will need to copy my site to a suitable server to do this.
I have listed the modifications below: (Long List Included)
Please let me know what you are able to do, and I'll give you the set of passwords required.
Actually the MySQL5-comptibiliy should be applied to your cart properly. But just theoretically issues might arise due to specific architecture of the 3d-party software on your site. But it cannot be stated for sure if there are any problems until the patch is applied. The file is attached to this message so you can try to apply it. In case there are issues, support staff will help you rectify them. Besides I would like to suggest patch applying by our engineers for 40 points. Please let us know how we can help you further. We look forward to your reply.
When this patch is applied, it will show up any issues, and put Qualiteam in a position to assist me further if required?

If the patch is applied, and there are no issues, then all will be well when we change servers to the new MYSQL5.X data base, which will be compatible with my V4.0.17 x-cart?

If this is the case, then I would prefer you to do the patch for me, and check for any issues.

Please correct me if I had read this wrongly. I simply need re-assurance that when EWDhosting changes servers, that my site will work as it has always done.
You are right, with the patch applied your X-Cart 4.0.17 can be run on a MySQL5 server. Thank you for using our service, I am forwarding the issue to Tech support. Engineers will apply the patch and make corrections if needed. Further discussion will be held in a new ticket.

And on the new Tech Support ticket.
I just want to be 100% certain of this, as I will be passing this information and recommendation, onto others on the xcart help forum.
This MySQL5 patch will 100% guarantee that my x-cart V4.0.17 store will work with MYSQL5.X data base, when the servers are upgraded, and there will be no compatibility issues. Is this correct?
Yes, this is correct, the patch guarantees compatibility with MySQL5. This solution has been implemented to many our customers' stores and it works fine and stable. Anyway, in case of any unforeseen troubles, we are always ready to adapt the patch.

enge919 06-09-2008 10:06 PM

Re: Upgrade your store
I have used both the patch in this thread


Index: include/func.php
RCS file: /usr/local/cvsroot/eshop/include/Attic/func.php,v
retrieving revision 1.395.2.367
diff -u -r1.395.2.367 func.php
--- include/func.php        23 Jul 2007 06:46:41 -0000        1.395.2.367
+++ include/func.php        16 Aug 2007 05:25:49 -0000
@@ -40,7 +40,9 @@
 # Database abstract layer functions
 function db_connect($sql_host, $sql_user, $sql_password) {
-        return mysql_connect($sql_host, $sql_user, $sql_password);
+        $result = mysql_connect($sql_host, $sql_user, $sql_password);
+                define("MYSQL5",substr(mysql_get_server_info(),0,1)=="5");
+                return $result;
 function db_select_db($sql_db) {
@@ -51,6 +53,10 @@
                global $debug_mode;
                global $mysql_autorepair;
+                if(MYSQL5 && preg_match("/\s*SELECT/i", $query)) {
+                        $query = preg_replace("/FROM([^\"\']+?)LEFT\s+?JOIN/is","FROM($1)LEFT JOIN",$query);
+                }
                if(defined("START_TIME")) {
                        global $__sql_time;
                        $t = func_microtime();

and the hack in this thread....


# mysql5 fix-up
if (preg_match('/SELECT .* FROM .* LEFT JOIN/',$query)) {
$query = preg_replace('/ FROM /',' FROM ( ',$query);
$query = preg_replace('/ LEFT JOIN /',' ) LEFT JOIN ',$query,1);
# mysql5 fix-up END

After testing both of them the HACK worked perfectly, the patch did NOT. I noticed balinor said to use the patch rather then the hack but since I could not get the patch to work and the hack did, what are the potential problems with the hack?

Also, is there and updated version of the patch.

This site I have patched is version 4.1.17 (with all security patches)

Server Information:
MySQL = 5.0.45
PHP = 5.2.6
Apache = 2.2.8

All times are GMT -8. The time now is 10:06 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.