wsme Posted February 23, 2008 Share Posted February 23, 2008 Hi, I am evaluating WHMCS before buying it for my company. I have installed the scripts, and configured the software. However, when I go through the shopping cart process to buy a product, the cart shows empty when I get to the end. To try this, go to http://shop.wsme.co.uk/cart.php and try to add a product to your cart. Also, when I add an item manually in the admin area to a customer, it doesn't work properly in there either! Thanks, Paul 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted February 23, 2008 WHMCS Developer Share Posted February 23, 2008 is your mysql in strict mode? 0 Quote Link to comment Share on other sites More sharing options...
wsme Posted February 24, 2008 Author Share Posted February 24, 2008 Hi, I have checked and no it isn't in strict mode. 0 Quote Link to comment Share on other sites More sharing options...
wsme Posted February 25, 2008 Author Share Posted February 25, 2008 The problem was caused by PHP5 and the sessions not working correctly. This has now been fixed 0 Quote Link to comment Share on other sites More sharing options...
TerryChapman Posted October 10, 2008 Share Posted October 10, 2008 Hello, I have a similar problem to the above. What was done to fix the 'sessions not working correctly' in PHP5? Regards, Terry 0 Quote Link to comment Share on other sites More sharing options...
itmanvn Posted November 5, 2008 Share Posted November 5, 2008 I have the same problem now. 0 Quote Link to comment Share on other sites More sharing options...
pdpd Posted November 24, 2008 Share Posted November 24, 2008 We have this problem - lots of users cannot add items to the cart. Can you advise how this was fixed? 0 Quote Link to comment Share on other sites More sharing options...
dexus Posted November 26, 2008 Share Posted November 26, 2008 We also have few clients that informed us that cart is always empty and they can't order... 0 Quote Link to comment Share on other sites More sharing options...
djaxel Posted November 26, 2008 Share Posted November 26, 2008 We also have few clients that informed us that cart is always empty and they can't order... same here .. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 27, 2008 Share Posted November 27, 2008 For the others with this problem start by checking the session_save_path which is normally /tmp by default and be sure that it has the correct permissions. eg.. if the path is /tmp make sure that the permisions on the tmp directory are set to 1777 to change the perms use chmod 1777 /tmp 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted December 4, 2008 WHMCS Developer Share Posted December 4, 2008 Empty cart is usually caused by the session save path not being writable by your apache user as sparky has already said, 0 Quote Link to comment Share on other sites More sharing options...
dexus Posted December 4, 2008 Share Posted December 4, 2008 Yes, but that would mean that cart is always empty, but if just 10% of users report that they can't order that have nothing to do with session save path. I think that WHMCS is actually using cookies only for order so when client have some "internet security suite" that is blocking some cookies, such clients just can't order, and we lose some % of clients because of that, and because they usually don't know what is blocking cookies and does not know how to disable that. If that is the reason as I presume it is, I think that WHMCS cart should use session only if it can't create cookie. 0 Quote Link to comment Share on other sites More sharing options...
djaxel Posted December 4, 2008 Share Posted December 4, 2008 Yes, but that would mean that cart is always empty, but if just 10% of users report that they can't order that have nothing to do with session save path. I think that WHMCS is actually using cookies only for order so when client have some "internet security suite" that is blocking some cookies, such clients just can't order, and we lose some % of clients because of that, and because they usually don't know what is blocking cookies and does not know how to disable that. If that is the reason as I presume it is, I think that WHMCS cart should use session only if it can't create cookie. Exactly , only a few clients can't make an order because the cart is empty. 0 Quote Link to comment Share on other sites More sharing options...
pdpd Posted December 4, 2008 Share Posted December 4, 2008 Yes - the issue here is it seems slightly random. Those users who have the issue, switch browser and all is fine. But we've had some fail with IE, some fail with FF3 etc. - there is no repeatable pattern to the behaviour. We only started getting reports of this with the recent 3.7.1 and 3.7.2 WHMCS - we never had people mention it or saw any trace of this before then. 0 Quote Link to comment Share on other sites More sharing options...
dexus Posted December 4, 2008 Share Posted December 4, 2008 I also have to report one strange case, we had one user that succesfully ordered domain, and he wanted to order a hosting package two days later, but he just couldn't because cart was always empty, so I really have no idea what can be a reason for this, I asked him what is changed in his computer in last two days, and he said that nothing is changed, it was working two days ago, and now he just gets empty cart... Really strange... 0 Quote Link to comment Share on other sites More sharing options...
pdpd Posted December 4, 2008 Share Posted December 4, 2008 From our experiences this really looks like an issue in WHMCS causing this somewhere, that was introduced in 3.7.1 We never had a single ticket stating 'cannot add items to cart' prior to 3.7.1 and several since, despite the server configuration being *exactly* the same. It could be co-incidence but looking at all the other reports in this thread, it looks like something could be at play in the WHMCS code? 0 Quote Link to comment Share on other sites More sharing options...
thegtz Posted December 7, 2008 Share Posted December 7, 2008 I am getting this bug too now. When will this be fixed? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted December 7, 2008 Share Posted December 7, 2008 Come on guys... your session problems really has nothing to do with WHMCS. In the real early versions of whmcs the command to start the session was session_start (); and in the latest version it is still session_start (); It's a php command not a function of whmcs. The only thing that could have changed is php updates on your server. You may not have upgraded yourself because cPanel does updates automatically every night. Have you re-compiled apache lately? Have you actually looked in your server logs for changes? 0 Quote Link to comment Share on other sites More sharing options...
dexus Posted December 7, 2008 Share Posted December 7, 2008 Ok, but can you explain to us, what php settings can cause that cart is not working only for some small % of clients... Come on guys... your session problems really has nothing to do with WHMCS.In the real early versions of whmcs the command to start the session was session_start (); and in the latest version it is still session_start (); It's a php command not a function of whmcs. You wan't to say that there is no whay that programmer make a mistake, php just have a simple commands and that's it... The only thing that could have changed is php updates on your server. You may not have upgraded yourself because cPanel does updates automatically every night. cPanel does not automaticaly change php configuration or upgrade php version... 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted December 7, 2008 Share Posted December 7, 2008 (edited) Ok, but can you explain to us, what php settings can cause that cart is not working only for some small % of clients... As I posted previously, session_save_path is generally the problem. By default the actual path is /tmp but can vary between different OS's. Permissions on the directory must be writeable. The permissions are set to 1777 by the user root - the "777" means that anyone can read or write to the directory; the initial "1" means that only the owner of a particular file can only affect that file. if permissions and the actual path is all well, then there is a couple of other reasons that will cause the session not to save. 1. /tmp directory is usually mounted on a set sized disc space or on its own partition. If the partition or directory is full then it can no longer write sessions to the directory. 2. If your max quota has been reached then your userid loses its permissions to write to the /tmp directory You wan't to say that there is no whay that programmer make a mistake, php just have a simple commands and that's it... I did not say that. If a programmer starts altering the session_save_path then yes it could be caused by the programmer. Generally a good programmer has no reason to alter the path as it is suposed to be set by default on the server in the php.ini file. I know that in whmcs the session save path is not altered because when you run phpinfo() from within admin in whmcs the path is still set to the default server path while within the session.Normal practice is to start the session with session_start(); then you assign variables to the $_SESSION array like $_SESSION['fred'] = 'Fred'; (which I believe is exactly how whmcs does it) then to remove that variable from the session use session_unset ('fred'); to destroy the session completly 2 commands need to be run session_unset (); and then session_destroy (); I'm not here to give a lesson so if you want to learn more go to http://au2.php.net/manual/en/ref.session.php cPanel does not automaticaly change php configuration or upgrade php version...Not directly no, but it does run commands to run updates and the like which can include any software installed on the server and even updating the kernel. (Kernel changes wont be noticed until the server is next rebooted.) Take a closer look at your logs. Edited December 7, 2008 by sparky 0 Quote Link to comment Share on other sites More sharing options...
dexus Posted December 7, 2008 Share Posted December 7, 2008 I know all this , but none of that is the reason in my case... Why are you so shure that it is not possible that there is some glitch in the code that will maybe do session_unset by mistake or maybe set some session variable to some invalid value that will cause cart to be shown as empty, etc. There are a lot more in that cart code than just session_start and session_destroy... 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted December 7, 2008 WHMCS Developer Share Posted December 7, 2008 can you login to WHMCS without checking the remember me box? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted December 7, 2008 Share Posted December 7, 2008 Why are you so shure that it is not possible that there is some glitch in the code that will maybe do session_unset by mistake or maybe set some session variable to some invalid value that will cause cart to be shown as empty, etc. There are a lot more in that cart code than just session_start and session_destroy... If this was the case then everybody using whmcs would be having the same problem Can you log in to your admin or as a user without checking the remember me box? EDIT: Sorry Andrew didn't see your post 0 Quote Link to comment Share on other sites More sharing options...
dexus Posted December 7, 2008 Share Posted December 7, 2008 can you login to WHMCS without checking the remember me box? Yes, of course I can login with session only - without checking "remember me" box. Also cart is always working for me, I never could replicate that problem that few of our clients reported, but those clients just couldn't order. I am also a PHP programmer and I understand all this, but problem is not session creation on the server in my case, there are only a few cases that clients reported about this problem, and those clients just can't order, I have no idea why, and what did thay do, but they always get empty cart. In the same time other clients can order, just that one client can't... It's really strange. If this was the case then everybody using whmcs would be having the same problem But, how do you know that maybe you also don't have the same problem, that is just some small percent of clients, maybe they try to order, and than they go away when they see that your cart is not working. We had just a few reports about this, but I afraid that there are maybe more cases, but maybe some clients just go away instead of reporting the issue... 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted December 7, 2008 Share Posted December 7, 2008 @dexus: PM me your url and I'll try your cart from my connection 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.