View Full Version : php5-mssql
hogman23
January 31st, 2007, 12:59 PM
I upgraded a server to Edgy and had some problems with php. I need php5-mssql installed but it tells me "Package php5-mssql is not available, but is referred to by another package.". How can I tell what package it is referred to now?
Thanks
az
January 31st, 2007, 01:15 PM
There never has been a php5-mssql package.
hogman23
January 31st, 2007, 01:20 PM
There never has been a php5-mssql package.
This is the output from 'dpkg -l php5-mssql' on my dapper server:
ii php5-mssql 5.1.2-1ubuntu3.4 MSSQL module for php5
This is the output from the same on my Edgy Server:
pn php5-mssql <none> (no description available)
It is installed on my Dapper server, but what package do you use to mssql on Edgy???
hogman23
January 31st, 2007, 01:23 PM
This is strange, it looks like they combined the php5-mssql install with something else, but I can't figure out what.
hogman23
January 31st, 2007, 03:45 PM
Ok, here is the fix to get php5-mssql installed:
Install the Debian Package tools:
apt-get install build-essential debhelper
Then, download the PHP5 Source Files:
apt-get source php5
Get the dependencies for building PHP5:
apt-get build-dep php5
cd to the directory php5-5.1.2/debian and vi the file modulelist. Insert a line above the one that says:
mysql MySQL
with the contents
mssql MSSQL
Next, edit the file rules and search for –with-mysql=shared,/usr
Insert the following above it:
–with-mssql=shared,/usr
Make sure not to forget the backslash on the end.Now, we must edit the “control” file in the same directory. Add this to the end of the file:
Package: php5-mssql
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, ${php:Depends}, php5-common (= ${Source-Version})
Description: MSSQL module for php5
This package provides a module for MSSQL using FreeTDS.
.
PHP5 is an HTML-embedded scripting language. Much of its syntax is borrowed
from C, Java and Perl with a couple of unique PHP-specific features thrown
in. The goal of the language is to allow web developers to write
dynamically generated pages quickly.
Move up a directory:
cd ..
Now run:
dpkg-buildpackage
This will compile PHP5 and create the debs in the parent directory. This process takes a while, so relax.
When that is finished, cd to the parent directory and you will see your deb files.
Now, to install php5-mssql:
dpkg -i php5-mssql_5.1.6-1ubuntu2.1_i386.deb
The majority of the information from this post came from the following URL:
http://panthar.org/2006/06/15/php-with-mssql-on-ubuntu-606/
az
January 31st, 2007, 04:49 PM
Why is that dissabled in the source? Are there licencing issues?
hogman23
January 31st, 2007, 06:03 PM
I'm not sure if it's a bug or what, but we had no problems installing it when the server was Dapper. When we did an in-place upgrade to Edgy, the package wasn't available anymore. So either, the package isn't there in the edgy repos, or there is another package that installs php5-mssql, but I couldn't find it if there is.
hogman23
January 31st, 2007, 06:05 PM
Oh yeah, another "note to self", Don't compile PHP5 from the server, because for some reason it uninstalls PHP5 from the server when you do that and you have to go back and reinstall everything. Also, when PHP5 get's uninstalled, or course it removes PHP5 from mods-enabled in Apache2.
That took me 10 minutes to figure out...DUH!
az
January 31st, 2007, 06:15 PM
So either, the package isn't there in the edgy repos, or there is another package that installs php5-mssql, but I couldn't find it if there is.
There is no php5-mssql package in any release of Ubuntu.
hogman23
January 31st, 2007, 06:53 PM
There is no php5-mssql package in any release of Ubuntu.
Hmm, I wish I knew what installed it on the old server then, that would have saved me a bunch of work.
hogman23
February 27th, 2007, 05:44 PM
Problem has been reported as a bug...We'll see what happens, maybe they will at least give an answer as to why it isn't available.
silkstorm
April 3rd, 2007, 12:15 PM
Ok, here is the fix to get php5-mssql installed:
...
This worked flawlessly on the latest Ubuntu feisty. Thank you! I also would love to see php5-mssql in the Ubuntu distibution.
dim_par
April 21st, 2007, 02:15 PM
php5-source does not compile in feisty.
These are the errors before the compilation stops
ln: creating symbolic link `debian/php5-imap/usr/share/doc/php5-imap' to `php5-common': No such file or directory
ln: creating symbolic link `debian/php5-interbase/usr/share/doc/php5-interbase' to `php5-common': No such file or directory
ln: creating symbolic link `debian/php5-mcrypt/usr/share/doc/php5-mcrypt' to `php5-common': No such file or directory
ln: creating symbolic link `debian/php5-xsl/usr/share/doc/php5-xsl' to `php5-common': No such file or directory
make: *** [binary-arch] Error 1
Any help please?
dim_par
April 23rd, 2007, 10:03 AM
False alarm!
I forgot to leave a blank line before inserting to the debian/control file.
Thanks anyway
hogman23
May 22nd, 2007, 09:28 AM
Update: They have reviewed the complaint that several of us have voiced in the bug that we reported and are supposed to be putting the php5-mssql package back in the repository. Who knows when this will happen, but they are supposed to be working on it.
:D
ram.coelho
May 29th, 2007, 09:33 AM
Does anyone have this .deb binary ready to dpkg -i? It would be nice to have the url. I could mirror it and post the new location back here and start to spread it around.
mgranado
September 21st, 2007, 05:21 PM
Ok, i tried this, and worked fine.
sudo apt-get install php5-sysbase
this package looks like to be what everyone here is looking for....
Hope I could help
diggity
September 21st, 2007, 05:42 PM
Just so there's no confusion, the correct package is php5-sybase
you will need to use the sybase functions instead of the mssql functions in your php code.
mgranado
September 23rd, 2007, 09:18 PM
No just that, if you take a look in the description you gonna see
. This package provides a module for Sybase and Microsoft SQL Server database connections directly from PHP scripts.
so all the mssql functions are there
jolmash
April 18th, 2008, 09:30 AM
Everything works FIIINE!!! Thanks!!!!!
bprof
April 23rd, 2008, 04:56 PM
I've tried the steps mentioned and I was able to connect but I can't query the DB, every time I try to run a query I'm getting this warning:
Warning: mssql_query(): supplied argument is not a valid Sybase-Link resource
Any idea?
no_brakes
May 29th, 2008, 07:15 AM
Note that php5-sybase doesn't give you everything php-mssql does. It doesn't support running stored procedures, and code I have running under php-mssql needed modifying to call different functions under sybase.
nevermind_quack
June 17th, 2008, 02:31 PM
Trying to install MDB2_Driver_mssql returns the error: pear/MDB2_Driver_mssql requires PHP extension "mssql"
php5-sybase will work with this package, but it doesn't know it -- to skip dependency checking in the pear install do:
pear install --nodeps MDB2_Driver_mssql
The driver also has a line to check for mssql support in PHP, it will return error: extension mssql is not compiled into PHP
Comment out the test at /usr/share/php/MDB2/Driver/mssql.php line 314 (or search for text "is not compiled into PHP").
Everything we've tried so far works great!
see http://pear.php.net/bugs/bug.php?id=12697
pablosp
August 21st, 2008, 05:22 PM
works perfectly in ubuntu hardy.
thank you very much..
pcmofo
October 29th, 2008, 02:25 PM
Get the dependencies for building PHP5:
apt-get build-dep php5
I am stuck on this step... when I enter it in I get this result....
apt-get build-dep php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libc-client-dev is a virtual package provided by:
libc-client2007b-dev 7:2007b~dfsg-3
libc-client2007-dev 7:2007~dfsg-1
You should explicitly select one to install.
E: Package libc-client-dev has no installation candidate
E: Failed to satisfy Build-Depends dependency for php5: libc-client-dev
The server is running hardy and is brand new... also it is on a DMZ... which was effecting its ability to download patches... is this what is wrong with it now? it looks like it is working then fails...
Any ideas?
ethos84
March 25th, 2009, 12:34 PM
Well I think I followed the guide properly.
How can I test / use this? :D
liquidApe
July 29th, 2009, 02:02 PM
Has anybody gotten this working on 9.04 Jaunty Jackalope?
creeves1982
August 24th, 2009, 11:15 AM
There is no apt-get install php5-mssql
there is aptitiude install php5-mssql. That is most likely what you were thinking of
sathyendra
November 3rd, 2011, 01:27 AM
For installing MSSQL Drivers
sudo install apt-get install php5-mssql (will automaticly select 'php5-sybase' for installing )
sudo pear install --nodeps MDB2_Driver_mssql
restart apache
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.