Fix: PHP 5.2 and 5.3 crash Apache 2.2.14

December 21, 2009 - 5:25 am 13 Comments

Having just bought a new laptop, I went about installing Apache 2.2.14 and PHP 5.3.1 VC6 but quickly ran into problems when Apache flat out refused to load after PHP was installed.

The error Apache throws is “The requested operation has failed!”.

Apache crashes after installing PHP

Apache crashes after installing PHP


In event viewer, you will see something like:

Faulting application name: httpd.exe, version: 2.2.14.0, time stamp: 0×4ac181d6
Faulting module name: php5ts.dll, version: 5.3.1.0, time stamp: 0×4b051b35
Exception code: 0xc0000005
Fault offset: 0×000e618c
Faulting process id: 0xd90
Faulting application start time: 0×01ca81af664b1357
Faulting application path: C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe
Faulting module path: C:\Program Files (x86)\PHP\php5ts.dll
Report Id: a40dce43-eda2-11de-9f0c-005056c00008

To cut a long story short, I went through each line of the php.ini file seeing which one was causing the problem. I narrowed it down to this extension:

[PHP_SYBASE_CT]
extension=php_sybase_ct.dll

Change to:

[PHP_SYBASE_CT]
;extension=php_sybase_ct.dll

Uncomment this extension by placing a semi colon in front, and Apache will load without any problem.

If you found this post helpful, leave a comment to let me know, thanks.

How to: Hide drives in Explorer

April 8, 2009 - 9:48 pm No Comments

Explorer.exe: Insert Disk
Recently I’ve been spending a lot of time in Explorer, copying multiple CDs and DVDs to a hard drive. When I ejected a disc, Explorer tries to select the following letter after the CD/DVD drive. This causes an error on my computer as the next drive is a multiformat card reader with no media in it. Usually this is not a problem and I just click “OK” and continue on my way, but I have 400 discs to copy and the thought of clicking “OK” 400 times is not my idea of fun.

There is a fix however! Hide the drives. This way, Explorer won’t pop up the error because it can’t see the drive. This may not work for everyone, but it does for me. I rarely use the media reader so it is more convenient for me to just unhide the drives again when I’m finished with my disc copying.

Thanks to http://www.pcdrome.com where I found the following tweak:

Open your registry and find or create the key below.

The “NoDrives” value uses a 32-bit word to define local and network drive visibility for each logical drive in the computer. The lower 26 bits of the 32-bit word correspond to drive letters A through Z. Drives are visible when set to 0 and hidden when set to 1.

If you are not happy working in Hex, add these decimal numbers to hide the drive(s):

A: 1, B: 2, C: 4, D: 8, E: 16, F: 32, G: 64, H: 128, I: 256, J: 512, K: 1024, L: 2048, M: 4096, N: 8192, O: 16384, P: 32768, Q: 65536, R: 131072, S: 262144, T: 524288, U: 1048576, V: 2097152, W: 4194304, X: 8388608, Y: 16777216, Z: 33554432, ALL: 67108863

For example to hide drive A and drive D, you would add 1 (A) + 8 (D) which means the value should be set to “9″.

To disable all the drives set the value to “67108863″.

Restart Windows for the change to take effect.

How To Fix: Windows XP Task Manager Update Speed

March 19, 2009 - 4:43 pm No Comments

Windows XP Task Manager (where Normal doesn't mean default)
Windows XP Task Manager (where Normal doesn’t mean default)

I only just noticed this the other day when I was trying to resolve another unrelated problem. I was using Task Manager to keep an eye on my CPU usage which spiked to 100% usage every 120 seconds or so.

The default behaviour of Task Manager is to update once every second, and if you check the Update Speed option in the menu, “Normal” is already selected. That would lead you to believe that “Normal” is 1 second (High is every 0.5 seconds and Low is every 4 seconds).  The problem is, if you ever select anything in this menu – be it High, Normal, Low, or Paused – “Normal” will set the update interval to two seconds. It is impossible to get back to the default (and most useful) update interval of one second.  Simply, it’s bugged.

To get back to the default behaviour, you need to:

  • Open Regedit.exe
  • Browse to
    HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\TaskManager
  • Delete the string Preferences
  • Restart Task Manager

You will then have the default behavior of having an update interval of one second.  Thanks to Trogdor on the Firing Squad forums for finding this solution.

Dell UK starts selling Mini 10

February 26, 2009 - 11:44 pm No Comments

dellmini10uk

It’s official, Dell UK has started selling the Mini 10 for 299 pounds for the 1.33GHz version or 329 pounds for the 1.6GHz version.

You can buy it here. It won’t ship for another 3 weeks however.

Dell Mini 10 details released

February 20, 2009 - 10:12 pm 2 Comments

Dell Mini 10

More details on the Dell Mini 10 have been released:
http://en.community.dell.com/blogs/direct2dell/archive/2009/02/18/dell-s-mini-10-packs-a-punch.aspx

Some things that jump out:

  • QVC gets to sell it first… er… right.
  • It will be available on Dell.com on February 26th – one day before my pre-announced release date here
  • QVC price is $559
  • Weighs 2.86lbs
  • 2 choices of Atom processor: Z520 or Z530
  • 160GB 5400rpm HDD … no SSDs for the release :(
  • 1GB of fixed RAM (non-upgradable)…. fail.
  • No Ubuntu for release – coming later this year.
  • GPS / TV Tuner / 720p screen all to be released later in the year.  Goddamit.

Summary:  Not a lot of netbook for a lot of money.  I’m going to have to reconsider which netbook to buy now.

    Delay scary career choices by another 2 years… get a scholarship in Japan?

    February 18, 2009 - 1:11 pm No Comments

    I have come across this website:
    http://www.studyjapan.go.jp/en/toj/toj0306e.html

    It’s like JET. You apply with the embassy in your home country, but this is to study in Japan for a Masters or Doctorate. Get this: they give you a free return ticket, moving allowance (25000 yen), and a monthly allowance (170,000 yen). Plus, you get your education! I’m quite interested in this, especially with the current economy in the UK.

    Hmm… what to do….

    Influenza

    February 17, 2009 - 5:45 pm No Comments

    Well, I’m coming down with something and it’s looking very like influenza.  Aches, pains, cough, sore throat, general sick feeling, I have it all.  Time to stay in bed.

    How to fix: Intermittent IMAP “BYE Temporary problem, please try again later” messages (courier-imap)

    February 14, 2009 - 4:09 pm 2 Comments

    This problem has been bugging the life out of me ever since it appeared about a month ago.

    Some background:  I have a VPS with EUKHost.com that I have all my sites on.  I have about 5 email accounts spread over my various domains on this VPS.  I prefer to use IMAP, and have MS Outlook open for most of the day with it doing an automatic send/receive every 10 minutes or so.  This worked great for 10 or 11 months.

    As I said, a month ago this “BYE Temporary problem, please try again later” message kept appearing.  What made it even more annoying is that Outlook displays it in a foreground message window that disturbs any application you may be using at the time the error occurs.  Oh, and it also keeps the mail accounts “offline” until you do a manual send-receive.  E-X-T-R-E-M-E-L-Y annoying when this happens every few minutes.  I ended up closing Outlook for most of the day because it just bugged me so much.

    EUKHost couldn’t fix it.  Various google searches I tried before didn’t help.  Today, I finally have some free time to sit down and finally figure this one out.

    First, I had to confirm that it was a server problem and not a problem with my Outlook.  Because this is an intermittent problem, this was difficult to do and partly the reason why it took me 4 weeks to do something about it.  After some research, I found out how to debug courier authentication errors.  I wasn’t 100% sure this was where my problem lay, but as I had nothing else to go on, I decided to give it a try.

    How to debug courier authentication errors:

    1. Edit authdaemonrc (I found mine at /etc/authlib/authdaemonrc)
    2. Set DEBUG_LOGIN=1
    3. Restart authdaemond:
      # authdaemond stop
      # authdaemond start
    4. At this point, all debugging output goes to syslog at level ‘debug’, which is normally not shown. You will probably need to change your /etc/syslog.conf file to be able to see these messages.  Add this line to the end of /etc/syslog.conf:
      *.debug /var/log/debug
    5. Create the log file and restart syslog:
      # touch /var/log/debug
      # killall -1 syslogd
    6. Keep an eye on the log file:
      # tail -f /var/log/debug

    OK, so now we’re debugging authentication errors.  I opened Outlook and just continued doing whatever I normally do until the error message appeared.  It wasn’t more than 5 minutes before it appeared.  In the log file I saw this:

    ...
    Feb 14 15:57:34 vps authdaemond: authpipe: TEMPFAIL - no more modules will be tried
    ...
    Feb 14 15:57:34 vps imapd: LOGIN FAILED, user=paul+fuc.it, ip=[::ffff:222.144.254.98]
    Feb 14 15:57:34 vps imapd: authentication error: Input/output error

    This confirmed that it was indeed an authentication problem.  The input/output error confused me for a while – was it a hardware problem?  After researching more, I found this useful bit of text within the authdaemonrc.dist file (yes, the configuration file I was editing before didn’t have any comments…)

    ##NAME: daemons:0
    #
    # The number of daemon processes that are started. authdaemon is typically
    # installed where authentication modules are relatively expensive: such
    # as authldap, or authmysql, so it's better to have a number of them running.
    # PLEASE NOTE: Some platforms may experience a problem if there's more than
    # one daemon. Specifically, SystemV derived platforms that use TLI with
    # socket emulation. I'm suspicious of TLI's ability to handle multiple
    # processes accepting connections on the same filesystem domain socket.
    #
    # You may need to increase daemons if as your system load increases. Symptoms
    #
    include sporadic authentication failures. If you start getting
    # authentication failures, increase daemons.
    However, the default of 5
    #
    SHOULD be sufficient. Bumping up daemon count is only a short-term
    # solution. The permanent solution is to add more resources: RAM, faster
    # disks, faster CPUs...

    I underlined the important bits.  Sporadic authentication failures?  Check.  Default of 5?  Uhm…. mine’s set at 2.  So, I upped it to 5, restarted authdaemond and waited for Outlook.  It’s been going for a few hours now and no errors.  I hope this resolves it finally.  I also hope that this helps someone else and prevents someone from getting as fed up with it as I did.  Leave a comment if it helped you!

    How to fix: locate: can not open `/var/lib/mlocate/mlocate.db’: No such file or directory

    February 14, 2009 - 2:29 pm 3 Comments

    In the first of my “How to fix” posts where I detail how I fix various issues I run into, this is a simple one:

    [root@vps etc]# locate courier
    locate: can not open `/var/lib/mlocate/mlocate.db': No such file or directory

    OK, so the mlocate.db file doesn’t exist, marvellous.  How do we either find it or create it?
    Answer: simply run updatedb

    [root@vps etc]# updatedb

    Now we can do our search:

    [root@vps etc]# locate courier
    /etc/profile.d/courier-imap.csh
    /etc/profile.d/courier-imap.sh
    /etc/rc.d/init.d/courier-authlib
    /etc/rc.d/init.d/courier-imap
    /etc/rc.d/rc0.d/K30courier-imap
    /etc/rc.d/rc0.d/K85courier-authlib
    /etc/rc.d/rc1.d/K30courier-imap
    ...

    Valentine’s Day in Japan

    February 13, 2009 - 4:45 pm 2 Comments

    I know, a day early…  However, when I arrived at school this morning, there was already 2 bags of chocolates on my desk.  See, in Japan, the girls give chocolates to the guys on Valentine’s Day, and the guys are meant to give white chocolates back on “White Day” (March 14th).

    Later in the day, 2 of my nice(r) students gave me some homemade chocolates.  They’re the Elmo box and the little bag below.

    Valentine's Day Chocolates (1)

    Remember, Elmo loves you!
    Remember, Elmo loves you!