<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>Tim&apos;s Web Notes</title>
        <link>http://www.mapability.com/blogs/web/</link>
        <description>The Conquest of Conundrums - A short list of Web How-To&apos;s.</description>
        <language>en</language>
        <copyright>Copyright 2011</copyright>
        <lastBuildDate>Sun, 10 Oct 2010 12:56:09 +0000</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>Adding a Solid State Drive</title>
            <description><![CDATA[<h1>Adding a Solid State Drive to a Lenovo T400 ThinkPad Laptop</h1>

<p><b>Introduction</b></p>

<p>There are two scenarios in life when my stomach turns to jelly and I feel slightly sick: One is getting ready to date a new girlfriend for the first time, and the other is when I have to do anything major to the main hard drive of my computer. Even thinking of the words: 'Format drive C' give me palpitations. Typing it in and pressing Return is even harder to do!</p>

<p>It was with a heavy heart, therefore, that I set about the process of replacing the main hard-drive in my Lenovo T400 ThinkPad laptop.  There was a good reason for this, though. Nothing at all wrong with the supplied Western Digital 250GB SATA hard drive - I was very please with everything it has had to do. However, hard drives, with their delicate platters spinning at 5,400 rpm (that's 90 times per second!) and their 16 read-heads hovering above the disc surface at a spacing less than a human hair, are not the most durable of items. They say there are only two types of hard drives: those that have failed, and those that are about to fail. Ignore backups at your peril!! I am about to embark on a long Overland journey, down the west coast of Africa to Cape Town, and then up the east coast to Cairo. Although my T400 has the built in 'Active Protection System', which stops all hard drive activity when it detects a jolt or physical shock to the laptop, I never feel that this is 100% reliable, and the thought of using it on some of Africa's bumpy roads would, I feel, be a very foolish thing to do.</p>

<p><b>Possibilities</b></p>

<a href="http://www.mapability.com/blogs/gps/images/2010-10-10/SNV425-S2BN_expanded.jpg" target="_blank"><img src="http://www.mapability.com/blogs/gps/images/2010-10-10/SNV425-S2BN.jpg" width="300px" height="263px" border="0" align="left" alt="image of Kingston SSDNow V SNV425-S2BN/128GB Solid State Drive package - click for bigger picture" /></a>

<p>Although I did investigate the possibilities of running a reduced operating system from a USB pen drive, with the internal hard-drive powered off, it would never be totally satisfactory: I could only use Portable programs already on the pen drive, and would have to remember to transfer all of the data I needed from the hard-drive to the pen drive before the session began. The better, though more expensive option, was to exchange the hard-drive for an SSD, a solid-state hard drive. These devices are physically the same as the internal 2.5" hard drive, but have no moving parts at all, and therefore can not be damaged by a sudden shock or jolt whilst running. Lenovo make their own SSD, but it is rather expensive, and comes with no support software. I was therefore interested to read about the <a href="http://www.kingston.com/ssd/v-series.asp" target="_blank">Kingston range of SSDs</a>. The great thing about the Kingston is that within their range, they have a package that includes everything you need to swap over a laptop from a standard hard drive to an SSD. It contains the SSD itself, an external enclosure + lead, and a CD containing a manual and the Acronis Hard Drive cloning software. If I had bought the Lenovo SSD, I would need to then buy software that would do the cloning for me, or find an Open Source package. One thing to be aware of: many cloning software packages WILL NOT clone a hard drive if its partition is bigger than the size of the SSD. As big hard drives are common these days, and SSDs are still quite expensive, this is quite a common scenario. In my case, I was changing from a 250GB hard drive to a 128GB SSD. The Acronis software can cope with this, as long as the actual data on the source partition is less than 85% of the SSD size.</p>

<p><b>Purchase</b></p>

<p>I located a UK supplier of the disc-upgrade package at <a href="http://www.stuff-uk.net/c-3944-128-gb-solid-state-drives.aspx" target="_blank">www.stuff-uk.net</a>. They have a good range of products in stock, and serviced my order, and made delivery, very promptly indeed. I was most impressed with their service, and will use them again in the future. Note that there are two types of Kingston SSDNow V SNV425-S2BN/128GB Solid State Drive package, that look very similar: one os for laptops, and the other is for desktop upgrades. The laptop one is the one with an external hard drive enclosure included - see the photo.</p>

<p><b>Preparation</b></p>

<p>As mentioned above, it is vital that the size of the actual data on the current hard-drive is not greater than 85% of the capacity of the SSD. In case you were wondering, the 85% figure is to do with extra space needed whilst the cloning takes place. This is an excellent opportunity to do some backups as well, so I copied most of my data onto a spare USB drive. I then checked and emptied the Recycle Bin, and cleaned up all of the Temporary Internet Files.That brought my total size down to 39GB, well within the capacity of the 128GB SSD. I then de-fragmented the hard drive - not really necessary, but I felt it might help the process along if all the files needed for the transfer were quickly accessible.</p>

<p><b>Cloning the Hard Drive</b></p>

<p>I read through the accompanying .pdf manual a couple of times, and made notes for use during the cloning process. A printout would have been better, but I didn't have a printer handy. I checked that the laptop's battery was fully charged, in case of a power faiure during the cloning process. I left the Acronis CD in the CD drive, as it would be needed straight away, then powered down the laptop, unplugged the existing hard-drive and removed it from its carrier (4 screws) and rubber shock mounts. The hard drive was then plugged into the supplied black plastic external hard-drive enclosure, and its case re-assembled and locked. The SSD was then mounted on the laptop's hard-drive carrier with the 4 screws, the rubber shock mounts were clipped in place, and the SSD slid into position in the laptop. The old hard-drive, in its enclosure, was connected via the supplied cable to one of the spare USB ports on the laptop, and the power pack was plugged in.</p>

<a href="http://www.mapability.com/blogs/gps/images/2010-10-10/SNV425-S2_expanded.jpg" target="_blank"><img src="http://www.mapability.com/blogs/gps/images/2010-10-10/SNV425-S2.jpg" width="210px" height="300px" border="0" align="right" alt="image of Kingston SSDNow V SNV425 Solid State Drive - click for bigger picture" /></a>

<p>All systems go! I powered on the laptop, and followed the screen prompts as the manual had predicted. Of course they weren't *quite* the same - the software had been updated and the manual hadn't (slap on the wrist for Kingston!) but they were near enough, and there were no worrying options thrown up during the questioning. One part that I did NOT like: it wasn't really clear which was the source and which was the destination drive. I wondered if it was possible to clone an empty drive on top of a full one, and thus lose all my data? In the end, it told me that it was copying 2 to 1, which I just trusted was correct, and of course it was!</p>

<p>The cloning process was surprisingly quick. It took about 30 minutes to completely copy everything over to the new SSD. At the end of the process, it reminded me to remove the CD and the external USB drive, and, if necessary, reset the BIOS boot order. I did all this, then VERY NERVOUSLY powered on the laptop. All was well. Apart from a brief system message: 'Found new hard-drive' there was no noticeable difference in the boot process, and in a short time I was looking at, and using my desktop just as before.</p>

<p><b>Finally</b></p>

<p>I am very pleased at such a quick and painless process. After years of working on computers from DOS and PC-DOS through Windows 3.1, 95, 98, 2000, ME, and XP, I am impressed at how quick and easy things have become. I now feel confident to use my laptop whilst bumping along on the roads of Africa. Make sure that you visit this site again to see how I get on. Finally, here are some useful links for the Kingston SSD:</p>

<ul>
<li><a href="http://www.kingston.com/ssd/v-series.asp" target="_blank">Kingston V-Series SSD Datasheet</a><br /></li>

<li><a href="http://www.kingston.com/support/ssdnow/faq/default.asp?s=SNV425-S2BN" target="_blank">Kingston SSD FAQs</a><br /></li>

<li><a href="http://www.kingston.com/ssd/about.asp?id=3" target="_blank">Kingston SSD Reviews</a><br /></li>
</ul>

<p>One week later: the SSD runs fine, and I notice that the boot time has decreased quite a bit. This is really nice, and not something that I was expecting. I had a look online to see if there were any adjustments that I should make to my computer now that it has a SSD drive in it. I also emailed Kingston, to ask for their opinion on this. Kingston said that it was important to disable the automatic defragmentation feature in Windows XP. You may not even know that this exists, but it really does, and is probably enabled for your computer! The easiest way to turn it off is to go to the <a href="http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx" target="_blank">Microsoft PowerToys for Windows XP</a> page and download the Tweak UI program. Its very small - only 147 KB! Install it, run it, and click the word 'General' in the left hand column. Then, in the window on the right, uncheck the entry 'Optimize hard disc when idle'.</p>

<p>Kingston also recommends that I should try to write to the SSD as little as possible. Apparently it does not matter how many times you read from the SSD, only the write operations will slower decrease the lifespan of the flash hard drive. I asked them how I would know when the SSD was at or near the end of its lifespan, and they said 'the access times will decrease and subsequently the performance, but you may just get the same BSOD that was common with conventional hard drives when they failed. The most important thing that needs to be remembered is that, just with a conventional hard drive, you should always keep a back-up or mirror image of the SSD - that way, if the SSD fails and needs to be replaced, after the disc image has been copied to the new drive, you can continue working as before.' I guess that I had better hang on to the excellent Acronis disc-imaging CD, supploed with the SSD, and back up my complete SSD from time to time. At least the price of USB hard drives are coming down all the time, so this is not an expensive thing to do.</p>

<p> Searching the internet, there are other opinions about how to optimise Windows XP for an SSD. Some people say to turn off the page-fil, however this annoys some programs, such as PhotoShop. All say to turn off your 'Hibernate' function, as the Hibernate file gets continually updated with lots of HD write cycles. I use Standby instead, which is just as useful.</p>]]></description>
            <link>http://www.mapability.com/blogs/web/2010/10/adding-a-solid-state-drive.html</link>
            <guid>http://www.mapability.com/blogs/web/2010/10/adding-a-solid-state-drive.html</guid>
            
            
            <pubDate>Sun, 10 Oct 2010 12:56:09 +0000</pubDate>
        </item>
        
        <item>
            <title>Rootkit Virus Attack</title>
            <description><![CDATA[<p>My computer recently suffered from a Rootkit virus attack. The first that I knew of it was when my Avast Free Antivirus program, which runs constantly in the background, began reporting virus activity. Not just one, but fifty one virus reports were collected in a couple of seconds. Examining the logs, it appears that the culprit was the Win32:Bubnix-J and the Win32:Bubak viruses. Before I knew it, I had lost my Plug-and-Play facilities, and my entire sound system. Some action was needed, and in a hurry!</p>

<p>A little background: I have been involved in computers for more than 30 years. I used to design 8-bit computers and their operating systems, then moved on to PCs when they became available at a reasonable price. I am therefore familiar with the ways of computers, and have become quite good at spotting actions that, whilst small, are not quite correct and may indicate a greater problem that is either occurring now, or is likely to occur unless something is done. After a while, you develop a sixth sense to spot a computer when its going wrong, though I'm more than happy for an Anti Virus program to catch events first. I'm currently using Avast Free Anti Virus, which I like as it has a facility to do a Master Boot Record (MBR) scan when the computer next starts. Is Avast the best of the bunch? This is a very good question. There are a variety of Anti Virus programs available, and in the last fifteen years or so, I have tried quite a few of them. Symantec/Norton, and McAfee - both very good, but not free, and apt to 'take over' your computer in their eagerness to do their job. I had plenty of problems with both, then plenty more when I tried to Uninstall them.</p>

<p>AVG was one of the earlier free Anti-Virus programs, but a did a very bad job at everything it attempted to do. Hard to configure, hard to operate - I quickly had enough of this, though these days it continues to have a loyal following. Perhaps they know something I don't? Or maybe they just haven't tried any other programs. I finally called it a day when an AVG insisted that an infected computer had no viruses in it, despite very strange symptoms. I uninstalled it, and loaded Avast from a free computer disc supplied with a magazine bought in New Delhi, India, where I happened to be at the time. The program quickly detected and eliminated the virus that AVG refused to say was there.</p>

<p>I have stuck with Avast Free Anti Virus program since then: I guess this must be about 5 years, which is pretty good going for an Anti Virus program, free or otherwise. However, the other morning, as mentioned above, Avast started to report a string of Rootkit viruses, and although it seems to be blocking them all, it doesn't seem to be able to eliminate the source of the attacks in the computer. These Rootkit viruses are devious bits of code!</p>

<p>A Search for advice produced a list Anti-Rootkit programs, including an offering from Trend Micro. I have used products and services from this company for quite a few years: initially their Firewall Testing program, then later on, their Online Anti Virus-elimination service, 'HouseCall'. This will scan your computer even if you have no Anti-Virus program installed at all - I have found that it is a very useful service to know of when trying to help friends and relations who's computer has suffered a Virus attack and needs urgent action, though you must have a working Internet connection to use it for the first time.</p>

<p>Trend also supply a RootKit Virus Buster program, so on the strength of their past results, I downloaded and ran it (installation is not required). The program reported a large number of infected files, including some that I use quite regularly. They were mainly images (png and gif), pdf documents, and some web pages (htm and php). The program then offered to 'Delete Selected Items' which I did with a heavy heart, not sure if all were backed up elsewhere. However, it did not delete the files completely as expected, but, in some way, disinfected them. Is the program telling the truth? It doesn't find the same files on a subsequent Search, so something may have improved, but the RootKit Virus is still on the computer, as Avast reported the next morning as it stopped a further 10 files executing.</p>

<p>It is easy to assume that all Anti Virus programs do much the same things, and that they can all locate and destroy the various viruses winging their way around our computers, hidden or otherwise. Some personal experience and some recent research shows that this is not the case! I found a very useful website  which lists the results of a variety of tests that it has conducted using Anti Virus programs from most of the major players. Looking at their results, I noticed that Panda came out on top, so I went to their website to investigate what Anti Virus products they provide. There are no free Anti Virus programs on offer, but they do have an Online virus program, similar to Trend Micro. I tried the Panda Active Scan, and it located 40 Tracking Cookies, but didn't find any new viruses. Its only recommended course of action for an infection was to purchase the full program, which wasn't very helpful if you were someone with an infected computer who was starting to panic. Its a great marketing tool, though.</p>

<p>Back to the <a href="http:///certifications?order=protection_asc&lang=en" target="_blank">www.av-test.org</a> results, and I saw that Trend Micro doesn't do so well as the average, with a result of just 2.5 out of 6. Still, their HouseCall program still seems as useful as ever, and performed better than the Panda program, removing some viruses that it found, which the Panda program hadn't. I also downloaded the latest version of LavaSoft's 'AdAware': a program with a long-standing reputation for getting rid of various types of Malware that other Anti-Virus programs miss. The latest version has a hefty 130MB download and takes ages to install and update itself, but did find and deal with some virus problems that the others had missed.</p>

<p>Will this be the end of my current Rootkit Virus attack? Time alone will tell. I'll stick with Avast as my main Anti-Virus protection for the moment: they seem to be the best of the bunch for catching active viruses in my experience, and the program has proved itself to be user helpful and frequently updated, without being too invasive on the system. It is obvious, though, that no one product can be relied upon to fully protect a computer, and the sensible user will take advantage of a range of programs to ensure that their computer continues to operate despite all that the internet tries to throw at it.</p>]]></description>
            <link>http://www.mapability.com/blogs/web/2010/09/rootkit-virus-attack.html</link>
            <guid>http://www.mapability.com/blogs/web/2010/09/rootkit-virus-attack.html</guid>
            
            
            <pubDate>Sat, 04 Sep 2010 08:40:54 +0000</pubDate>
        </item>
        
        <item>
            <title>Too many open files</title>
            <description><![CDATA[<p>My website was recently having a problem accessing pages with active content, driven from the cgi bin. When I type their address in my browser, I get a '500 Internal Server Error' page. Its text read as follows:</p>

<p><b><br />
Internal Server Error<br />
The server encountered an internal error or misconfiguration and was unable to complete your request.<br />
Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p>

<p>More information about this error may be available in the server error log.</p>

<p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. </p>

<p>--------------------------------------------------------------------------------</p>

<p>Apache/1.3.39 Server at www.mapability.com Port 80<br />
</b></p>

<p>When I check in the Error Log, it says: '(24)Too many open files: couldn't spawn child process:'. How to determine what is causing this problem, and what is opening all these files? I have a number of active pages that access various databases - it could be any one of them. My server is running Apache. I also use MySQL and php pages. Maybe there is some script that is not working correctly, and is leaving open files - is there a way to find this out, and what would be the method of fixing it?</p>

<p>I never did determine a way to check which files were open, or if there was some way to close them again. Many search results suggested that I increase the limit of open files so that the error would go away, but that seemed rather a silly way to address the problem - I would rather find out what was causing it in the first place, and fix that. More searching, and I eventually found an <a href="http://gallery.menalto.com/node/54897" target="_blank">interesting page</a> on the Forum belonging to <a href="http://gallery.menalto.com/" target="_blank">Gallery 2</a>, the photo-gallery software that I use. It mentioned a problem that another user was having with the 'Too many open files: couldn't spawn child process' error, and suggested a simple fix. The pertinent answer read:</p>

<p><b><br />
Our guess is that you used file / flock based locking ("site admin", bottom of the page has locking options).<br />
If you used database based locking, an open file limit of ~100 should have been sufficient.<br />
</b></p>

<p>Of course, once I knew what the answer was, it was easy to find more occurrences, using a Search such as <a href="http://www.google.co.uk/search?hl=en&rls=RNWE%2CRNWE%3A2005-50%2CRNWE%3Aen&q=%22too+many+open+files%22+%22gallery+2%22&meta=" target="_blank">"too many open files" "gallery 2"</a>. I soon discovered that this was a <a href="http://codex.gallery2.org/Gallery2:Known_Issues" target="_blank">'Known Issue'</a> for Gallery 2.</p>

<p><br />&nbsp;<br /><br />
<b>Tim Will Fix It</b><br />
I made the change myself. Initially, the error still occurred, though not quite as much as before.</p>

<p>To change this yourself, login to your Gallery, and click on Site Admin >> General Settings. Down the bottom of the page is a section:</p>

<p>Locking System <br />
Gallery uses a system of locks to prevent simultaneous changes from interfering with each other. There are two types of locking, each with its advantages and disadvantages. File based locking is fast and efficient, but won't work on NFS filesystems and will be unreliable on Windows. Database locking is slower but is more reliable. If you are unsure which to choose, we recommend using file locking. If you're getting many lock timeouts, you can try switching to database locking instead. It's ok to switch back and forth. </p>

<p>The default setting for 'Lock system ' is File, so change it to Database and click 'Save'. The problem started improving straight away, but took a few days before the system finally settled down again. No doubt a gradual improvement will be the same in your case, too.<br />
</p>]]></description>
            <link>http://www.mapability.com/blogs/web/2008/02/too-many-open-files.html</link>
            <guid>http://www.mapability.com/blogs/web/2008/02/too-many-open-files.html</guid>
            
            
            <pubDate>Fri, 29 Feb 2008 15:54:58 +0000</pubDate>
        </item>
        
        <item>
            <title>Movable Type 4.0 site Hacked</title>
            <description><![CDATA[<p>Ever had your website taken over? Its no fun. The other day I logged on to find that my site was partially infested with files that I hadn't put there. In certain directories there was an .htaccess file, and another with random numbers then .php - for example something like 180185.php. Had I put them there? Were they files belonging to my Blog software, Movable Type? I opened up the .htaccess in Notepad, and discovered that it took control of all 404 errors (File does not exist) and directed all requests to the numbered .php file, which then opened up a page listing all kinds of mobile phone hacks etc. A LOT of bandwidth was being used, besides filling the Google cache with all kinds of illegal rubbish purporting to come from me.</p>

<p>How had this got there? After a lot of searching, and a lot of red-herrings, I finally tracked down the cause to my Blogging software, Movable Type. It turned out that when installed, its settings are such that all new entries to the Blog, plus all their indexes and archives, are stored in folders with permissions set to 777. All new files have their permissions set to 666. Is that a problem? Yes, because it allows ANYONE to write to those folders, as happened to me. This page: '<a href="http://blog.movalog.com/a/securing-your-weblog-cgiwrap-and-suexec/" target="_blank">Securing your weblog - CGIWrap and SuEXEC</a>' explains the problem in greater detail as well as describing the fix.</p>

<p>Basically, there are two things you need to do. First, you open your 'mt-check.cgi' page in a browser - you will find it in your 'mt' directory. If (and ONLY if) it tells you "(Probably) Running under cgiwrap or suexec" then you can add an extra layer of Security to your site, by adding some lines of text to your 'mt-config.cgi' file. All you do is to open the file with Notepad or similar (NOT a word processor) and add the following lines at the bottom:</p>

<p>#<br />
#=ADDED TO SET CORRECT PERMISSIONS FOR FILES AND FOLDERS=<br />
#<br />
DBUmask 0022<br />
DirUmask 0022<br />
HTMLUmask 0022<br />
UploadUmask 0022</p>

<p><br />
Save the file, and try a new entry to your Blog. You will find that the new entry has its permissions set to 644, and the folder it is in has its permissions set to 755. SUCCESS !! Now all you have to do is to go through your site and set the permissions for all those older Movable Type entry-files and folders to the above value as well!</p>

<p>CAVEAT: The above worked fine for me. I make no guarantees it will work for you, so would suggest you alter things and test things one step at a time, and make sure you know how to recover if you have made a mistake.</p>]]></description>
            <link>http://www.mapability.com/blogs/web/2008/02/movable-type-40-site-hacked.html</link>
            <guid>http://www.mapability.com/blogs/web/2008/02/movable-type-40-site-hacked.html</guid>
            
            
            <pubDate>Mon, 18 Feb 2008 17:24:29 +0000</pubDate>
        </item>
        
        <item>
            <title>Gallery2 Preinstaller</title>
            <description><![CDATA[<p>I now have a photo-gallery on my website. After much searching, I decided on the Gallery2 package. Its an excellent bit of software, and produces outstanding results. Installation is easy, the templates are good, <a href="http://codex.gallery2.org/Main_Page" target="_blank">Documentation</a> and <a href="http://gallery.menalto.com/forum" target="_blank">Support Forums</a> are fairly good, and its reasonably easy to configure via the web contol-pages. I have only two negative things to say about it. The first is that its a little slow to output pages to the web, though this is just a minor niggle. More important is the issue of the PreInstaller - a supplied progam that does the uploading and unpacking of files on to your server for you. The following notes are designed for someone who has fallen foul of its effects...</p>

<p><b>Upgrading a Gallery2 installation that has been installed with the Pre-Installer</b><br /> <br />
If you are reading this before installing Gallery2, my advice would be NOT to use the Preinstaller. Just upload the files using an FTP program, and all will be well. However, my guess is that you are reading this after using the Preinstaller, are staring to panic, and have done a search for Help, just like I did. Here are some tips to help you. The answers ARE on the Gallery2 site, but they are not easy to find. </p>

<p>The Preinstaller is very good, and works well - there is no question about that. It makes uploading files very easy - no more worrying about FTP drop-outs, and wondering which files have been uploaded and which lost. But there's a sting in the tail. The problem comes from the fact that after it has done its job, all the files and folders that it used or installed, including the main Gallery2 folder, are now 'owned' by the System, not by you. This means that after your successful installation, when the Preinstaller recommends that you change the permissions (also called 'CHMOD') of the Gallery2 folder from 777 to 755, and you log in with your favourite FTP program or web interface (Cpanel, Vdeck etc) you will find that you get a message saying "/public_html/gallery2 chmod failed: Operation not permitted".</p>

<p>Oh my God - I can't access my own files?! A search of the Gallery 2 documents eventually located a page about the <a href="http://codex.gallery2.org/Gallery2:Preinstaller" target="_blank">Gallery2:Preinstaller</a> which tells me that I already have a tool on my site to help with this, at http://www.mysite.com/gallery2/lib/support/index.php?chmod But when you access it, you will be asked for your site password, so make sure that you have it handy. This password is not the one that you entered into the '$passPhrase = "";' line of the preinstall.php. It is not the line of text contained in the 'login.txt' file that you had to upload during the installation. If you lose your password, or forget it, or try the wrong one, the CHMOD Tool Page will then tell you 'Failed login attempts: 1 out of a total of 7', and so on, as in your panic, you keep trying to remember what you had originally entered. I have no idea what happens if you get to 7: maybe you will be locked out for good?? Best not to go there!</p>

<p>The CHMOD Tool Page trys to be helpful by telling you that your password can be found in your gallery/config.php file like this: $gallery->setConfig('setup.password', 'your password here'); BUT if the system is locked down as mine was, when you point your FTP program there, you will find that its permissions are set to 640, which means you can't view the file. It comes as no surprise to discover that you aren't allowed to change them either! Luckily, there is still one final option open - you must visit this page: <a href="http://codex.gallery2.org/Downloads:Cleanup_Script" target="_blank">Bharat's Cleanup Script</a>. Unzip the file, and upload 'cleanup.php' to the same directory as your gallery2 folder i.e. if your folder is at www.mysite/gallery2 then you should upload the file to www.mysite/cleanup.php Point your browser at that page, and enter the path to your gallery2 folder i.e. /home/~you/public_html/gallery2 Press 'Go' and if you have the path set correctly, all the permissions will be opened up. You can then browse to your config.php file, and find out what your password is, which lets you access the Gallery Support. Use that to start the CHMOD Tool Page, and you will then be able to lock your Gallery down again, by making everything read-only. If you get Errors, use the Cache Maintenance Page, also from Gallery Support. </p>

<p>The Gallery will now work OK, even though you can't access it with an FTP program. Does this matter, I hear you ask? Well, no, I suppose it doesn't really matter. Those of us 'old-timers' from the days of 486's and 10MB hard drives will feel a little nervous that there are files on our servers that we can't access readily, but as long as the Gallery2 program works properly and doesn't introduce any security implications, then heck why not leave it alone?! The <a href="http://codex.gallery2.org/Gallery2:Preinstaller" target="_blank">Gallery2:Preinstaller</a> page does tell you how to upgrade a Gallery2 installation that has been installed with the Pre-Installer, so I guess its alright.</p>

<p>Deleting unwanted albums can be a bit of a nuisance, though, and it was that that prompted me to rip it out and start again. I was glad I did, before my Galleries got too complex. If your Gallery2 installation has only a few photos in it, I would suggest deleting it altogether too, then reinstalling by uploading the files with a standard FTP program. (I'm a big fan of <a href="http://www.smartftp.com/" target="_blank">SmartFTP</a>, which is not only very capable, but is free for personal use.) It may take a couple of hours to get your Gallery2 installation back to where it was, but it will save you much more time than that in the long run, as well as a lot of hair-pulling.</p>]]></description>
            <link>http://www.mapability.com/blogs/web/2007/10/gallery2-preinstaller.html</link>
            <guid>http://www.mapability.com/blogs/web/2007/10/gallery2-preinstaller.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Gallery2</category>
            
            
            <pubDate>Mon, 22 Oct 2007 16:46:36 +0000</pubDate>
        </item>
        
        <item>
            <title>Installing Movable Type 4</title>
            <description><![CDATA[<p>It seems rather fitting that my first entry to this Web-Notes Blog should be about installing the software that runs it: Movable Type 4. In the past I have used Movable Type 3, and have been generally very pleased with it, though rather annoyed just how many spam comments I received, and how many track-backs to a variety of suspect websites. In the end, I just turned Comments and Track-Backs off. I kept getting reminders to upgrade my software, but was reticent to do something about it. 'If it ain't broke, don't fix it' was the main reason, and the worry that installing new software over the old blog setup would cause problems causing me to loose what I already had. <a href="http://www.movabletype.org/documentation/upgrade/" target="_blank">The Upgrade Page</a> explains the progress quite clearly, but the accompanying comments on the bottom of the page show that these things do not always go smoothly.</p>

<p>In the end, what prompted me to make the change was getting the whole site hacked. The hack took an evening to clean up. Actually, there were two hacks - one I hadn't even noticed before! I suspect that they got in through a loophole in the old blog software. Time to do something about this, and install something more secure. I chose to follow the safe route and do a completely new install of Movable Type 4, in a new folder. If this went wrong, I still had the existing setup to fall back on. It would also be easier to copy the entries from a working Blog.</p>

<p>Below are the Movable Type 4 <a href="http://www.movabletype.org/documentation/installation/quick-start.html" target="_blank">Quick Start Instructions</a>. I have added a few comments of my own...</p>

<p><span class="phototitle">If you are using a Linux or Unix Web server with all required components installed, follow these steps to install Movable Type:</span></p>

<p><span class="phototitle">Use a Web browser to connect to the Movable Type <a href="http://www.movabletype.com/download/personal-use.html" target="_blank">Download page</a> and follow instructions there to download the Unix/Linux/Mac OS X (.tar.gz) release file to your personal computer.</span></p>

<p>I had a strange thing happen here: when I tried to download the file on my laptop, the 'Open File' dialog started, but the 'Save' button never appeared. When I tried on a computer at the office, all worked fine. I also tried to download the Windows .Zip file on my laptop, but it would only download a section of the file, never the full amount. Opening the file brought up a 'Corrupted Archive - Please Download This File Again' message. The .Zip file downloaded fine on the office computer. Just why I couldn't download properly on the laptop was something I never did work out. I wonder how many other people have encountered this?</p>

<p><span class="phototitle">Extract the Movable Type files from the release file into a new folder on your local computer. You will need a program that can uncompress and extracts tar files. If you don't have such a program, you can learn how to get one on the gzip home page, http://www.gzip.org.</span></p>

<p><span class="phototitle">Start your FTP program and connect to your Web server using your server login name and password.</span></p>

<p><span class="phototitle">Copy the mt-static directory from your local computer to the Web root directory on the Web server.</span></p>

<p>I'm a big fan of actual examples in instructions like this. Authors often forget that newbies don't have the same basic background information that they do.</p>

<p>If your website is called http://www.mysite.com, then you should upload the folder 'mt-static' to http://www.mysite.com/mt-static</p>

<p><span class="phototitle">Open the cgi-bin directory on your Web server. Make a new directory within it named mt. Copy all of the other Movable Type installation folders and files to the mt directory.</span></p>

<p>This means that you create a folder called 'mt' here: http://www.mysite.com/cgi-bin/mt and copy everything to it from the downloaded archive except the 'mt-static' folder.</p>

<p>A note about folder-names in Movable Type 4: It is easy to make an assumption that the 'mt-static' or the 'cgi-bin/mt' folders wil be the access point to your new Blog, and be tempted to change the names to something that suits you. This is not the case. During the installation of the Movable Type 4 software, you will be prompted to enter the name of your required base directory - a name you chose for yourself. For instance, say you would like your Blog to start from the address: 'http://www.mysite.com/myblog/' then you can just enter that value when specifying your new blog. Movable Type4 will suggest a folder name when you enter the Blog name, but it can easily be changed. One word of warning: say you wish your blog to be in a sub-directory, such as 'http://www.mysite.com/blogs/myblog/'. When you create the 'myblog' blog, you will find that Movable Type has placed the new folder in the root directory (i.e. 'http://www.mysite.com/myblog/'), not under the 'blogs' folder. You will need to move the 'myblog' folder to its proper location, and then point Movable Type to where it now is, by clicking 'Preferences >> Blog Settings >> Publishing', and altering the values in the 'Site URL' and Site Root' boxes, not forgetting to click the tiny padlock on the right that allows you to unlock the values.</p>

<p><span class="phototitle">Make sure all the Movable Type cgi files (files ending with .cgi) in the mt directory on the Web server have execute permission. You should be able to select these files and check their properties with your FTP program.</span></p>

<p>This means that you should set their permissions (also called CHMOD) to 755.</p>

<p><span class="phototitle">Start a Web browser and run the installation wizard by connecting to the following Web address: http://domainname/cgi-bin/mt/mt.cgi where "domainname" is the domain name for your blog.</p>

<p>Follow the instructions provided by the installation wizard, to complete the installation and set up your Movable Type user name, password, and blog name. If you encounter problems during the installation, see Troubleshooting Installation Problems.</span></p>

<p>I'm impressed! The installation went very smoothly, and I acheived a working Blog in just a few minutes. 10 out of 10 to Movable Type. On the downside, though, their documentation is nothing short of attrocious. To make the most minor of changes I had to spend hours searching around the internet for clues. The Movable Type documentation is split over several sites, and its not always clear which notes apply to MT3 and which to MT4. The Forum is of more help, but I quickly noticed that MANY questions are going un-answered. MT, with all its customers, doesn't seem willing to assign a company man to monitoring their feedback. I will certainly be posting a few how-tos here on this Blog from time to time: lets hope others do the same.<br />
</p>]]></description>
            <link>http://www.mapability.com/blogs/web/2007/10/installing-movable-type-4.html</link>
            <guid>http://www.mapability.com/blogs/web/2007/10/installing-movable-type-4.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Movable Type</category>
            
            
            <pubDate>Tue, 16 Oct 2007 19:57:00 +0000</pubDate>
        </item>
        
    </channel>
</rss>

