This forum is no longer active. Please post your questions to our new community site

Forums General

enable mssql php?

Subscribe to enable mssql php? 9 post(s), 4 voice(s)

 
Avatar mjf 7 post(s)

I have installed the mediawiki wamp stack – it all works great, and I’ve been using mysql for other things too. We also have MS SQL Server here, and I’d like to access that aw well.

I have enabled php_mssql.dll in php.ini, but still get ‘Call to undefined function mssql_connect()’.

Does php need to be compiled with —with-mssql[=DIR], as indicated on php.net?
phpinfo() mentions ODBC but not mssql, so I’m guessing this is the case.

I suppose this means I need to get the source and replace the php that came from bitnami?

Thanks

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

This webpage could be helpful for you: http://userscape.com/helpdesk/index.php?pg=kb.p… Could you try to download the ntwdblib.dll library and copy in the < installdir >/apache2/bin folder?

 
Avatar mjf 7 post(s)

I did that but get the same message. Since phpinfo does not list mssql, I’m pretty sure support for it is not compiled in, but it would be nice if someone was able to confirm that before I jump through the hoops of setting up what is needed to recompile.

thanks

 
Avatar victoria Administrator 134 post(s)

Hi,

We can confirm that PHP is compiled with mssql support. Did you restart Apache once you copied the ntwdblib.dll? I have just tested it and MSSQL support appears in phpinfo. These are the steps I followed:

1. Install BitNami WAMPStack.
2. Go to php.ini and enable php_mssql.dll extension.
3. Copy the ntwdblib.dll library from the php directory to the apache/bin directory.
4. From the Windows Start Menu stop BitNami WAMPStack services (if you are on Windows Vista or later, you will need to right-click and select “Run as Administrator”).
5. From the Windows Start Menu start BitNami WAMPStack services (if you are on Windows Vista or later, you will need to right-click and select “Run as Administrator”).
6. Now I can see MSSQL Support when executing phpinfo().

Regards,

Victoria.

 
Avatar mjf 7 post(s)

Sorry for the tardy reply – I’ve been away and only just got back to this.
Yes, that did the trick – must have neglected to restart Apache…oops!

Thanks much!

Mickey

 
Avatar gerhard.tinned 2 post(s)

Hi!

I have a similar problem. I have installed MAMP Stack on my Mac and i would also need the mssql module activated in php.

I found a very nice explanation about how to compile the mssql on mac. But i did not get it to work on my Mac with Mac OS X 10.6. :-(

First i got a couple of error messages while compiling the mssql module. But then i finaly got it to compile. The module is very small (about 4kb) and i get a error message when i add it to the php path and start the webserver.

Maybe there is something i did wrong? To explain, the php version of trhe MAMP STACK is 5.2.10 and i used the same version of PHP to compile the mssql module.

The URL of the description …
Connecting to MS SQL server from PHP using MAMP on OSX

The error message from apache …
PHP Warning: PHP Startup: Unable to load dynamic library ‘/……/lib/php/extensions/mssql.so’ – (null) in Unknown on line

Is there any mssql module ready compiled or any more detailed description on how i gen get it into the MAMP Stack?

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

It seems that the module is not correctly compiled. We will add to include the pre-compiled module in our TO DO list.

 
Avatar gerhard.tinned 2 post(s)

Its now a long time since this tread was updated the last time. Is there any news on the MSSQL issue? Is there already a plan whan it will be included?

Thanks!

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Sorry we are not currently shipping this module. We will try to post a guide in the Wiki to know how to install it manually.

Forums General