Archive for August, 2004
I just heard that I’m going to be speaking at ApacheCon 2004 in Las Vegas on Tuesday, November 16th. I’m going to be giving my “PHP 5 Sucks! PHP 5 Rocks!” talk. If you missed it at OSCON, here’s your second chance.
I will also be hosting an eBay BOF. Place and time TBA. If you’re an eBay developer, want to write applications that talk to our Web services APIs, or just interested in hearing stories about why eBay is cool, be sure to come on by. At our last BOF, we talked about clear plastic raincoats, so this one is bound to be just as interesting, if not more so.
There are quite a few excellent PHP talks this year at ApacheCon: Chris Shiflett’s speaking on PHP Security and co-presenting with Geoff Young on testing PHP applications using Perl. (Honest! It’s a serious talk. In fact, it may be the first PHP talk I expect to learn something from in years.)
Also, Christian Stocker is giving two talks on XML in PHP 5: “XML on Crack” and “XML on Speed.” (Really. I can’t make this stuff up.) Christian’s been a big force behind XML in PHP for years. If you’re at all interested in PHP and XML, you’ll want to listen to his presentations, as you’re bound to learn three or seven new tidbits you can use at home.
And, of course, Andi Gutmans is giving the obligitory “Introduction to PHP 5″ presentation. (He seems to come to quite a few more conferences now that he lives in Silicon Valley instead of Israel, doesn’t he?)
Popularity: 1% [?]
At work, I’m forced to use a Windows XP machine largely because eBay’s addicted to Outlook, but also because that’s the type of thing you need to do to play nice within a big company. However, that doesn’t mean I can’t route around this pain, so I installed VMWare and loaded up Suse Linux 9.1 in a virtual machine. Now I can hack on PHP in a somewhat familiar environment.
I say “somewhat” because this is my first time using Suse. I used to run Red Hat and then I moved to Mac OS X on my home machine, so it’s taking me a little bit of time to get used to Suse. (I picked Suse because my boss has a copy of the Suse CDs lying around and I decided it was easier to install from CDs than over the Internet.)
For one, Suse has a package for Apache 2.0, but not for Apache 1.3, which is a first for me. Also, Suse has organized its httpd.conf file in such a way that all the master file does is Include a variety of specialized child configuration files. Unfortuntately, this breaks the PHP install process.
When you run PHP’s make install command, it kicks off a request to apxs2 to handle the Apache 2.0 specific stuff. apxs2 loads in your httpd.conf file and looks for a LoadModule directive, so it knows how it should format the line it should add to httpd.conf to enable PHP.
However, apxs2 only slurps in the master file. It doesn’t resolve any of the Includes, so it can’t find any LoadModule lines. This triggers an error, it dies, and as a result, PHP aborts the install.
I reported this as an Apache bug, but it was closed with a status of “Won’t Fix” because they don’t want reimplement the parser inside of apxs2.
From looking at the apxs2 code, I see there is a simple work around, which is to put a commented out LoadModule directive in the master file. apxs2 allows you to fool it into thinking it’s found a valid line, and you can go from there. You still need to fix up your configuration file, but at least the install doesn’t die.
However, when I tried to report this back to Suse, I was totally defeated. I could find no place anywhere on their Web site to access a bug database. Hum… That seems to defeat the notion of open source as a environment for parallel debugging. Oh well.
So I’ll blog it and hope that someone who Googles for “At least one LoadModule Directive already has to exist” will find this.
PS: Some further searching has uncovered that Debian was also affected by this issue. I don’t know it they’ve fixed it, however.
Popularity: 100% [?]
After a Titanic struggle, I have managed to make a successful SOAP call to eBay using PEAR::SOAP. I’m in the process of cleaning up my code, but once it’s all nice, I’ll release version 0.1 of eBaySOAP.
Right now PHP 5 is a requirement, since I ended up aggregating the SOAP client inside a PHP class to make things easier for developers. For some reason, PEAR::SOAP isn’t setting a namespace for our parameters, so I need to intercept any parameters and create SOAP_Value objects for them with the proper namespace. If I use __call(), I can step in and do this transparently and you’re none the wiser.
I bet I can backport this to PHP 4, if I use the overload extension. It shouldn’t be too hard, especially as I’m using the PHP 4 version of PEAR::SOAP.
I also had to make a small patch to PEAR::SOAP. Right now, if PEAR::SOAP sees a namespace with a colon (:) in it, it presumes it’s a qualified name (qname for short) of the format prefix:localpart. In eBay’s case, we have a namespace of urn:ebay:API:eBayAPI. This isn’t a qname, but PEAR::SOAP thinks it is and incorrectly breaks it apart. My patch checks to see if the namespace beings with urn: and tells PEAR::SOAP to ignore it.
I need to do some digging to see exactly why PEAR::SOAP does this and why it doesn’t break namespaces that look like URLs also.
So, next steps:
- Clean up code and release eBaySOAP.
- Submit patch to PEAR::SOAP.
- Backport eBaySOAP to work with PHP 4.
- Investigate PHP 5 version of PEAR::SOAP.
- Investigate ext/SOAP extension in greater detail. I’ve done some preliminary work here, but I’m finding bugs and they’re hard to fix at work since I’m using Windows.
- Look to patch PEAR::SOAP to automatically add the correct namespace to parameters, so I don’t need to do it myself.
- Write up an article, so everyone can learn how cool eBaySOAP is.
If you’re interested in this topic, please add your feedback below, so I can use it to guide my to do list.
Popularity: 1% [?]