I’ve posted a patch that should allow you to use include statements in PHP’s INI files similar to Apache. This is useful when you have complicated server configurations that can be managed better via linked include files rather than a scan directory. Let me know if you have any problems, the patch page/download can be found here.
10月3−4日
The plan was to stay in Tokyo a couple days and explore while I got oriented a little bit. After I felt comfortable I could take the Shinkansen to Hakata to see Kyushu. One of the first things I did after getting into my hotel was to go find a nice bowl of Ramen in Akihabara. I found a tiny little shop outside the train station and after staring at the menu long enough, a nice gentleman from behind gave me a hand figuring things out. I didn’t know that you ordered your dish via a vending machine by the door which would give you a ticket, that could then be given to the cook for a meal. I think it’s an excellent system and thoroughly enjoyed my ramen (although it’s always *so* much to eat I have trouble finishing).
Taking Cyan’s advice I checked out the Shibuya crossing, which was impressive. Full of hip young kids going everywhich way. Definitely my favorite area so far. I also checked out the emporor’s garden in Tokyo which is also very impressive in a completely different way. Deciding what to eat and do has also been a difficult point. There’s so much that it’s a bit overwhelming. I’ll also be coming back in a few weeks with David so I don’t want to do a lot of things that I might want to enjoy with him later. That being said, one could probably spend months (probably years) in Tokyo alone and still have many new things to do. Getting used to the subway and train system is both amazing and difficult. I think I’m getting the hang of it, but it’s definitely an adventure. So many people all going in different ways about as fast as they can. Cramming into trains, falling back out of them at the next stop. It’s a challenge to just not be in the way.
10月 1−2日
For the most part my flight from San Francisco to Tokyo was uneventful. We did hit some turbulence which was pointedly marked by the pilot telling everyone to buckle up and hold your babies to your chest (I had forgotten mine so I made due by clutching my laptop, same thing really). This prepared me for the worst, but it only turned out to be a few little bumps.
My first task was to recharge the minutes on my loaned phone and make sure it was in good working order before leaving the airport (Kudos to Cyan for getting me a phone). The lady attending the counter spoke english very well and asked me if she could see the phone. Hesitating a bit I agreed after she said she just wanted to see if it was activated. The next question of course was how I was able to get a phone and get it activated, which i simply stated that it was a friends phone for whom which I was adding minutes. This seemed completely reasonable to her and I had a working phone in no time.
The seconds stop to get a train ticket to Ueno via the Kesei Skyliner was a little more difficult as she spoke considerably less english, but again we made it through with little to no trouble. At this point I’m really nervous about using any Japanese so I’m pretty much going with the point and talk in broken words method. It’s not very elegant but it works ok.
Finding my hotel was by far the worst part of getting settled, I had reservations but finding the hotel was a complete mess. This was completely due to my own incompetence while navigating around town and failure to prepare printed maps in advance. I was going entirely off of memory of where I thought it was supposed to be on my Tokyo atlas and the street address I had printed out. To start with I got off at Akihabara station and started walking to Asakusa, when I really should have just transfered to a train to Asakusa. Walking the completely wrong direction also didn’t help much. After a couple hours I wandered into the hotel, feeling pretty exhausted and not very capable of making it anywhere in the next month.
NihonBashi Villa (my hotel) was a nice, small business hotel with private bath/toilet. The bed was a little hard, but it didn’t really matter because I couldn’t seem to get any rest anyways. I had expected staying awake on the plane to help me fall asleep but it didn’t seem to do the trick. I’ll try Lucas’ method of fucking up my schedule before I leave next time.
Apache-1.3.x doesn’t provide a way for you to “Unset” an ErrorDocument directive to it’s original value. I’m providing a patch that will add a “UnsetErrorDocument” directive to reset the value. This could happen when you have multiple configuration files that need to override each other. You can find more information and a download here. (Credit for the initial idea goes to Lucas)
I’ve released a small patch (read hack) that can help to prevent source code from being displayed by Apache. In theory this will work for any handler, but in specific it was designed with PHP in mind. The patch is intended to be a last line of defense if Apache attempts to display code with it’s default handler say due to a misconfiguration. It essentially filters out files with the defined extensions so that they cannot be handled by Apache’s default handler. This means you’ll have to hardcode your extensions into the patch. Please feel free to use this, but I’m not responsible for it not working as advertised. Lucas has posted a blog post a blog post about how we use something similar at Facebook. I’ve modified it for public release so hit me up with any problems.
Available via the MIT License
Download: ap_source_defense.patch
On the flight back from the PHP Works conference in Atlanta they had to reboot the screens on the back of everyone’s seats. This caught my attention when I saw the words “RedBoot” followed by the familiar Linux penguin. I would have liked to report that this was normal, but apparently they where having some “technical difficulties”, luckily for us we got an old fashioned demonstration of how to use a seat belt. Damn good thing too, as I really was having trouble figuring out how one end went in the other.
My first really long vacation in two years since working at facebook will be hapening this October as I spend the time exploring Japan. I will be doing some work, which hopefully means I’ll get to get some ground on the things I’ve been wanting to do. This also marks my graduation from my beginning Japanese course into intermediate classes!
I’m excited to be speaking the PHP Works 2007 conference this year in Atlanta. I’ll be giving my updated “APC @ Facebook” talk which will hopefully be of interest to the performance/scalability minded peeps out there. My cohort in all things PHP, Lucas, is also also giving a talk titled “Facebook Performance Caching“. I have to take the last all night flight after my Japanese Language test on Wednesday, so hopefully I won’t be too out of it for the talks that day!
I’m also interested in hearing “7 (or more) PHP Myths Defused” by Derick, “How PHP Ticks” by Sarah, “Graph-Oriented Programming with PHP” by Sebastian, “PHP::$unicode->i18n()” by Sarah…. ah crap those last two are both at the same time…. it always comes down to this….
About 6 months ago I purchased a new FastMac extended battery for my MacBook Pro, I was really happy with the little bit of extra time it gave me on my power hog of a laptop, but lately it would barely last the 45-minute trip on Caltrain from SF to Palo Alto. So I hooked up the miniBatterLogger app. According to this great bit of software, it seems the battery capacity is at about 50%. Not a very good life expectancy, considering the original batter which is at about the same number of cycles is at 90% and about twice as old as well.
My conversation with FastMac then went something like this….
——- (contents dumped from memory, so this isn’t the exact conversation)
…
FastMac: Well for a MacBook Pro this sounds like a reasonable reduction.
Me: [pause] 50% in 6 months is reasonable?
FastMac: Well yes… well let me ask someone in tech support please hold.
Me: [hold]
FastMac: I’ll tell you what’s happening. The software you’re using to measure the cycles in the battery isn’t changing from one batter to another. The cycles listed is what was on your original battery. Yep that’s definitely what’s happening.
Me: The software is telling me my battery cycles have changed when I switch out the original and the new one, so I’m pretty sure it’s counting the cycles correctly. If you want to tell me that 50% over 6 months is reasonable,
FastMac: please hold
Me: No wait! Let me finish… If you say it’s reasonable then we can forget this RMA but I won’t be buying any more of your batteries in the future.
FastMac: Oh, well these batteries are funny things. I mean the numbers and everything are really just jibberish… hold please….
Me: [hold]
FastMac: Sorry about that…
Me: Well the battery life is pretty much half of my original batter, that’s why I started measuring the capacity in the first place.
FastMac: Right, that’s exactly what we where going to ask you. … Well again it’s really hard to tell with these batteries, but it does sound like you actually have a problem here….
Me: [continues with RMA]
…
——-
A friend invited me to Giordano Bros in North Beach the other nigth for some food and drinks. The sandwiches consist of cole slaw, you’re choice of meet or cheese, and FRENCH FRIES!! This is definitely my kind of sandwich.