Archived Posts from: WTF?


Oh man I just realized that I never ran “sudo port uninstall inactive” and I have reclaimed… hmm… 5 gigs? It’s as simple as that – if you’re using macports for a while and you’ve been using “sudo port upgrade outdated” to upgrade, make sure you remove the old versions because after a while that space really adds up! I don’t know why I thought that upgrading a port removed the old version? I bet it’s in the documentation somewhere (yes, it’s time for me to RTFM haha)

I use PHP on FreeBSD servers, compiled from the ports system. It works very well, except that sometimes… well… sometimes… segfaults happen. Yes random, bizarre, “how did this working system suddenly become non-working wtf” errors happen.

Here’s an example of what happened to me today. This is a snip from my lighttpd error log

(mod_fastcgi.c.2722) child signaled: 11
(mod_fastcgi.c.1051) the fastcgi-backend /usr/local/bin/php-cgi failed to start:
(mod_fastcgi.c.1065) terminated by signal: 11
(mod_fastcgi.c.1070) to be exact: it segfaulted, crashed, died, … you get the idea.
(mod_fastcgi.c.1072) If this is PHP, try removing the bytecode caches for now and try again.
(mod_fastcgi.c.2759) ERROR: spawning fcgi failed.

WHAT!?

Well in a nutshell, php-cgi is failing to start. When I attempt to run /usr/local/bin/php-cgi from the command line, it causes a segmentation fault. If you’ve seen this before, you might have thought “oh no… sig11! signal 11 could mean my hardware is fried!” At least I thought so. The truth of the matter, in this case, is that the php-cgi executable is not happy. Why isn’t it happy? I’m glad you asked. We all want our executeables to be happy, right?

This wasn’t easy for me to figure out the first time it happened to me last year. I was going nuts trying to figure out what went wrong, I even put in a request for new hardware (yes a new development server, which I actually got). This didn’t solve my problem either. I began to panic. I’m not sure what made me think of it, but after a while I decided to try minimalizing my PHP installation, by commenting out extensions from my extensions.ini file (on my sys it’s /usr/local/etc/php/extensions.ini)

With everything commented out, php-cgi was happy again, but of course I need at least a few of the extensions (specifically mysqli), and so I started adding extensions back in one at a time to find the problem. It turns out that the problem is with the recode extension.

With the recode extension out of the picture, things went along fine for quite a while and I was able to develop my small web application with Zend Framework (1.5 at the time, I think). PHP was happy, Lighttpd was happy, I was happy. There was a lot of happiness to be found! And then it happened. I updated my PHP port with portmaster. A dark cloud (a cloud named sig11) loomed over the server and the happiness turned to confusion once again. Then I remembered… “didn’t this happen last year?” Yes. Yes it did. Same problem. This time I didn’t panic though, I went straight for the extensions file.

Now I’m not sure what about the recode extension my system doesn’t like, but it doesn’t like it. It didn’t like it last year, and it doesn’t like it now. The PHP port installed a new copy of extensions.ini which includes the recode extension and so that’s why the error reoccured after updating the port. If you are experiencing weird segmentation faults with PHP, I highly recommend you start commenting out your extensions. Also, you may want to check the order of the extensions. If they are in alphabetical order, something is wrong. Some extensions rely on others to be loaded first, so be careful.

That’s it for now… PHP is happy once again, and I’m working on a new dev project, this time with Zend Framework 1.7  :) I’d tell you more about it… but it’s a secret. No, really, it’s a secret.

Why can’t I just reboot? Why do I have to choose some option from a dropdown? I only wanted to reboot! Now I was tricked into shutting down a server that isn’t even in the same zipcode! What the hell Microsoft? Why couldn’t you make reboot the first choice? Now I’m stuck making calls and e-mailing people to say “sorry I was confused by the crazy windows shutdown options”. Shutting down should be easier. Instead, the first thing you have to do is click START, which makes NO SENSE WHATSOEVER, then you have to choose from some silly dropdown to explain why. I’ll tell you why I was rebooting Microsoft! I’ll tell you why! It’s because you force me to reboot in order to get anything done! that’s why! That’s why I have to reboot the damned server! WTF?! You make my life miserable at every opportunity. Is it because you know I hate you? Is it because you know I’m using a mac and have a FreeBSD machine and OpenBSD machine at home? is that it? Is it because you know about my Ubuntu desktop machine? What is it? Why must you torture me this way?

I just walked by this place called Garrett popcorn. If you ever wondered what popcorn would cost of 5th avenue, here you go: it’s $2.30 for a small buttered or plain and it’s $185.00 for a 6.5 gallon tin of caramel crisp w/ nuts. The 1 gallon tin of caramel crisp is only $40.
If you ever see me spend $40 on popcorn just ask me for money, as I will surely have won the lotto and will be giving away money freely! :)

Photo_052108_001.jpg

The DHCP server at my office was reconfigured yesterday and it started forcing my macbook pro to change it’s name. I like having my host name remain constant for various reasons, so I asked in #macosx and some kind user there pointed me to this blog post:

http://www.elharo.com/blog/software-development/web-development/2005/11/29/setting-a-permanent-host-name-in-mac-os-x/

It works on leopard, in case you’re wondering! Solved my problem after a reboot.

Hot & Crusty was such a disappointment this morning. The people behind me in line got served before me, my bagel was burned, the coffee is bitter. The price is higher than ever. Hot & Crusty used to be a Tuesday treat for me. I could stop there at Grand Central Station and get a great bagel and coffee fast and cheap. Now it takes long, the staff is confused, the prices are high, the bagels are burned, the coffee is bitter. It’s so sad. I’m considering not returning.

If you installed Security Update 002 for leopard and suddenly ssh tells you “bus error”, the answer lies here:

http://discussions.apple.com/thread.jspa?messageID=6863360#6863360

Apparently the guys at rogue amoeba have some work to do – we need instant hijack!

If you are too lazy to read that thread, the fix is:

sudo /usr/local/hermes/bin/hermesctl unload

thereby uninstalling instant hijack and fixing the problem. Somehow…

… and here’s the fix from Rogue Amoeba:

http://www.rogueamoeba.com/utm/2008/03/19/security-update-2008-002-compatibility-fix/ 

I was getting on the bus this morning, nothing special about the day, just a regular morning. Or so it seemed. I didn’t have to wait long for the bus either, which is a nice change.
So far so good right? Yeah. Well the bus pulls up and everyone starts to board. I’m about to step on so I go to grab my metro card. For some reason I always look down while getting my card out of my pocket. As I am pulling the card out – the doors close. On my head. Yeah. If there had been metal and not rubber safety strips on the doors I would most likely have been decapitated by the front door of a bus.
What a way to start the day…

Recently the MTA has opted to raise the fare for subways and busses. Not for people who ride once it a while, no – only for those of us who ride several times a day – i.e. those of us who find it more feasible to use the “unlimited” metro cards. They cite rising costs rising costs rising costs. Right. What is rising is my blood pressure. The NYC MTA has a way to rate the subway and bus lines. I’m pretty sure this is just a way to make us (the paying customers) feel better about the fact that the service does not improve while the price continues to rise. We have a chance to tell them how they’re doing. Maybe if I fill out a report card for the 19A I’ll be satisfied? Hmm…

I must admit, I am not satisfied. I understand that the costs of everything seem to be rising these days. I’m not sure why but I know for sure that the price of oil and milk are going up all the time, etc. Ok so I’ll take that into consideration. My question is – does that have a connection to why service isn’t improving? Take for example the bus I take to the subway every morning, the Q19 A. This bus is notoriously late and over crowded. So much so that there are times that the bus is so full it passes my stop by while my fellow 19A-ers and I watch in frustration. Yes, sometimes there are traffic problems or sick passengers. Yes, it’s not easy to keep anything running on a tight schedule. But for the last few years (this year especially) the 19A has been so consistently late that I am starting to believe that the MTA just doesn’t care.

I wish I could just boycott the MTA. It’s cold outside, though. Freezing some days, raining some days. It’s about a mile to the subway that I am forced to take every day, so the bus is really necessary for me. I think the MTA knows that I have no choice – so they can charge me whatever they want. There’s nothing quite so poignant as that realization that your day to day struggle means nothing to those who live off of your wages. When I think about it the word that best describes this feeling is disenfranchised. The fact that I have to pay $85 a month in order to go to work just to live makes no difference – I can’t do anything about it. What could I do? Quit working? Be homeless? Ride my bike to work in the snow?

Any ideas?

The picture says it all…

Internal Error: Success

Next Page »