miercuri, 5 decembrie 2012

php_memcache.dll for Windows 5.4

For those who cannot find the Memcache libraries for php 5.4, here is a link to the dll's php_memcache.dll for Windows:

https://www.dropbox.com/sh/0y53d29wsa1eim5/S3C0-vuIwv 


PHP, 5.4., Windows, Memcache

joi, 18 octombrie 2012

Illegal mix of collations - how to solve it?

With some queries in MySQL one might encounter an 'illegal mix of collations' error similar to this:

Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' 


It occurs when joining, comparing, concatenating strings of different (incompatible) collations (assembly of information in a proper logical/numerical order).

The 'utf8_general_ci' and the 'utf8_unicode_ci' collations above can differ from case to case, it just happened so in my specific case.

In my case, I was trying to join two tables on those columns with different collations, e.g. (query 1):

SELECT * FROM a LEFT JOIN b ON (a.email=b.email);


Where ,
Table a:
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL

And table b:
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL

The solution is forcing the same / compatible collations on the two columns, query 1 becomes:

SELECT * FROM a LEFT JOIN b ON (a.email COLLATE utf8_unicode_ci =b.email);


There are other solutions, where possible, like changing the collation of the columns / tables by design. e.g.:

ALTER TABLE a CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

or:

ALTER TABLE a MODIFY COLUMN email varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;


Good luck!

luni, 11 iunie 2012

How To Enable Google Toolbar for Firefox 13 and above

For Windows Vista users:
  1. You should have Google Toolbar for Firefox version 7.1.20110512W installed. You can still find it on the internet, download and install it.
    to check for the toolbar version installed,
    1. Type about:addons in Firefox's address to bring up the addons page
    2. Select the Extensions  tab from the left menu
    3. You should see there the Google toolbar version
  2. Use your text editor (Notepad) to edit this file C:\Users\[your username]\AppData\Roaming\Mozilla\Firefox\Profiles\Default Profile\{3112ca9c-de6d-4884-a869-9855de68056c}\install.rdf . Replace in this path the [your username] part with your actual Windows username. Mine is Alex.
  3. Change line 17 of this file from:
    <em:maxVersion>4.0.*</em:maxVersion>
    To this: 
    <em:maxVersion>24.*</em:maxVersion>
  4. Save and close this file.
  5. Restart Firefox, and you should find the Google Toolbar back among your Firefox toolbars.

miercuri, 6 iunie 2012

Typo3. Installing. Headache

About Typo3.

I must say i have tried several times to install Typo3 CMS and get it to work on my local server. And yes, i have to confirm it has been a real pain in the ass every time, and yes, sometimes i didn't even succeed tottally.

And i even ain't the dumbest kind of computer user and i'm pretty familiar with installing and configuring software. I even thought that 'duuh how hard can it be, its PHP dang i can find my way around that'.

Well not really.

I am in the middle of about the tenth battle with this CMS to get it to work and to work it on my computer and i hope i win this time.

But just as I am going through the Typo3 Introduction Manual, (wiki Introduction/Matthew), and after enough painful manual operations before seeing the first 'HELLO WORLD' page, i bump into this phrase in the manual.

Chapter: Edit TypoScript constants
Quote: <<You need to add this line of code and remember to set the pid number to the actual pid number of your sys_folder. You can see the pid number when you hover your mouse over the folder icon. >>



WHAAAT?  I can see the pid number when i hover? WTF ?

That's too much for me. I gave it a laugh but then also a reality check. Nevertheless to say that the folder in case should be seen in an image that's missing from the manual page, as other images also are, that there are language mistakes there (missing words?)

And the actual code is this:
 
#add to constants template
plugin.feadmin.fe_users.pid = 37



While at the top of the page, the author tells us that this manual is for:
"Who this document is for
Newbies! Congratulations!"

Newbies? Congratulations? What for? The headache? No, siree, thank you!

I'm giving up today because of this.