Posts Tagged ‘troubleshooting’

Does location.href work for IFrames? Even Redirection?

Friday, June 11th, 2010

Short answer– yes.

I just did a test that worked with three domains–
on domain A, I had an iframe pointing to a file on domain B. Domain B’s iframe was to: alert “location.href”, write it to the document, and then redirect the browser to domain C.

All tests worked.

Illegal Mix of Collations using CONCAT

Friday, September 4th, 2009

While using MySQL5, I came across this error:

Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation ‘concat’

When I took a look at the query statement, I realized that I was doing a CONCAT with an IF statement being the first part.

EG:
CONCAT(If(1=1,'true','false),' : ',columnb) as variable

This post by Vahid Ghafarpour on Illegal Mix of Collations helped me out when I tried to change the character sets of the database, but I realized that it might be a server default causing this.
Since I didn’t want to change the statement, I changed the query. (I suppose it’s bad practice. :( )

Based on this post at Experts Exchange on the Illegal Mix of Collations, I added COLLATE latin1_swedish_ci after the string. Now, THIS didn’t work:

CONCAT(If(1=1,'true','false),' : ',columnb) as variable COLLATE latin1_swedish_ci
You’ll see why it didn’t work in a second.
CONCAT(If(1=1,'true','false),' : ',columnb) COLLATE latin1_swedish_ci as variable
Didn’t work as well.

What worked is below:
CONCAT(If(1=1,'true','false) COLLATE latin1_swedish_ci ,' : ',columnb) as variable
This is because it’s the IF statement that left its type ambiguous.

Stay cool, coders!

Error While Loading shared libraries , cannot open shared object file: no such file or directory (Easy solution?)

Tuesday, August 25th, 2009

Have you tried ldconfig yet?

I was working on a website that needed to use libraries from some lib directory on Linux. (it’s not like I understand WHERE To put files or install them yet, eh?)

But, after compiling and installing a program, I got the title of this post as an error message (with my specific library mentioned.)

How did I solve it? ldconfig

If it doesn’t work after that, good luck! MY problem was solved. :P

(13) Permission denied: FastCGI can’t create server (problem solved)

Friday, August 7th, 2009

I was getting the following error on my Red Hat Enterprise Linux 5 server.  (RHEL 5)

[Thu Aug 06 17:48:03 2009] [crit] (13)Permission denied: FastCGI:
can’t create server “(Fast CGI File)”: bind() failed [(location of FastCGI location)]

I fixed this by:

chmod o+x /parent/directory/of/fastcgi

EG:
If Fast CGI was /var/log/httpd/fastcgi,
I’d do chmod o+x /var/log/httpd.

Worked fine.  (Kudos to my coworker who originally proposed the idea and it worked– Mentioning it again ’cause I did it again.)

Did it help you? Leave a comment! :)