Jump to content

WHMCS on Fedora Core 6?


macconnect

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • WHMCS CEO
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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :P hehe ... ouch :roll:

 

Good luck!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated