Thursday, September 15, 2011

Getting MySQL, PHP and Apache to run on Windows 7

Two days I spent on getting PHP, Apache and MySQL running on a Windows 7 PC. The biggest problem was getting PHP to recognise MySQL. php_inf() was just not showing MYSQL at all, only MYSQLND which was of no use. The point of the exercise was to also get my local setup as clsoe to the live one where my website is hosted.

After many attempts following tutorials and forums, I eventually I tried a different web server (nginx) with the exact same result. This confirmed that it was not the web server or PHP settings since I made sure the libraries can be found and folders were also set in the environment paths.

Somebody recommended copying the libmysql.dll file into the C:\Windows\System32 folder, but that failed since the file never stayed there and no error message. PHP also did not recognise this file as a valid extension and registering the DLL with Windows did also not help.
Somehow the DLL file ended up mysteriously in the C:\Windows\SysWOW64 folder since my installation of Windows 7 is 64 bit and the same with MySQL. I suppose this is a useful Windows feature to keep some order.

In the end it came down to what none of the forums or tutorials said which is setting things like socket, port, etc. in the "my.ini" file which I had based on the medium example file. Running mysqld or as a service made no difference.

Friday, September 09, 2011

Possibly dumping JQuery for smaller solutions

The last couple of days I managed to briefly spend some time to investigate different JavaScript frameworks similar to JQuery. So far nothing practical, just checking what is available and what could be of use. The idea is to reduce downloading time and improve performance especially on older computers and mobile devices which have memory limits.

Knockout.js and Backbone.js look promising according to the following discussion:
http://stackoverflow.com/questions/5112899/knockout-js-vs-backbone-js-vs

Either of them in their minified form have a roughly 4KB file size. as opposed to other like JQuery for example which are in the double or triple digits. For low-end mobile phones this becomes a problem. I have seen some nasty error messages on mobile phones due to out of memory when loading some websites as well as serious slowdown.

What has been showing up lately a lot as well is Node.js which is server-side and cannot just simply run on every website. Node.js also uses V8 JavaScript which might not be supported yet by all browsers on all hardware.

Obviously some of these frameworks are for specific purposes only, but might prove to be useful once I have had some serious experimentation time.

Friday, August 19, 2011

Defragmentation tips using MyDefrag

Lately I have been experimenting with custom defragmentation scripts which can be created based on script examples that come with MyDefrag. What is a good idea is to shove bootup files, folders, EXE and DLL files to the outside of a drive and everything else following. Each of these areas is referred to as a zone in MyDefrag and as many as needed can be defined.

There is this weird thing when pushing files older than a certain date to the end of the drive where a gap right at the end is being created during defragmenting. To resolve this, simply do not have any sort order at all for the files. This also works from other areas.

Like with many defragmenting tools is that things only settle down after a few full runs including shorter defragmentation time. When no sort order is involved then the process takes less time, hence rather set more zones in MyDefrag and gaps as usual.

Tuesday, August 02, 2011

World of WarCraft utility

My latest experiment includes a utility that I wrote using C# to give me a list of which installed World of WarCraft addons are an old version. So far it is still very much under construction hence I do not yet want to publish it. The application can be made better.

The application needs interface changes as well as testing in 32 bit Windows since I am developing on 64 bit where the game location is stored in a different location in memory.

Monday, July 11, 2011

New 10 Port USB 2.0 hub

This last Sunday I bought a new 10 Port USB 2.0 hub at some shop in the local China Town. The spacing for the USB ports is basically ideal so that the bigger plugs do not interfere with each other. There is also a led for when something is plugged in and active. The power cable is a little bit short for my configuration, but that was to be expected. Initially I was worried that it draws power from the PC USB 2.0 port which would possibly fry something.

Friday, July 08, 2011

Looking for costume ideas for upcoming event

An annual fancy dress event is coming up again at the end of July. Normally a friend of mine and myself go there and we usually try to dress as something matching.

This year I want to try something different in regards to a costume to look completely different including coloured contact lenses to match the eyes to the rest of the character. The actual costume choices depend on what is available as well.

Hopefully I can also get tickets without the same problems like last year at the door.

Tuesday, April 05, 2011

Various photos of South African metal bands

Last Friday and Saturday, I went to R.O.A.R. (upstairs at Gandalf's in Lower Main road, Observatory. There were various bands playing. On Sunday, I uploaded some of the photos that I took and told two people about that. Monday morning there were 50 requests for permission to tag photos. These were death metal bands which do not get many spectators to begin with. The sudden flood of requests was rather unexpected.

Tuesday, March 01, 2011

Cufon and lightbox timing issues

I ran into a problem where I ran Cufon on page load using JQuery which worked fine. The website also has lightboxes using jqModal. These lighboxes get loaded in using AJAX.

Problem:
The Cufon script does not replace the text to use custom fonts when showing the lightbox.

Solution:
Cufon needs to run after displaying the lightbox. Running it as a callback function for an onShow event also does not seem to work. Running Cufon manually from an onclick event on the lightbox itself does work, which means there is a timing issue involved. Hopefully this helps whoever else has got this same problem.

Wednesday, February 02, 2011

Solar geyser installation pitfalls

Recently I spent a bit more than 14000 Rand on getting a solar geyser installed. It was a mission to get the money together. Some of that money came from my credit card. The geyser also included an Eskom rebate which was listed as a bit more than negative 4000 Rand, which then totaled in the 14000 amount. As far as I was concerned, the geyser was paid for at that company and installed and I just got to finish paying off my credit card as quickly as possible. I thought this Eskom rebate would be handled for me automatically.

Yesterday, I got an email about still owning over 4000. After some questions it turned out that I am supposed to pay that rebate amount as well and then take it up with Eskom to get the money back. If the original quote had said so from the beginning, then I could have planned my budget for it, now I got to make a plan on where to get that amount from. That company told me that they are so used to that, they they did not consider telling me about how this actually works. What me concerns, this is false quoting/advertising and misleading.

Note that the company that quoted for and installed the geyser was not Eskom. I did start to notice some saving on the pre-paid meter already.

Friday, January 14, 2011

Back at work

I am back at work again. Starting first day in 2011 on a Friday. Scheduled for the day is a desk move which will take most of the afternoon once we start.