Entries in Computing (187)

Thursday
Jan262012

CodeIgniter Error Reporting

 

CodeIgniter is a popular PHP framework for building websites. I have long suspected that the way it reports errors was unnecessarily complicated. Well, last week I finally got round to really trying to understand what was going on.  The above diagram summarizes what I learnt.  Click through and select 'download' to see a larger version.

This information applies to my current setup which is CodeIgniter 2.1.0, PHP 5.3.2 and Apache 2.2.14 all running under Ubuntu 10.04 LTS.  There might be some differences for other setups.

Thursday
Aug042011

Overheating CPU

Our main home PC is an AMD Athlon MP 2400+ dual processor machine that we bought back in 2004.  I have kept it going all these years by replacing various parts as they failed: first the RAM, then the graphics card, and most recently the power supply unit.

Earlier this week we had a series of warm days and the PC started showing occasional spontaneous shutdowns while my daughter was watching videos. 

I opened up the PC box to check that all the fans were still working (they were) and noticed a flashing red light on the motherboard.  According to the motherboard User's Manual that came with the PC, this light flashing indicated a shutdown due to a CPU overheating.

I let the PC cool off and the flashing red light went out after a minute or so.  Then I booted up into the BIOS and went to the PC Health Status page.  This showed the following:

  • System temp = 35C
  • CPU0 temp = 60C
  • CPU1 temp = 60C, rising to over 100C within 10 minutes

This is not good: I remember reading in some AMD document that the MP 2400+ CPUs should not go above 90C - 95C.

A bit of Googling and a bit or reading suggested two things I could do: remove any accumulated dust and replace the thermal conductivity layer between the CPUs and their heatsinks.

I carefully used a screw-driver to detach the CPU fans.  Both fans were full of dust and the aluminium heatsink grills beneath them were covered in a thick mat of dust.  I cleaned them carefully using one of my daughter's artist's brushes.  I also cleaned the case fan, the front ventilation grills (I had to detach two front panels to do this properly), and brushed and blew out as much dust from the case as possible without touching the electonics.

When I rebooted the PC and went into the BIOS  PC Health Status page it showed:

  • System temp = 35C
  • CPU0 temp = 45C, rising to 60C
  • CPU1 temp = 60C, rising to 85C

An improvement, but not there yet: CPU1 was still 15C - 25C hotter than CPU0.

I walked over to our local Maplins and bought a tube of Antec Silver Thermal Compound.  I again removed the CPU1 fan and, following the unclipping procedure shown in this Youtube video, I unclipped the aluminium heatsink from CPU1.  Following the instructions that came with the thermal compound, I used some spare video head-cleaning fluid to clean the contact surfaces of the heatsink and the CPU.  Then I put a small amount of the thermal compound on both surfaces and, taking care not to get any on the surrounding electronics, I used a thin slip of clean paper to spread it smoothly, so instead of being opaque dark grey it was an almost translucent even light grey.  I then carefully clipped the heatsink back to the CPU and reattached the CPU fan.

On rebooting, the BIOS PC Health Status page showed:

  • System temp = 35C
  • CPU0 temp = 45C, rising to 60C
  • CPU1 temp = 45C, rising to 60C

Problem fixed!

It has now been 24 hours and I have seen no reoccurrence of the spontaneous shutdown and, whenever I have looked, the temperatures of both CPUs have been within a few degrees of each other and in the range 45C to 60C.

Saturday
Jul162011

Wacom Bamboo Pen on Ubuntu 10.04 LTS

Last year I bought my daughter a Wacom Bamboo Pen CTL-460 tablet. I quickly got it working with Gimp and Inkscape on our Windows-XP PC but was unable to get it to work at all on our laptop running Ubuntu 10.04 LTS. And that was how I left it, until last week when I came across this page at the Linux Wacom site.  What I hadn't been clear to me last year was that both a kernel driver (input-wacom) and a X11 driver (xf86-input-wacom) were necessary and that Ubuntu 10.04 LTS has only the X11 driver included.  Last week I simply downloaded and installed the kernel driver following the given instructions and now the Bamboo Pen works perfectly on the laptop too.

Tuesday
Jul052011

State Transfer

From Architectural Styles and the Design of Network-based Software Architectures, the PhD dissertation of Roy T. Fielding, page 109 (2000):

"The name “Representational State Transfer” is intended to evoke an image of how a well-designed Web application behaves: a network of web pages (a virtual state-machine), where the user progresses through the application by selecting links (state transitions), resulting in the next page (representing the next state of the application) being transferred to the user and rendered for their use."

Thus, it is the state of the whole application that is being transferred in REST, not the state of particular resources as suggested here.

Friday
Jun032011

Firefox ignoring /etc/hosts when DNS not available

I have a laptop running a development LAMP web server under Ubuntu 10.04 LTS.  The laptop is normally connected to a small network where the DNS name server is a modem-router with IP address 10.0.0.2.  The relevant parts of the network configuration files are as follows:

 /etc/resolv.conf:
nameserver 10.0.0.2
...

/etc/hosts:
127.0.0.1 localhost laptop site.laptop
...

/etc/nsswitch.conf:
...
hosts files mdns4_minimal [NOTFOUND=return] dns mdns4
...

/etc/host.conf:
order hosts, bind
...

This all works as expected if the laptop is connected to the network and the DNS name server is available:  I can ping site.laptop and can also visit the site.laptop website in Firefox 3.6.17.  However, when I disconnect the laptop from the network and the DNS server is no longer available I can still ping site.laptop but in Firefox I get "Server not found" whenever I try to visit site.laptop.

I tried all sorts of things in my attempts to fix this problem, and learned a lot about DNS in the process, but nothing worked.  And then I remembered that a while back I had disabled IPv6 DNS in Firefox to fix a bug which was delaying page loads.  I reasoned that the bug that caused the delay might well have been fixed by now, so I entered about:config in the Firefox URL bar and then set network.dns.disableIPv6 back to its default value of false.

This fixed my "Server not found" problem: I can now get to site.laptop in Firefox with or without the DNS name server available; and the slow page load problem has not returned.

Page 1 ... 5 6 7 8 9 ... 38 Next 5 Entries »