[freetds] Mac OS X 10.4/FreeTDS .63/PHP 4.4.0 Configuration

Dennis Crall dennis-crall at uiowa.edu
Mon Aug 22 16:54:02 EDT 2005


Thank you. I was able to get the mssql_ calls working. Both by using the
dl() function, and by compiling php such that the mssql library was not a
shared library (--with-mssql=/usr/local/freetds).

However, I could not get the settings in the php.ini file to take effect.
This is one thing that has always confused me about PHP on OS X -- it
doesn't seem to use a php.ini file. By default there is a php.ini.default in
/private/etc/ . I saved a copy as php.ini, recompiled php with the correct
path, and restarted apache. This had no apparent effect.

Can someone explain what OS X uses in lieu of php.ini?

Also, can anyone recommend a good resource for configuring a PHP
installation? Normally, I think the php.net documentation is excellent, but
I think it falls a bit short in this area.

Again, I apologize for wandering off-topic. I'll take any further queries
off-line or to another forum.

Thank you for the help,


On 8/22/05 1:31 PM, "Daniel Fazekas" <fdsubs at t-online.hu> wrote:

> On Aug 22, 2005, at 16:31, Dennis Crall wrote:
>> --with-iodbc=/usr --with-mssql=shared,/usr/local/freetds   --with-apxs
> [...]
>> However, when I make a call to one of PHP's mssql_ functions, I
>> receive the
>> following error: "Fatal error: Call to undefined function:
>> mssql_connect()".
> That sounds simple enough. Since you instructed php's configure
> script to build the mssql extension as a dynamically loadable shared
> library, you'll have to tell it to actually load it.
> There are many ways and places to do that; one of the advantages of
> having extensions in a shared library.
> You can add a line saying
> extension=mssql.so
> to your php.ini file. You told php to look for that in /etc, so it
> should be in /etc/php.ini
> Also make sure your extension_dir setting points to the right place.
> If you don't mess with it and just let php use its defaults, it will
> automatically point to the correct folder.
> Since you are using Apache 1, as an alternate option, the dl()
> function is also available. You can write dl('mssql.so'); inside your
> php script to load it.
> Check your PHP manual for even more places and ways to load a shared
> extension if you are so inclined.
>> Is anyone using FreeTDS to support the mssql functionality in PHP
>> on OS X?
> It's the only option for building the PHP mssql extension on Mac OS X
> - or any other Unix system, for that matter.
> --
> fds
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds

More information about the FreeTDS mailing list