How to install Composer in Windows

I wanted to install PHP Composer in Windows. And to begin, I already have a copy of XAMPP 1.8.1, I think if you have a different way to get your PHP that should not matter. I tested this to work for Windows 7 but it should work for all versions of Windows.

0. Download and install XAMPP

You can download XAMPP here. I got the 7zip version rather than the installer itself. The ZIP version is similar, just with a larger file size. I extract the xampp folder into my C: drive, i.e. to C:xampp. Then install it by opening the file C:xamppsetup_xampp.bat. That will set the paths in XAMPP’s configurations.

1. Setting up environment variables

Continue reading “How to install Composer in Windows”

Skype 5 for Windows

I just upgraded to Skype 5.0 for Windows. It’s really good at first glance. No longer are there annoying floating ads to get me to make phone calls. Overall the interface looks more polished than before. The integration with Facebook is a nice touch although I can’t find a reason to use Facebook through Skype. Now I will hope they get the Mac OS X one released soon too. Great job there.

Why you can’t install Microsoft SQL Server 2005

If you see “SQL Server Database Services” grayed out, do not proceed with the installation. There’s some good reasons why it is grayed out. I am running Windows Vista Business Edition and am trying to install Microsoft SQL Server 2005 Enterprise Edition.

Can’t install Enterprise Edition in non-server version of Windows

The first problem is due to the fact that you cannot install Enterprise Edition into a non-server Windows operating system as stated here. That means to say that Enterprise Edition can only be installed in Windows 2000, Windows 2003 and Windows 2008. If you are using any other operating system, it is likely you are looking for Microsoft SQL Server 2005 Developer Edition or Standard Edition.

Required components of IIS 7 not fully installed

The second problem that I face is SQL Server 2005 complaining that I do not have IIS installed when I already done that. This is because you require the following components installed (their folders and in brackets):

  • Static Content (Common HTTP Features)
  • Default Document (Common HTTP Features)
  • HTTP Redirection (Common HTTP Features)
  • Directory Browsing (Common HTTP Features)
  • ASP.Net (Application Development)
  • ISAPI Extension (Application Development)
  • ISAPI Filters (Application Development)
  • Windows Authentication (Security)
  • IIS Metabase (Management Tools)
  • IIS 6 WMI (Management Tools)

I highlighted the requirements in red for your convenience:

Required IIS components for Microsoft SQL Server 2005
Required IIS components for Microsoft SQL Server 2005

Further information of required components can be found here.

Now after you install Microsoft SQL Server 2005 Whatever Edition, make sure you run Windows Update or download any Service Pack that they offer. This would ensure compatibility to your operating system. I hope that helps. This problem annoyed me whole day.

How to use sendmail in XAMPP for Windows using AOL Mail

The easiest way to start developing in PHP is to get XAMPP, the whole package can even be placed in a flash drive. Using the free AOL Mail account also allows you to sign in to the SMTP server without TLS which allows XAMPP sendmail to work.

0. Objective

To get your PHP scripts to send an email out. This guide assumes you have XAMPP or XAMPP Lite. My environment is Windows Vista. (I use XAMPP Lite by the way.)

My XAMPP is placed in C:xampplite, so your configuration may be a little different. The files to be modified are sendmail.ini and php.ini. Continue reading “How to use sendmail in XAMPP for Windows using AOL Mail”

How to import and export MySQL database into an SQL file

Or Gzip for the matter. Here’s the command to run in your UNIX-based server to import or export via an SQL file, this is useful for performing backup and restoring of a MySQL database. (I wrote a similar import and export guide for PostgreSQL.) The mysqldump utility performs just that:

Exporting using mysqldump:

[code lang=”bash”]mysqldump -u[Username] -p[Password] [Database] > output.sql[/code]

For example, my username is ‘kahwee’, my password being ‘secret’ and database being ‘justrealized_db’, I would run the following to export my database to a SQL file:

[code lang=”bash”]mysqldump -ukahwee -psecret justrealized_db > output.sql[/code]

And to Gzip:

[code lang=”bash”]mysqldump -u[Username] -p[Password] [Database] | gzip > output.sql.gz[/code]

Importing using mysql:

To import back, we can use the mysql utility in a similar fashion, note that the > (greater than) has change to a < (lesser than).

[code lang=”bash”]mysql -u[Username] -p[Password] [Database] < output.sql[/code]

For example, my username is ‘kahwee’, my password being ‘secret’ and database being ‘justrealized_db’, I would run the following to import my database:

[code lang=”bash”]mysql -ukahwee -psecret justrealized_db < output.sql[/code]

And to Ungzip:

[code lang=”bash”]gunzip < output.sql.gz | mysql -u[Username] -p[Password] [Database][/code]

[ad#simple]

Backing up and restoring MySQL databases in Windows

Unfortunately, you can’t use gzip here. So all those commands above with gzip can’t work. The rest, however, still works. However, mysqldump and mysql may not be set in your system environment variables. These are instructions on how to add them for Windows Vista:

Editing system environment variables in Windows Vista.

Click on ‘Edit the system environment variables’, a dialog box will pop up. Click on ‘Environment Variables…’, you should be greeted with the following dialog box:

Editing the path for environment variables

My path looks like this before I add anything:

[code lang=”bash”]%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem[/code]

Append your MySQL bin directory at the back of what is already there. I use XAMPP (XAMPP lite to be specific) which has its MySQL bin folder located here ‘;C:xampplitemysqlbin’, so I would be appending this:

[code lang=”bash”];C:xampplitemysqlbin[/code]

That’s all I guess, hope it is helpful for you.

4 Gb RAM is a significant improvement

I never regret getting an additional 2 Gb for my memory, the improvement is significant and it delights me when applications launches quicker. I noticed the improved performance in applications such as Firefox and Photoshop. There’s a slight improvement in iTunes too I think, yes, that piece of crap.

The difference is less obvious in Windows 7 which already is pretty quick.

“We decided to ship the Windows 7 code as Windows 6.1”

And so… Windows 7 is the name for the new version of Windows, the successor of Windows Vista. The thing is… It actually is Windows 6.1 if you check system properties and this has been confirmed by the Windows Team Blog. I don’t think it’s that great an idea honestly. I prefer the marketing version number to coincide with the development version number.

we decided to ship the Windows 7 code as Windows 6.1

Windows 2000 code was 5.0 and then we shipped Windows XP as 5.1, even though it was a major release we didn’t’ want to change code version numbers to maximize application compatibility.

That brings us to Windows Vista, which is 6.0. So we see Windows 7 as our next logical significant release and 7th in the family of Windows releases.

We learned a lot about using 5.1 for XP and how that helped developers with version checking for API compatibility. We also had the lesson reinforced when we applied the version number in the Windows Vista code as Windows 6.0– that changing basic version numbers can cause application compatibility issues.

So we decided to ship the Windows 7 code as Windows 6.1 – which is what you will see in the actual version of the product in cmd.exe or computer properties.

There’s been some fodder about whether using 6.1 in the code is an indicator of the relevance of Windows 7. It is not. (Source: Windows Team Blog)

In the case, I think it would be better to just call Windows 6.1 Windows 7. I think it’s clearer for developers who are going to start using the Windows platform.