Tuesday 6 January 2009

Getting virtual hosts and suPHP on Ubuntu working

This morning I looked in my fishtank and the moth wasn't there. I took all the stuff off the top of the fishtank, and it wasn't sitting up near the top of the tank either. Somehow it had managed to escape despite the top of the fishtank being blocked off with a folder and picture frame covering it. I've no idea where it is now. I looked round my room, but couldn't see it anywhere. It must be around my room somewhere.

After that I tried to help Rad with his external hard drive that isn't working properly. I also carried on trying to get virtualhosts working in Ubuntu. Eventually I got it working, with much trial and error, and following this tutorial: Ubuntu Feisty - Apache Virtual Hosts, only the virtualhost block needed to be *:80 rather than just *.

Probably after getting that working I had lunch, but I cannae remember exactly when it was.

After getting that sorted I moved on to checking if suPHP worked. It did, but apache gave an error when I added in suPHP_UserGroup user group to the virtual host configuration.

So after some googling I uninstalled suPHP, and then followed this guide: How To Set Up suPHP With PHP4 And PHP5. I did come a bit unstuck at one point when my make didn't work, but after a bit I realised that I needed g++ (GNU C++ complier) installed (had to read the error message to see I needed it, duh!). After installing that I followed the rest of the guide (well not about setting up php4 and php5) and it all went smoothly. The latest version of suPHP (0.7.0) that I downloaded didn't need the changes making to the code either.

I had to chmod the php file I wanted to run as I had created it as root rather than the user I specified in the virtual host configuration settings. After this, I could access the page okay, and display the phpinfo() file I'd made.

When Ben came home from school we went in the garden to see how thick the ice was, we could actually walk on the pond without falling in!

After this I checked my email and read a bit about using Ubuntu since I'm new to Linux. One of the things I read was that you can press Alt + Print Screen to take a screenshot of just the window you have in focus at the moment. I tried it on windows Vista, and it worked too. I never knew about that.

Most of the day I was also trying to get Rad's external harddrive to work, but gave up about 5pm when it still didn't work even after deleting the partition table. Whenever you try and format a partition, windows will format it, then when it's finished say an error occurred and the partition could not be formatted properly. Rad also tried a program create and format the partitions, but that didn't work either. Seatools didn't recognise the drive as a Maxtor/Seagate drive, and couldn't run any tests on it, so I think the drive must be trashed.

The weather today was cold all day (probably at or below zero in the shade), and the snow on the road/pavement that got sun on it didn't melt much (probably just reflected most of the heat from the sun). The snow on the grass across the road did melt though. The snow in the back garden didn't melt, but that hardly got any sun on it. I don't know if I said about the snow before. It snowed a bit yesterday, not enough to make a snowman with or anything, the grass is still easily visible through the snow. The sky was clear with a few clouds and the sun shone all day, plus there was a really nice sunset.

In the evening I watched Lost Missing Pieces with Mac and Ben, went on Animal, then watched an episode of Planet Earth.

Food
Breakfast: Grapefruit marmalade toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese sandwich; packet of prawn cocktail flavour crisps; clementine; slice of home-made jam victoria sponge cake; cup o' tea.
Dinner: Shepherd's pie; peas; carrots; tomato ketchup. Pudding was spotted dick with the sponge being lemon flavoured & custard. Coffee; Cadbury's chocolate buttons; Werther's original.

No comments: