Codepolice

Random posts from Ola in English. Mainly about programming and the web.

Problems with debuging in VS 2010

I opened up an old bloated project today in Visual Studio 2010 and i had huge issues with debugging. I usually use the attach to process way in this project but that suddenly that didn’t work anymore. Then i tried to debug with F5 but that caused my entire Visual Studio to hang. As i said, this is a old and bloated project.

Finally i realized that for some reason the “Attach to process” dialog had change the option “Attach to:” and it was set to “Managed (4.0) code”. When i changed it to “Managed (v2.0, v1.1, v1.0) code” it worked again.

Clicky is more fun that Google Analytics

Google Analytics has become more or less the standard tool for web statistics. Before Google Analytics came to market, you had to either pay or use statistics based on the web server log files. When Google bought Urchin and branded it to Google Analytics they changed all this by giving it away for free.

I’ve actually never tried anything other than log based tools (AWStats, Analog, etc.), WordPress Stats and Google Analytics. So when I got to see a screenshot of Clicky the first time I was sold. But why try something new? Google Analytics is good!

  • Google Analytics is pretty boring. Especially because they do not provide statistics in real time, therefore you cannot see directly how many visitors are on your site right now.
  • The GUI is a bit too advanced. Eg I have many times tried to find “what times of day are the people on my site”. And the information is there somewhere but it is really hard to find. find.
  • Google has a “monopoly” on this. Many complain that Microsoft has a monopoly but I must say that Googles monopoly is “more dangerous”. Take away Google Analytics makes the world’s information spread out a tiny bit more.
  • If you build websites for customers it’s perhaps not entirely comfortable giving them a Google account to check their statistics. Clicky has a feature to White Label the product so that it looks like you made it yourself.
  • Analytics has no good mobile interface. Of course, you must check the statistics when you are out and drinking beer with your friends. GA and the others doesn’t  even have real-time statistics so it wouldn’t been fun anyway.

Meet my new drug, Clicky!

Statistics are addictive, so if you feel that you have poor self-discipline you should stop reading now and do not check the following screenshots on Clicky.


Check it out for yourself: Clicky

Problems with mssql_connect() on IIS

Lately I’ve been reinstalling my Windows servers a couple of time due to some problems. I’m running both PHP (WordPress) and ASP.NET on my server. From my WordPress blog I sometimes connect to MS SQL to get some data and this time i could not get the MSSQL extension in PHP to work. I got this error all the time.

call to undefined function mssql_connect()

When you Google this you mostly get the tip that you should put the file ntwdblib.dll in the /ext folder. I have a vague memory that this helped me the last time i had this problem but this time that didn’t help. I also noticed that MSSQL was not loaded when i run phpinfo(). Finally I found this poston the IIS forum that recommended me to run the command.

php-cgi.exe -v

When I did this I got an error message telling me that “This program cannot start because msvcr71dll is missing from your computer”. I then downloaded this dll file, put it in my C:WindowsSysWOW64 (/system32 if you are on 32 bit). I also recycled my application on IIS and then everything worked. Hallelulja! I have no idea if it’s related but i used “Web platform installer” to install PHP.

pclzip_err_bad_format (-10) : unable to find end of central dir record signature

I got this error today when i was trying to upgrade some WordPress plugins. It turned out that my disk was full at my webhost. When i googled the error message i got lots of different answers so i just thought i would try to give some google juice to this solution.