macconnect Posted July 10, 2007 Share Posted July 10, 2007 Who else has WHMCS running on FC6? I just need a sanity check since our WHMCS is useless at the moment due to what was called a "MySQL problem". 0 Quote Link to comment Share on other sites More sharing options...
SpookedOut Posted July 10, 2007 Share Posted July 10, 2007 WHMCS will work fine on RHEL based OS. You need MySQL/Apache/PHP installed and configured correctly. May I ask which versions you are using? If you could also expand on this error, you are experiencing? Tom 0 Quote Link to comment Share on other sites More sharing options...
macconnect Posted July 10, 2007 Author Share Posted July 10, 2007 This is a stock FC6 box with the following: MySQL 5.0.27 PHP 5.1.6 Apache 2.2.3 Entering/updating of credit card numbers is not working. According to Matt, our MySQL does not support AES_encrypt/decrypt, but that's been part of MySQL since version 4.x and I can find no other instance of this problem anywhere. The install and initial config was done by the WHMCS guys. Everything else appears to be working just fine. 0 Quote Link to comment Share on other sites More sharing options...
SpookedOut Posted July 10, 2007 Share Posted July 10, 2007 Therefore you would have to recompile MySQL to support AES_encrypt/decrypt.. Tom 0 Quote Link to comment Share on other sites More sharing options...
macconnect Posted July 11, 2007 Author Share Posted July 11, 2007 I appreciate the feedback, but find me a compile/configure option that enables or disables AES_Encrypt/Decrypt. I can't find mention of it anywhere. The only compile time option that seems remotely related is the need to compile with SSL support, but that is only for DES, not for AES. 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted July 11, 2007 Share Posted July 11, 2007 WHMCS will work fine on RHEL based OS. Fedora is not RHEL at all. Its a completely separate distro. About the mysql issue, that is quite odd. i would recommend going into the #mysql channel on irc.freenode.net and asking them. They are quite helpful with that type of stuff. 0 Quote Link to comment Share on other sites More sharing options...
trine Posted July 12, 2007 Share Posted July 12, 2007 Mac, you can only compile AES and DES support in MySQL if you configed it with ./configure --with-openssl. How did you install it? If you installed it with ssl support, then you should be able to verify that it works using something like: INSERT INTO `table` VALUES (X,AES_ENCRYPT('cryptstr','textstr')); 0 Quote Link to comment Share on other sites More sharing options...
macconnect Posted July 12, 2007 Author Share Posted July 12, 2007 Mac, you can only compile AES and DES support in MySQL if you configed it with ./configure --with-openssl. How did you install it? If you installed it with ssl support, then you should be able to verify that it works using something like: INSERT INTO `table` VALUES (X,AES_ENCRYPT('cryptstr','textstr')); I'm 90% sure that our installation did not include openssl support. Odd thing is that the install and subsequent "yum update mysql " was all "right out of the box" for FC6. I'm very surprised that nobody else has run into this issue. The docs for mysql are also a bit misleading in that they point to SSL as a requirement only for DES, not for AES. At any rate, we'll re-install from source this time with openssl support and see what happens. 0 Quote Link to comment Share on other sites More sharing options...
trine Posted July 12, 2007 Share Posted July 12, 2007 Post back what happens as normally that should work. 0 Quote Link to comment Share on other sites More sharing options...
macconnect Posted July 12, 2007 Author Share Posted July 12, 2007 Can someone with a working WHMCS on FC6 check the have_opsnssl variable in your MySQL? Ours is "have_openssl=disabled". I'm having a hard time believing that credit card manipulation only works if MySQL is compiled from source with SSL support. 0 Quote Link to comment Share on other sites More sharing options...
trine Posted July 13, 2007 Share Posted July 13, 2007 did you already reconfig it with openssl. We don't run our cart on FC6, but I do know that AES and DES support in MySQL will not work unless you have ssl support and is enabled! 0 Quote Link to comment Share on other sites More sharing options...
macconnect Posted July 13, 2007 Author Share Posted July 13, 2007 Nope, not yet. Wanted to get a feel for why this isn't working "out of the box" before we actually fix it. 0 Quote Link to comment Share on other sites More sharing options...
trine Posted July 13, 2007 Share Posted July 13, 2007 Again, it will only work with ssl support. It is not possible without it, or you would need to do the AES/DES encryption/decryption routines outside of the db, to store and read the info. get it? 0 Quote Link to comment Share on other sites More sharing options...
macconnect Posted July 13, 2007 Author Share Posted July 13, 2007 Yes, we get it. The question is why this is even an issue. If a stock MySQL install will not run WHMCS, there should be some mention of it in the docs and I'd figure that more people here would be re-compiling MySQL to get everything working. I guess the fact that we paid for the install and configuration service in order to save us time has me a bit miffed since there's no time savings at all at this point. 0 Quote Link to comment Share on other sites More sharing options...
trine Posted July 13, 2007 Share Posted July 13, 2007 Hmmm.. I think it is actually a pretty "standard install" to install mysql with ssl support. I cannot comment on whether Matt's installation service makes sure that your server is properly configured or not, and if it includes installing or compiling libs. ... I doubt that. Here is another thing to try: see if directory libmysqlclientxxx (where xxx is a version number) exists. It's usually in /usr/lib or /usr/lib64 ... then see/compare if all the libs are also at /usr/lib/mysql or /usr/lib64/mysql ... If both dirs exist and they are different, chances are the libs are installed to the wrong directory. Regardless, of this, you should still be using ssl support, and it would require a rebuild. Good luck! 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted July 13, 2007 WHMCS CEO Share Posted July 13, 2007 Yes, we get it. The question is why this is even an issue. If a stock MySQL install will not run WHMCS, there should be some mention of it in the docs and I'd figure that more people here would be re-compiling MySQL to get everything working. It certainly isn't the case that a stock MySQL install does not run WHMCS. You are the first user to ever report an issue with MySQL not having these functions within it in over 2 years of selling WHMCS. As for the install/config service, we install WHMCS but we do not recompile your PHP or MySQL installs. It is your job to make sure your server meets the minimum requirements. I did identify the issue for you to allow you to solve the issue without the need for the discussion here. Matt 0 Quote Link to comment Share on other sites More sharing options...
macconnect Posted July 13, 2007 Author Share Posted July 13, 2007 We get it. If MySQL does not have ssl enabled, AES and DES won't work. All I'm trying to find out is why this particular box doesn't work. By all accounts it should, without modification. I asked if anyone else had the problem, and a discussion ensued. If you're going to rely on open user forums as a form of product support, that should be a good thing, no? As a matter of fact, this particular discussion confirmed for us that there is a link between ssl and AES. At no time did I say or imply that it was your job to fix anything, or that anything you did was wrong. However, we now have a MySQL with working SSL support and the credit card update is still not working. mysql> SHOW VARIABLES LIKE 'have_openssl'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | have_openssl | YES | +---------------+-------+ 1 row in set (0.00 sec) 0 Quote Link to comment Share on other sites More sharing options...
trine Posted July 13, 2007 Share Posted July 13, 2007 Mac, can you try to insert with AES and DES? for AES try creating a new table with one field named "number": insert test: INSERT INTO table_name VALUES (AES_ENCRYPT('0123456789', 'mETrsd8' )); read test: SELECT AES_DECRYPT(number, 'mETrsd8') AS decrypted FROM table_name; if it works, then it was properly installed. Try also with DES. If you need more info on all of this, take a look here: http://dev.mysql.com/doc/refman/5.0/en/encryption-functions.html 0 Quote Link to comment Share on other sites More sharing options...
trine Posted July 13, 2007 Share Posted July 13, 2007 You may also be interested in: http://dev.mysql.com/doc/refman/5.0/en/secure-create-certs.html 0 Quote Link to comment Share on other sites More sharing options...
macconnect Posted July 13, 2007 Author Share Posted July 13, 2007 Trine, We were just trying that too. Looks fine from here. Using your example: mysql> SELECT AES_DECRYPT(testing,'mETrsd8') AS decrypted from number; +-------------+ | decrypted | +-------------+ | 09123456789 | +-------------+ 1 row in set (0.00 sec) That is the number we inserted with AES_Encrypt. So, it would appear that AES_Encrypt/Decrypt is working, but the credit card update function is still not working. Any hot ideas? 0 Quote Link to comment Share on other sites More sharing options...
trine Posted July 13, 2007 Share Posted July 13, 2007 if you can read the number (with a simple SELECT) from the table and it is the same number that you were trying to encrypt, that means it is not working. 0 Quote Link to comment Share on other sites More sharing options...
macconnect Posted July 13, 2007 Author Share Posted July 13, 2007 NOT working? There's one row in the field. The only way we can read the number we inserted is using the AES_DECRYPT function with the correct encyrption string. How is that not working? There are three of us kicking around with this on and off in the office, and none of us are sql wizards by any stretch, but that looks like its working to us. What are we missing? Thanks for all the feedback and help, by the way. It is most appreciated! 0 Quote Link to comment Share on other sites More sharing options...
trine Posted July 13, 2007 Share Posted July 13, 2007 I think you misunderstood, if you can do a simple select and read the original inserted number (09123456789) without aes_decrypt, then it is not working. Otherwise if you get an encrypted string with a simple SELECT, then it is working. That's all I meant. Now that you apparently have it confirmed working, I would ask Matt why, being that from what I understand, WHMCS uses AES (Rijndael block cipher), (and not any form of DES). 0 Quote Link to comment Share on other sites More sharing options...
trine Posted July 13, 2007 Share Posted July 13, 2007 By the way, I just asked one of our super techs and he has said that there are some known bugs with AES on certain platforms, notably 5.0.2x versions. He couldn't remember details, but you can search the MySQL bug db at http://bugs.mysql.com/ . Maybe the answer lies therein, somewhere. If you have no other requirement to run 5x he also suggested downgrading to 4.1x and seeing what happens. Worth a try, rather than banging your head against a wall hehe ... ouch Good luck! 0 Quote Link to comment Share on other sites More sharing options...
trine Posted July 13, 2007 Share Posted July 13, 2007 Here are a couple found with quick searches http://bugs.mysql.com/bug.php?id=26078 http://bugs.mysql.com/search.php?search_for=AES&status=All&severity=&limit=10&order_by=&cmd=display&direction=ASC&bug_type=&os=0&phpver=&bug_age=0 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.