Archive for October, 2012

 

Unable to login as admin into Joomla administrator after site move

After moving a Joomla 2.5 site to a new URL (i.e. new domain name) the backend (administrator) did no longer let me login as admin (or any other account for that matter). I tried to recover the admin account by setting the password field to a known value directly into the MySQL database described here, but it didn’t help.

The reason was that the cookie domain was set in the global configuration and this domain was different from the new domain where the site was installed. By editing the configuration.php file and emptying the $cookie_domain parameter I was able to login again, i.e:

public $cookie_domain = '';

 

Share

Posted by on October 25th, 2012 No Comments

Switching from iPhone to another brand – don’t forget to turn off iMessage first!

A girlfriend to one of my friends recently decided to leave the dark side and replace her iPhone with an Android (good decision!). However when she was using the iPhone she also had enabled the iMessage texting.

After switching to her new Android phone her friends, that still was using iPhones, tried to text her. Because her iMessage account was still enabled the texts ended up in the Apple void and didn’t reach her. To disable it the SIM-card had to be put into an old iPhone 3 in order to turn the iMessage off. The iPhone she replaced was using micro-SIM but the Android had normal SIM:s so she had a new larger SIM that wouldn’t fit in her old iPhone. The iPhone 3 works with normal SIM cards so that is why a iPhone 3 had to be used to disable it. 

So, if you decide to convert from iPhone to another brand, remember to turn iMessage off in the iPhone first!

 

Share

Posted by on October 20th, 2012 No Comments

Android mail token files fills up my SD card

I use a HTC Desire HD android mobile. My 8 GB SD card was getting full so I removed photos and videos that had already been copied to my PC. But I became a bit curious because of the 8 GB, the images and videos where not consuming the entire space.

To investigate further I connected the android phone using USB to my PC and used the PC:s explorer to dig into the SD-card.

I found out that the mail program stores images and other parts of emails in the Downloads folder on the SD card. After 1,5 years of use there where a significant amount of files there.  

After deleting them i noticed there was a folder called .Mail (i.e. Downloads/.Mail) which contained >21.000 files consuming some 700 MB of space. The filenames began with "token". After some Googleing it seemed by the discussions I found that these are temporary files created each time a message is pushed to the phone. I decided to take a shot and delete them.

After deleting all files in the .Mail folder I opened the mail app on the phone. For a short moment a text was displayed "Preparing SD card". Then my inbox showed up and everything worked normal with the only difference that the mail app seemed a bit quicker now.

My conclusion is that it is probably safe to delete the content of the .Mail folder once in a while to free up some space.

 

 

Share

Posted by on October 15th, 2012 No Comments

Error message in Apache log file: “Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden”

The error message "Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden" occured in my Apache logfile and the visitor was displayed an error 403 forbidden error page when trying to access a cgi-script written in Perl. The solution was to add the following for the directory in question to my Apache configuration file: 

<Directory /var/www/cgi-bin>
  <Files ~ (\.pl)>
  Options ExecCGI FollowSymLinks
  </Files>
  Options +FollowSymLinks +SymLinksIfOwnerMatch
</Directory>

 

Share

Posted by on October 10th, 2012 No Comments

Remmina on Ubuntu 12.04 problem to connect to Windows 7 with RDP ‘Unable to connect to RDP server’

Suddenly I couldn’t connect to my Windows 7 machine by RDP using Remmina on Ubuntu 12.04. It had worked before and suddenly stopped working. The error message displayed was ‘Unable to connect to RDP server’. Other RDP connections worked fine.

For some reason the problem was solved by editing the file ~/.freerdp/known_hosts and deleting the line with the server having the problem. When connecting again I was asked to accept the certificate and now the RDP connection worked again.

 

Share

Posted by on October 5th, 2012 No Comments

Err 310 ERR_TOO_MANY_REDIRECTS in Chrome and Firefox using Apache’s mod_rewrite

I used Apache’s mod_rewrite in order to direct a couple of domains pointing to the same website using the 301 moved permanently (to avoid duplicate content), i.e. something like this in .htaccess: 

RewriteEngine On
RewriteCond %{HTTP_HOST} !^example\.com$
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

I randomly got the error message 310 ERR_TOO_MANY_REDIRECTS when trying the different domains in both Chrome and Firefox (other browsers seemd to work). I had decided my site should be reached without "www", so http://www.example.com was redirected to http://example.com also. 

After a while of head scratching I found a couple of forgotten DNS entries. Two of them where outdated. My domain setup for example.com in DNS looked like this (sample IP-addresses): 

example.com zone:

@  IN  A  192.168.100.1
@  IN  A  192.168.100.2
@  IN  A  192.168.100.3

www  IN  A  192.168.100.1

But only 192.168.100.1 was valid and had a running web server on it.

I guess what happens is when Chrome/Firefox tries to talk to 192.168.100.2 or .3 and get no response, they add "www" in front of the domain name, i.e. http://www.example.com. Now it got a response from the webserver saying 301 redirect to http://example.com. Now trying to talk to example.com on 192.168.100.2 or .3 no response, adding "www" and there we have our loop.

Fixing the DNS entries (removed the invalid 192.168.100.2 and .3) fixed the problem. A bit odd and hard to find, and most of all stupid to have the outdated records still in the zone. 

 

Share

Posted by on October 1st, 2012 No Comments