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)
Category: WTF?
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?
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:
It works on leopard, in case you’re wondering! Solved my problem after a reboot.
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/
What follows is a rant/review of Yellow Dog Linux 5.0.2. It’s the second part of the “Golden Apple Project” article series, which tells the tale of my quest to transform a formerly unused Apple PowerMac G4 (450Mhz, AGP Video) into something more useful than an unused OS 9 machine.
After a somewhat discouraging attempt at installing NetBSD (see the first article in the series), I decided to try the OS that first showed me how nice the PPC architecture is for Linux – Yellow Dog. I figured that since Yellow Dog was great when I tried it about 2 or 3 years ago it would be even better now, especially with all the support Terra Soft has been getting from Sony. What I found, however, was that YDL was not quite what I had hoped. In fact I was very disappointed.
When I install an operating system I look for a few basic things, the first of which being a quick and reliable way to install. I’ve installed several operating systems and several distributions of Linux and so far Yellow Dog is the only one that requires either a 3+GB DVD or 6 CD’s to install. 6 CD’s and every one is required? That is simply insane. What if I just want to try the OS for a while? What if I only need a minimal system? What if I don’t have enough hard disk space to install every application under the sun? Yellow Dog Linux was not designed with these “what if’s” in mind.
After a few unsuccessful attempts at downloading the DVD ISO image (each attempt stalled at or near 2/3 completion, which is not YDL’s fault but still not fun) I decided to get all 6 CD images burned instead. At least this way I would be able to download the distribution in smaller chunks. I thought that since I already downloaded everything that the install would go fairly quickly. I was wrong. It took about 2 and a half hours to install from the CDs. Granted, it’s an old 450Mhz machine with a slow FSB and 256K ram, etc. but still – 2 and a half hours is a long time. I moved forward though… swapping discs when asked and watching anxiously as the installer showed me that it was copying package after package of open source software (none of which I was allowed to choose or not choose).
When I tell you I watched anxiously, I am being very literal. The install process consisted primarily of watching the installer. It didn’t ask me any questions. It didn’t let me make any choices. It only prompted me to insert CD after CD. After disc 6 I was finally asked for the root password and was invited to create a user account for myself. I expected to be asked for some networking information at least, but was not. Root password and user account name and password. That’s it. I tried to tell myself that it was a hassle-free install (again since I don’t count the download as YD’s fault, really), but I couldn’t get over the fact that there was no way to configure the network during the install. Normally I would configure the network first, and use it to install the operating system over the network via FTP or HTTP. With YDL network installs are not an option but I would have liked to have my network configuration done before first boot.
So far YDL had already been an unusual experience, and I hadn’t even gotten to first boot. As the machine restarted I told myself that the worst was over and that after I logged in and configured the network everything would be fine. Wrong again. I logged in with the user account I created during the install and saw a very nice looking E17 desktop. I must admit – E17 is coming along nicely. The only word I could use to describe it right now is… pimp! hahaha
I mean wow. It’s one gorgeous desktop. Kudos to the E17 team. Unfortunately however, this desktop was basically for my viewing pleasure only. No program would start that was not already running for me, neither from a launcher, nor a menu. Not even the “run command” box worked for me. Seems the user account was running as a different user than X and had no permission to the display. Nothing would work as the regular user except logging in and logging out. The word that best describes this is LAME. If you are keeping track of the adjectives so far you’ll see that the negatives outweigh the positives already.
At this point I had basically lost faith in the YDL distribution. I have seen desktop Linux come a long way over the past few years and YDL took me back to a time when I could undoubtedly expect more problems than ease with Linux. Yet, I logged in as root just so I could at least take a tour and see what all of that downloading and waiting and watching would get me.
As root, launchers worked and the menu too. Firefox started and was very responsive, even with the limited resources. Even OpenOffice’s writer and spreadsheet programs worked fairly quickly. I was reminded that the PPC architecture is great, even without OS X. This moment of happiness was short lived – I found out soon after opening Firefox that there was no flash support for Apple PPC Linux. There will most likely never be official Adobe Flash support for Apple PPC Linux. That saddens me but not to the point where I’m going to give up on the whole project.
I looked around some more and found some more things I didn’t like (while trying to find things to like). Apache came pre-installed and so did Java and Python. PHP and Ruby were left out though, and those are my two favorite languages to code with. Some Gnome games were installed, but not Gnome sudoku (which is awesome, btw).
In summation, if you add up all the adjectives you get this – Yellow Dog Linux on Apple PPC is a disappointing, lame, pimp (remember that E17 is PIMP). A disappointing lame pimp that saddens and frustrates the user, but looks so nice. What else can I say? At least it’s better than OS 9? I’m not sure I can even say that. I guess any Linux is more fun to use than OS 9… but a crippled desktop is a crippled desktop, pimped out or not.
So where does this leave the Golden Apple Project? To paraphrase the beautiful Joss Stone… My hopes for this old PowerMac G4 are “Bruised but not broken”. I’m going to try OpenBSD… and I have plans to revisit NetBSD as well. There is no giving up on this quest! Stay tuned…
What is the deal? I add a new imap account and it doesn’t show up until I close Kmail and then open it again? And then it doesn’t accept even the correct username and password (ok fine that might have been a server issue… maybe) and then I try to just cancel and it won’t go away! If I say cancel, that means cancel! It doesnt mean cancel this little window and then bring me to another annoying window and then bring back the window I just cancelled. Cancel means cancel. It means no more, no mas, I’m giving up, please go away, leave me alone. I didn’t even want to try kmail because last time it decided to download all of my mail and re-upload it, effectfively destroying the date/time stamps on every message in my imap box. This time it gave me a new reason to hate it. I don’t get it… I mean kde is so nice… why does kmail have to suck for me every time?
It’s easy to install OpenBSD on mac hardware the right way. Simply download what you need and follow the install guide. What’s not so easy is installing OpenBSD the wrong way. This guide is intended to help someone who may have gotten anxious and strayed from doing things The Right Way(tm) [see also, The Easy Way(tm)]. It is also a warning. RTFM. Read it twice.
Take notes. Installing OpenBSD can take as little as 20 mins or as much as the rest of your life…. It all depends on how you approach it. This is the rest of your life approach ![]()
With all that said, let’s get down to business.
This is so awesome. Check out what this guy does to people that try stealing his net connection. It’s a great use for squid. I swear it makes me want to go home and install squid just to screw with people. hahaha this is why I read slashdot
You mean you don’t know about it? Oh no! You are teh l4m3r! Check the wiki entry.
