Xdebug & phpize for PHP on FreeBSD

I ran into a few problems trying to install Xdebug into PHP on both FreeBSD 5.2 and FreeBSD 5.4. My research led me to this PHP bug thread and the proper solution. Here’s a quick summary to get you going with Xdebug:

Xdebug is installed via phpize, and phpize has some requirements:

  • autoconf: 2.13
  • automake: 1.4+
  • libtool: 1.4.x+ (except 1.4.2)
  • bison: 1.28 (preferred), 1.35, or 1.75
  • flex: 2.5.4

I was able to get mine up and running with the following versions:

  • autoconf: 2.59_2
  • automake: 1.9.5
  • libtool: 1.5.10_1
  • bison: 1.75_2
  • flex: 2.5.4

However, the ports packages for autoconf, automake, and libtool that come with FreeBSD are installed into non-standard locations, so phpize is unable to find them. This is easily fixed with symlinks (NOTE: symlinks will vary depending on which versions you have installed):
ln -s /usr/local/bin/aclocal19 /usr/local/bin/aclocal
ln -s /usr/local/bin/automake19 /usr/local/bin/automake
ln -s /usr/local/bin/autoconf259 /usr/local/bin/autoconf
ln -s /usr/local/bin/autoheader259 /usr/local/bin/autoheader
ln -s /usr/local/bin/libtool15 /usr/local/bin/libtool
ln -s /usr/local/bin/libtoolize15 /usr/local/bin/libtoolize
ln -s /usr/local/share/aclocal19/ /usr/local/share/aclocal
ln -s /usr/local/share/aclocal19/libtool15.m4 /usr/local/share/aclocal19/libtool.m4

Now, assuming you have all the correct versions installed and paths present, phpize should be able to find everything and Xdebug should install as expected:
# phpize
# ./configure --enable-xdebug
# make
# cp modules/xdebug.so /usr/local/lib/php/extensions

  • Add the following to php.ini:
    zend_extension="/usr/local/lib/php/extensions/xdebug.so"
  • Restart your webserver
  • Check the output of phpinfo() to make sure Xdebug is properly loaded

Bob Moog (1934 – 2005)

Bob Moog
ASHEVILLE, N.C. – August 21, 2005 – Bob died this afternoon at his home in Asheville, N.C. He was 71. Bob was diagnosed with brain cancer (glioblastoma multiforme or GBM) in late April 2005. He had received both radiation treatment and chemotherapy to help combat the disease. He is survived by his wife, Ileana, his five children, Laura Moog Lanier, Matthew Moog, Michelle Moog-Koussa, Renee Moog, and Miranda Richmond; and the mother of his children, Shirleigh Moog.

Bob was warm and outgoing. He enjoyed meeting people from all over the world. He especially appreciated what Ileana referred to as “the magical connection” between music-makers and their instruments.

No public memorial is planned. Fans and friends can direct their sympathies or remembrances to www.caringbridge.com/visit/bobmoog.

Bob’s family has established The Bob Moog Foundation dedicated to the Advancement of Electronic Music in his memory. Many of his longtime collaborators including musicians, engineers and educators have agreed to sit on its executive board including David Borden, Wendy Carlos, Joel Chadabpe, John Eaton, David Mash, and Rick Wakeman. For more information about the foundation, contact Matthew Moog at mattmoog@yahoo.com.

We’ll miss you Bob.

FreeBSD: HOWTO install vim from ports WITHOUT X-Windows.

I’m normally a manually-compile-from-source type of guy, but I thought I’d give FreeBSD’s ports system a try. Right away I ran into an annoyance, and something that underscores a constant battle: trading customizability for ease-of-use. Yes, ports makes installing things easier, but you lose a certain level of control and customizability.

Installing vim from ports seems easy enough, right? Sure, if you want tons of bloat included! A simple make; make install in /usr/ports/editors/vim started a flurry of downloads for things like X11toolkits, X11R6.8.2, etc, etc.. in other words, installing vim from ports was trying to also install X-Windows on my machine!! This is a server, I do NOT need the bloat of X-Windows simply to run a frickin’ text editor like vim.

So, after some research, I discovered that you can in fact control port installs with various arguments. Here’s how I installed vim:
cd /usr/ports/editors/vim
make WITHOUT_X11=yes
make WITHOUT_X11=yes install

PRESTO, a nice, clean, bloat-free, non-X-Windows install of vim. As a general tip, you can look inside the port’s Makefile to see various arguments that you can pass in.

A caveat though, if you ever upgrade all your ports with portupgrade, all of your ports will upgrade with the default arguments. So if I ran portupgrade and a new version of vim was available, it would install vim and all the X-Windows crap along with it.

Luckily, FreeBSD provides a way to automatically provide arguments to auto-upgrades via portupgrade: Simply open up /usr/local/etc/pkgtools.conf and fill in the MAKE_ARGS tag like so:
MAKE_ARGS = {
'editors/vim' => 'WITHOUT_X11=YES',
}

Now the next time you upgrade vim using portupgrade, the WITHOUT_X11 argument will be automatically included, so you won’t have to worry about all that extra X11 crap being included in your install.

RealTek RTL8100S LAN on FreeBSD 5.4: no carrier

I just installed FreeBSD 5.4 on my Abit AA8-DuraMax, but I’ve run into some troubles with my networking. It seems that the on-board NIC doesn’t properly detect when a cable is plugged in. ifconfig shows it as “status: no carrier

I know it’s not the router or the cable, because they both work fine on other machines. The 8100S chipset is listed as supported on the FreeBSD 5.4 Hardware compatibility list, as well as the man pages for the re driver.

Some other weirdness: If I plug the ethernet cable from the BSD machine to another machine’s NIC, it is properly detected. It only doesn’t detect when connected to my router. Also, if I manually set the card to 10baseT/UTP using ifconfig’s media parameter, it also works. It doesn’t work on autoselect, or any other media setting besides 10baseT/UTP.

Anyone have any ideas? Some info:
ifconfig:
--------------------------------------
re0: flags=8843<up ,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=18<vlan_mtu ,VLAN_HWTAAGGING>
inet 192.168.1.31 netmask 0xffffff00 broadcast 192.168.1.255
inet6 ...
ether 00:50:8d:eb:e5:be
media: Ethernet autoselect (none)
status: no carrier
lo0: flags=8049<up ,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4Relevant dmesg:
--------------------------------------
re0: <realtek 8169S Single-chip Gigabit Ethernet> port 0xee00-0xeeff mem 0xfbfff000-0xfbfff0ff irc 16 at device 1.0 on pci1
miibus0: <mii bus> on re0
rgephy0: <rtl8169s /8110S media interface> on miibus0
rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto
re0: Ethernet address: 00:50:8d:eb:e5:bepciconf -lv:
--------------------------------------
re0@pci1:1:0: class=0x020000 card=0x1039147b chip=0x816910ec rev=0x10 hdr=0x00
vendor = 'Realtek Semiconductor'
device = 'RTL8169 Gigabit Ethernet Adapter'
class = network
subclass = ethernet
 
pciconf -r pci1:1:0 0:0xff
--------------------------------------
816910ec 02b00007 02000010 00002008
0000ee01 fbfff000 00000000 00000000
00000000 00000000 00000000 1039147b
00000000 000000dc 00000000 40200110
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 f7c20001
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000