Archive for October 15th, 2004
PHP5 killed my inner child
Ok. I just had the hardest time screwing with Debian “Woody”. Got a good base install. Apache 1.3.29 and PHP 4.1.x. A little old but useable. Had to get connected to MSSQL to run some queries from inside my code. All is good. Then I had to port tons of code I wrote for PHP5 on my Windows machine running Apache 2 for Win32 (and Apache 1 compiled under Cygwin). And so the nightmare begain.
After porting that site I noticed I used a lot of the new DOM and XSLT libraries (not to be confused with the older XSL libraries) and in fact used them almost entirely for that code. After I seen how long it would take me to port it, I decided to break the debian package system and upgrade them manualy. I first took a look at APT-GET.ORG and I was able to find a few deb servers that had php5 debs. I tried them but they all but I counldn’t find any that had support for the MSSQL libs or even updated the libxml to libxml2 completely or installed the latest libxslt libs.
I was forced to build them all myself. I got all the libs and installed them. No big deal there. Then I grabbed the latest PHP 5. Took me forever to get all the compiler options figured out. Ended up using this:
./configure --prefix=/usr/local --with-apxs=/usr/bin/apxs --with-ming=/usr/local --with-gd --with-png-dir=usr/local --enable-gd-native-ttf --with-xml --with-libxml-dir=/usr/local --with-expat-dir=/usr/local/lib --with-dom=/usr/local --enable-ftp --enable-shared=yes --enable-static=yes --with-xsl=/usr/local --enable-track-vars --enable-sockets --enable-wddx --with-xmlrpc --with-zlib-dir=/usr/local/include --with-mssql=/usr/local/
It took me forever to get all the dependencies fixed (since I was using an older and securer distrobution). I also had to figure out this damn libiconv problem. Apperantly it has happened before.
After I got it to build, I had to figure out why I was getting this stupid error that kept comming up saying that I couldn’t talk to the SQL server. I thought it was the SQL server. I ripped its permisions apart in there but couldn’t find any problems. I went back and checked my FreeTDS libs. I guess while upgrading them they replaced the freetds.conf file and so it set itself back to protocal 5.0 (default which is for Sybase) . I changed it back up to 8.0 and sure anough it worked.
Long day. Need sleep.
- Zac