2007/3/20, Allen <[EMAIL PROTECTED]>: > > I regularly connect PHP to MSSQL server with a different technique: > FreeTDS in the ports tree. It's quite simple.
Thanks! It worked! I built the freetds package from ports, and using "sqsh" (from packages) I was able to connect to the customer's SQLServer database. Instead of building php from the ports (I had problems doing that, I tell you at the end of this message), I installed the package "php4-sybase_ct" and that enables the mssql_* functions. I tested the connection from a php program and it worked. The only "problem" was that PHP issued the following warning: PHP Warning: Unknown(): Unable to load dynamic library '/var/www/lib/php/modules/odbc.so' - Can't open file in Unknown on line 0 I then installed the "php4-odbc" package and the warning did not appear anymore. So the final solution for me in my OpenBSD 3.8 was: 1. Install FreeTDS from ports 2. Install "sqsh" to test connectivity 3. Install package "php4-sybase_ct" 3. Install package "php4-odbc" And that's all! With this configuration I can access a SQLServer from OpenBSD. The problem I had when tried to compile php4 (or php5) from ports is this: mach:/usr/ports/www/php4# /usr/bin/make ===> www/php4/core ===> Checking files for php4-core-4.4.0p0 >> php-4.4.0.tar.gz doesn't seem to exist on this system. >> Attempting to fetch /usr/ports/distfiles/php-4.4.0.tar.gz from http://us2.php.net/distributions/ . 100% |**************************************************| 6133 00:00 >> Size does not match for /usr/ports/distfiles/php-4.4.0.tar.gz /bin/sh: test: 30000: unexpected operator/operand *** Error code 2 Same happens with php5. Anyone knows what is the problem here? I tried from a 4.0 machine and I got the same problem. Regards -- Joaquin Herrero

