Did you know that this:
SELECT * FROM test WHERE binary login = ‘SomeCaseSensitiveLogin’
is million times slower then
SELECT * FROM test WHERE login = ‘SomeCaseSensitiveLogin’ AND binary login = ‘SomeCaseSensitiveLogin’
Of course the logical choice would be to have a binary index on login(like in this example of case sensitive searches in mysql), but sometimes the MySQL version is too old or buggy or you simply don’t have the permission to do so, and I even had a situation where this was faster then any other method, but as always it depends on the data you have.
In my example it was a 40.000 rows user database and the search was taking 0.21 secs with pure binary vs 0.00 with this trick above.
There is one thing to watch out when setting up a SSL certificate with Plesk, it may say “Unable to set the private key: Probably, the private key format is invalid.”
That is most probably if you used something like:
openssl genrsa -des3 -out server.key 1024
to generate your SSL key.
To fix the “problem”, all you have to do is:
openssl rsa -in server.key -out apache.key
And retry the job. The only drawback is, from now on your server key is not password protected.
p.s. Here are some nice manuals on setting up a Thawte SSL certificates(should work for others too), other then missing the clue about the password protected certificate the manual is great.
p.p.s. I hate “nice” web hosting management apps
I like to do it in text files, it is slower, but its inevitable that one day you will have to setup something custom and there won’t be any option in the nice app to help you out. This is for big hosts and stuff, if it’s for small sites I’m all for Plesk & co. since it allows “normal” people to run a host.
Someone asked me to help him set-up a simple mod_rewrite rule in a .htaccess file. All looked so simple but unfortunately it did not work. Tried the code on a few other hosting services and it worked just as it should. A bit of digging and I found the following which cured the problem.
RewriteBase /
Just put that before your mod_rewrite rules in .htaccess and it works just fine.
p.s. This was on the cheapest GoDaddy Linux service (I say this because some people on the ‘net claimed that it does not work on the GoDaddy budget hosting account), other then that I must say the speed is not bad for a cheapo service