The African Globalist touches on issues brought about by the convergence of technology, open markets and global business strategy. It also chronicles lessons learned on an ongoing projects including a web-based content management system in PHP, ASP.Net development and Microsoft Office SharePoint Server

Getting Back to Posting on a Regular Basis

It has been a while since I have been able to do any decent blog posts. Since I have been working on other projects, consulting and personal and I have just been too busy to update this blog… but I am back…

To start off, I have been thinking about a couple of programming languages, more specifically Python and Ruby on Rails and wondering if I should take some time out to learn them. I was checking out a rather interesting blog post by Amy Hoy that is kind of getting me interested and leaning towards Ruby on Rails…

Yet at the same time I have my PHP/MySQL project that I had sort of set aside to turn my attention to other things of a higher priority, but now I am just about ready to pick up where I left off and continue to work on my web app…

At the same time I have started doing a little more SharePoint, MOSS 2007 stuff and that I will be posting shortly some how-tos.

Quick Guide to MySQL Database Engines

For those developing MySQL database solutions, you may have wondered what the difference is between InnoDB vs. ISAM vs. Heap database tables. This TechRepublic article titled, “A fast and furious guide to MySQL database engines” is a great primer that explains in a nutshell, the different database engines supported by MySQL and why you would want to use one over the others.

Most Incredible Data Recovery Completed

Scientific America is reporting that “researchers have finally published the results of data recovered from a cracked and singed hard drive that fell to Earth in the debris from the Space Shuttle Columbia, which broke up during reentry on February 1, 2003, killing all seven crew members”

SharePoint’s SharePoint.Security Error and Custom Dlls

I have been fighting with a permissions issue with SharePoint today. What’s been happening is that I have a custom dll that I created which will load just fine if I don’t really have it do anything. However, once it starts running code that accesses the SharePoint Object model, then I get the SharePoint.Security error. This is essentially a permissions denied error.

I found this blog post that I think will be very helpful. I will try his suggestion and provide than update shortly.

Windows Mobile 6 Upgrade for BlackJack Released

For those of you like me who have the Samsung BlackJack and have been waiting to get upgraded, you can now rejoice. Samsung has finally released the upgrade ROM for Windows Mobile 6. If you head on over to the download section of Samsung’s website, you’ll find the downloads and instructions on how to upgrade.

Updated: By the way, as long as you follow the instructions, you should have no problem with the upgrade.

Loading Custom User Controls in SharePoint

I am writing this post because of the headache I faced trying to load and run a custom user control in SharePoint and the lack of good documentation on how to address the issues I faced. Hopefully this post will help others who are having the exact same problem easily come to some resolution.

WSS 3.0 and Microsoft Office SharePoint 2007 (MOSS) gives one the ability to develop and use custom user controls in SharePoint. Creating a basic custom web user controls is relatively easy and can be done in Visual Studio or notepad if you will. The control is given an extension, “.ascx” and can be loaded into an aspx page and run. In a later post, I will show you have to develop and run a simple custom control in a .Net web environment but in this post I want to talk about an issue I had trying to load and run my user control in a SharePoint page.

After I had created my simple ‘do nothing’ user control, I wanted to make sure that I was able to reference this control and load it into my .aspx page. Once I knew I had the correct references paths and the user control loaded successfully, I could then go in and develop the control. However, two issues arose from this attempt. The first problem was figuring out the path to the user control, the second was enabling permissions to allow the user control to actually run on the SharePoint page.

With regards to the first problem, simply loading the control took a bit time more than I had anticipated since I was not too familiar with the correct paths to use in SharePoint. When you reference your user control in an aspx page, you would use the following code for each user control you load

<%@ Register TagPrefix="MyUserControl" TagName="Mytag"
Src="PathToMyUserControl/MyUserControl.ascx" %>

Of course you will have the code that will load the user control into a placeholder control or panel control or used by another control… To find out how to do so, please read my posting on using custom controls in aspx pages.

The tricky part here is where do you place your user control, then what is the path to insert to point the Src attribute to the user control? What I figured out is that you really want to place your user controls in the CONTROLTEMPLATES folder where you’ll find a number of other SharePoint/WSS 3.0 web controls. This complete path is as follows

c:\program files\Common Files\Microsoft shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES

As long as this control is in the CONTROLTEMPLATES folder, all you will need in the Register directive’s Src attribute is to point the path to the “/_controls/MyUserControl.ascx”. Your register directive will now look like this

<%@ Register TagPrefix="MyUserControl" TagName="Mytag"
Src="/_controls/MyUserControl.ascx" %>

You will know the path is correct because either your ‘do nothing’ control will load successfully and your page will be blank, or you will get an error to the effect that the control you are trying to run does not have permission to run, or you may just get a HTTP 403 Forbidden error.

This brings me to the second issue that I found. I found that SharePoint will not just simply run any user control you drop in there. After working with the web.config file (someone had mistakenly pointed me to the file), I finally figured out that being that MOSS/WSS 3.0 runs on Windows Server 2003 (or up coming Windows Server 2008), I had to go and actually set permissions on the file itself to allow itself to be run by SharePoint/.Net.

What you will do in this case is right click on the file to bring up the properties popup menu and under security, you will need to give the local WSS_WPG group account permissions to modify the user control. While you are at it, you may also consider giving the local WSS_ADMIN_WPG group account the same permissions.

After you have completed the above steps, you should find that your user control will load and run successfully… well in this case, it does nothing, but since you don’t get an error, then you know you have been able to load your custom user control.

The only thing I would add is that you should be able create a folder in the CONTROLTEMPLATES folder where you can store all your user controls and part of that will require that you make some minor edit to the web.config file. I will update this post shortly to include details on how you can do that.

Installing MySQL 5.2.5

The MySQL database management system, available under the GNU license (also available under a number of other propriety licenses) is very popular, especially for web applications, due to its speed. I believe part of its speed is because it had certain features one comes to expect in DBMSs missing. Some of these features included referential checking. One feature for me that I really missed, that I had available to me in Microsoft’s SQL Server was support for stored procedures. MySQL AB added support for stored procedures in version 5.0. That is totally awesome! Time to upgrade to 5.0.

To get MySQL 5.2.5 (which is the latest release version at the time of this posting), you can go to the downloads section of the site and download the “MySQL Community Server” version which is released under the GNU license. There really isn’t too much technical difference between the “MySQL Community Server” version and the “MySQL Enterprise” version other than with the enterprise version you get the added on services such as updates, testing and monitoring, technical support etc. The kinds of services you would need if you were running your enterprise data and applications on MySQL. Since my needs are rather minimal (for now) I will stick to the community server.

Before I continue, you need to note that I am installing MySQL on a Windows XP Pro machine that I use for development in addition to the everyday computer usage. In addition, I am doing a fresh clean install and not upgrading from a previous version. This is important to note because somewhere in the process I had to delete certain data files and so I didn’t have to worry about losing any valuable data. If you are upgrading and your have data that you want to preserve, my advice is to back-up all your data and then make sure you can restore that data before taking down your old MySQL install!

Now back to the installation. For the most part, installing MySQL 5.x is pretty straightforward.

The first step is installing the core engine. All you need to do is double-click on the installer and follow the wizard prompts to install the engine.

Once that is complete, the next step you’ll take is to configure your database instance. At the end of the core engine install, you will be given the opportunity to configure the install. If you choose choose not to at this time, or you want to reconfigure your instance, you can launch the wizard by going to

Start Menu > Programs > MySQL > MySQL Server 5.0 > MySQL Server Instance Config Wizard

Once you have launched the wizard, once again most of the configuration options are straight forward and will depend on your preferences. Once you have all your preferences selected, you will click the ‘Execute’ button so that the instance will be configured. This is where it can get a little tricky. The wizard performs four main actions. The first two actions, 1. ‘Prepare the Configuration’ and 2. ‘Write Configuration File’ are pretty much straightforward.

The third step, ‘Start Service’ tends to have a problem for many, in that case, they will get the following error,

‘The service could not be started. Error: 0.’.

The screenshot below shows what the error message looks like.

MySQL Config Wizard Service Start Error

To fix this error, you will want to navigate to your ‘data’ folder in your MySQL install directory, i.e.

…\MySQL\MySQL Server 5.0\data

and delete the following three files

  1. ibdata1
  2. ib_logfile0
  3. ib_logfile1

At this point, you should now be able to rerun the wizard and move part the third step that is ‘Start the Service’.

I also had a problem with the forth step which was ‘Apply Security Settings’. The wizard below shows the error that I got, i.e. ‘

The security settings could not be applied
Error Number 2003.
Can’t connect to MySQL server on ‘localhost’ (10061)

Could not apply security settings

This one was even trickier to solve since none of the advice over the internet was able to solve this problem. Eventually I was able to solve this kind of by luck. All I did was to click the ‘Back’ button, then the ‘Execute’ button to rerun the four configurations steps… and it worked. Just like that! Pretty bizarre I must say.

I haven’t had any problems at all though and I now a full working install of MySQL 5.2.5 working on my desktop. I also have local copy of Wordpress running very smoothly so I know my MySQL install is running fine.

There are a couple of things to note. Even though I claim that I was doing a fresh clean install, I actually had a previous install of MySQL 5.1 which I had corrupted when I was playing around with the settings. Since I didn’t actually have any data stored in the database, I wasn’t too worried about having corrupted the database and rather than trying to repair it, I decided to upgrade to 5.2.5. So I uninstalled the older instance and installed 5.2.5. My understanding about MySQL is that when you uninstall it, the uninstall process does not remove the contents of the …\data folder for obvious reasons. If this is the case, then this will explain why one would get the The service could not be started. Error: 0.’ error in step 3 and consequently why one would need to go in and delete the three mentioned files. This is also why you must back-up your database before upgrading!

Hope this posting is helpful if you have having issues installing/upgrading MySQL