[needs-packaging] Please package php5-mssql

Bug #87063 reported by Richard J. Turner
42
This bug affects 3 people
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Fix Released
Wishlist
Unassigned
Hardy
Invalid
Wishlist
Unassigned

Bug Description

Using freetds it's fairly trivial to install an appropriate mssql.so, but it still requires downloading and compiling PHP and when a security update for the standard PHP packages is released, having a self-compiled mssql.so causes a seg fault.

I'm trying to migrate a load of PHP projects away from MS SQL Server, but that still requires support in the interim, so please could a php5-mssql package be added to the other PHP packages available?

Revision history for this message
hogman23 (rsturdivant) wrote :

Is anyone working on this????? Today makes the third PHP5 update that has jacked up my system and forced me to compile from source to get the php5-mssql package. Everytime php5 is updated it removes php5-mssql. PLEASE FIX THIS!!!!

Revision history for this message
compucoder (roncr) wrote :

I also agree with this. I am a php web developer and this is a pain. My company supports MYSQL and MSSQL backends and I use Linux at work and have to go through the hassle of building my own mssql module. I do use this method here: http://panthar.org/2006/06/15/php-with-mssql-on-ubuntu-606/ This works great and still works fine on Feisty. I think though that you guys could do this and include it in the repository for everyone to enjoy.

Btw, when connecting to MSSQL from Linux the dates are always screwed up. You need to set the mssql.datetimeconvert to off or you'll get 1969's all over the place.

Revision history for this message
Ralph Janke (txwikinger) wrote :

Thanks for the bug report.

I don't think it is necessary to create a package php5-mssql since the mssql functions are included in the package php5-sybase.

Do you agree to close the bug?

Changed in php5:
assignee: nobody → rjanke
status: Unconfirmed → Needs Info
Revision history for this message
Richard J. Turner (richard-zygous) wrote :

No, they really aren't. If you have to use MS SQL Server in an "enterprise" environment, as is the case for me, the Sybase extension isn't up to the job. The mssql_* functions it provides are in fact aliases to sybase_* functions, and they don't behave in the same way as the true mssql_* functions, nor are they as reliable when used with MS SQL Server databases. I'm well aware that Sybase and MS SQL Server have the same heritage, but they have developed away from each other now.

I can understand how one might want to keep Ubuntu as free as possible from anything Microsoft, but that's not really very practical in a distribution that is trying to foster adoption in the "enterprise". It's not as if the distribution will be "dirty" if it includes a php5-mssql package.

As soon as possible (although sadly we're talking years yet) my company will be moving away from using MS SQL Server, preferring Free/Open Source RDBMSs, but in the meantime it's very important that we have good performance from the correct drivers, not just a basic level of compatibility provided by something similar.

Compilation of the real MS SQL Server extension is so easy, surely there's no good reason not to create the php5-mssql package?

Revision history for this message
Ralph Janke (txwikinger) wrote :

This explanation is good enough for me. I confirm that the package is missing in the repositories and there is a request of packaging them.

Changed in php5:
assignee: rjanke → nobody
status: Needs Info → Confirmed
Revision history for this message
Richard J. Turner (richard-zygous) wrote :

Great stuff! Thank you :)

Revision history for this message
Ralph Janke (txwikinger) wrote :

Here is the debdiff that automatically creates the package php5-mssql containing the mssql extension for php5 when php5 is packaged.

Ralph Janke (txwikinger)
Changed in php5:
assignee: nobody → txwikinger
status: Confirmed → In Progress
assignee: txwikinger → nobody
status: In Progress → Confirmed
Revision history for this message
Daniel Walker (daniel-kettonlane) wrote :

Am I missing something, here? The paths against each diff statement, in this debdiff, seem to be all over the place. I certainly cannot run it as it is.

Revision history for this message
Richard J. Turner (richard-zygous) wrote :

I've just used the instructions compucoder linked to in comment 2 and they worked like a charm. The modifications the need to be made to the config files in the 'debian' directory of the source package are minimal.

Revision history for this message
Daniel Walker (daniel-kettonlane) wrote :

Following Robert Holak's steps, which you mention, here, also fails during the checking stage of the package build, with:

configure: error: recode extension can not be configured together with: imap mysql

Revision history for this message
Daniel Walker (daniel-kettonlane) wrote :

So, unistalling the installed php5-imap package with 'apt-get remove', before doing the build seems to fix that.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Unsubscribing Ubuntu Sponsors for main from this bug as the patch seems not to work yet?

Revision history for this message
Marc Guyer (marc-resiteit) wrote :

Any progress made here? I've been trying to use the sybase extension with limited success. I intermittently get "Read from SQL server failed." My research has led me to conclude that the solution is to use the true mssql extension. A php5-mssql package would be a huge help.

Revision history for this message
Ondřej Surý (ondrej) wrote :

It won't be packaged for dapper/edgy/feisty.

Maybe for feisty if somebody will do that. I'll try to poke sean (or myself) to package it for Debian and maybe it will get propagated to gutsy.

Anyway is it really that hard to do:

apt-get install php5-dev
cp -a php-5.x.x/ext/mssql /tmp/
cd /tmp/mssql/
phpize
configure
make
make install

???

Revision history for this message
Marc Guyer (marc-resiteit) wrote :

No, it's not but I have the same problem with that at hogman23 2007-03-08. Whenever there is a php update mssql uninstalls and apt-get segfaults.

Revision history for this message
Ondřej Surý (ondrej) wrote :

That's a problem when you recompile whole php5 and add php5-mssql .deb package.

If you compile just one module, it should not happen. (Should means that security update should not change ABI, but you never know when dealing with php upstream.)

Revision history for this message
Ondřej Surý (ondrej) wrote :

BTW: That provided patch is wrong in some details.

It should use modulelist first and just add pdo_mssql to extramodulelist.

--without-mssql is not needed

Some typos in control file (cut&paste from mysql entry).

It doesn't ensure compatibility with existing sybase module users.

Revision history for this message
Ondřej Surý (ondrej) wrote :

It should have been:

Maybe for gutsy... (not feisty)

Revision history for this message
Ondřej Surý (ondrej) wrote :

RJT said:
> The mssql_* functions it provides are in fact aliases to sybase_* functions,
> and they don't behave in the same way as the true mssql_* functions,
> nor are they as reliable when used with MS SQL Server databases.

How do they not behave same way?

What's those reliability problems?

sybase and mssql extensions both use freetds library to connect to databases, so only difference is not in database server, but in way freetds library is used.

Maybe you could elaborate more on what problems you are experiencing when using sybase extension?

Revision history for this message
Marc Guyer (marc-resiteit) wrote :

I can't speak for RJT but in my limited experience I get "Read from SQL server failed." about 50% of the time when querying a db on sql server 2005. Pretty sure that's a client error.

Revision history for this message
A.B. (abadr) wrote :

I just want to add my voice to the need to package the MSSQL extension. I think it would help Ubuntu to break into the server market (Ubuntu specifically, not Linux). I have a very big client that uses MSSQL and has no intention of changing to any other database system in the foreseeable future. The system administrators were very open to setting Linux PHP application servers and they specifically asked about Ubuntu and because they heard good things about it. However having to compile extensions for it is not an option for them. Having spend a couple of days figuring out how to compile it myself I have to agree. So come deployment time, if the extension isn't there in the repo they'll have to look elsewhere.

Revision history for this message
Brent (glitch13) wrote :

I would also like to voice a need for a php5-mssql package. I would like to start testing Ubuntu for our production servers and can't due to a requirement for our php apps to interface with the mssql backend of our accounting package.

Revision history for this message
Udo Rader (udo-rader) wrote :

any updates on this? Using current gutsy beta I see that php5-mssql is still missing.

Making it available is absolutely trivial, just see the many postings on the net regarding ubuntu & php5-mssql, eg. http://ubuntuforums.org/showthread.php?t=350269 for an example.

This is extremely annoying because there is neither a technical nor a license issue here. php5-mssql is as free as php5-mysql or any other php5-* module is, so what's the point in not building it?

Revision history for this message
Jim Qode (jimqode) wrote :

This is really annoying for php developers. please up the importance of this bug.

Mathias Gug (mathiaz)
Changed in php5:
importance: Undecided → Wishlist
status: Confirmed → Triaged
Revision history for this message
Simon Dickson (simon-sim) wrote :

Just wish to add my vote to getting this sorted. It's one annoyance that need not be.

Revision history for this message
Steve Hoeksema (launchpad-seven) wrote :

Another request for php5-mssql (and PDO) for me. Compiling it myself is a royal PITA, especially for a production system. Thanks.

Changed in php5:
assignee: nobody → ubuntu-server
Revision history for this message
S Lowace (slow-acedsl) wrote :

Please, please, please. As far as multiplatform interoperability goes, this is just as important to us as a working Samba implementation. The MS SQL server will probably be the last surviving Windows machine in my org, and probably in many others too, and the php-mssql extension really works well once it's set up!

Revision history for this message
Ondřej Surý (ondrej) wrote :

Debian switched to mssql code for sybase and mssql extension in 5.2.4-1. When hardy pulls our updates you will get mssql code in place. Meanwhile please stop this useless rant. Addin more "pleases" will get us nowhere.

Revision history for this message
hogman23 (rsturdivant) wrote :

A simple answer to all of these pleas for help would have stopped the "useless ranting" a long time ago. Maybe instead of ignoring all of the requests, you should respond to them with some progress updates. Despite what you may think...none of us are clairvoyant!!!

Revision history for this message
Daniel Hahler (blueyed) wrote :

I'm closing this as Fixed for Hardy: php5-sybase (5.2.4-2ubuntu1 and later) provides php5-mssql now.
Thank you.

Changed in php5:
assignee: ubuntu-server → blueyed
status: Triaged → Fix Released
Revision history for this message
Richard J. Turner (richard-zygous) wrote :

It's been a while since I've been working with MSSQL, which is why I'm only just revisiting this bug.

The Sybase (DBLIB) drivers do not provide all the functionality needed when using a Microsoft SQL Server DB. For example, using this driver with PDO reports that transactions and stored procedures are not supported.

Providing a php5-mssql package that is really a virtual package linked to php5-sybase is not adequate: we need a real php5-mssql package with true Microsoft SQL server support, not basic compatibility using the DBLIB.

Changed in php5:
status: Fix Released → New
Revision history for this message
Ondřej Surý (ondrej) wrote :

> we need a real php5-mssql package with true Microsoft SQL server support

No, what you need to add required functionality to php5-sybase. Both extensions use SAME freetds library. It's just matter of "bug" or "lack of feature" in sybase extension. Feel free to aproach php team to fix these deficiencies.

Revision history for this message
Peter Howe (peter-howe) wrote :

I disagree. The php5 team has already done the work to have full support within the mssql.so extension. Including the real php5-mssql package would be a very small change to incorporate that work. This is a packaging issue, not a PHP issue.

Revision history for this message
Richard J. Turner (richard-zygous) wrote :

Why are you guys so reluctant to make such a small change to include better MS SQL Server support?

Can you imagine the (correct, IMO) response from the PHP guys to a request to add better MSSQL support to the Sybase extension? I bet it would be "No, the functionality is already there in the MSSQL extension, use that instead". Even if the response is "Sure, yeah, we'll do that right away", that doesn't solve the problem for Ubuntu users now: it would take ages for the change to filter down to an Ubuntu release.

It would be so easy to fix this bug properly; what's the big deal with insisting that the Sybase extension ought to be sufficient?

Revision history for this message
Udo Rader (udo-rader) wrote :

+1

even if this bug is seen as a rant by some "official" people involved, nobody ever gave a reason on why this _packaging_ issue seems so hard to fix.

RedHat, SuSE, Mandriva, ... to name but a few other major distributions all seem to be able to package php-mssql but obviously it seems to be impossible for ubuntu to deal with it.

Ridiculous, really.

Revision history for this message
Ondřej Surý (ondrej) wrote :

What is really ridiculous is that you complain just about package NAME. Have you really checked contents of php5-sybase package?

/usr
/usr/lib
/usr/lib/php5
/usr/lib/php5/20060613+lfs
/usr/lib/php5/20060613+lfs/mssql.so
/usr/lib/php5/20060613+lfs/pdo_dblib.so
/usr/share
/usr/share/doc
/etc
/etc/php5
/etc/php5/conf.d
/etc/php5/conf.d/mssql.ini
/etc/php5/conf.d/pdo_dblib.ini
/usr/share/doc/php5-sybase

Sybase extension was switched to mssql some time ago in Debian, since mssql had more feature and PDO driver. And Ubuntu pulled that change and has mssql in (at least) 8.04 and 8.10.

And yes I consider having two extensions with same set of functions and compiled with same underlying library as braindead.

Revision history for this message
Ondřej Surý (ondrej) wrote :

Invalid since php5-sybase switched to mssql extension since 5.2.4-1.

Changed in php5:
status: New → Invalid
Revision history for this message
Peter Howe (peter-howe) wrote :

Strange attitude, Ondřej. We're all just trying to make the product better so let's work together and be civil to each other.

Please let me know if any of the following facts are incorrect - it may be that me (and others) are misunderstanding. PHP's mssql and sybase libraries are different. As an example, the sybase one is supported by PDO (pdo_dblib); but, unlike the mssql one, does not have transaction support. So, some users of ubuntu would like to use the mssql library provided by PHP (available by compiling with --with-mssql) instead of (or as well as) the sybase support (available by compiling with --with-sybase/--with-pdo-dblib). This would allow them to use something other than PDO and have transaction support in their connections to MSSQL databases, for example. (I know both libaries use freetds underneath - but the interfaces are not the same and the functionality available is not the same.)

Because of these differences, I am just one among many others (including those who have commented on this ticket), who have had to build PHP from source (--with-mssql=shared) in order to get the mssql.so library that we want.

So, given that PHP provides and supports this library in it's own distributions, and given that there is clearly a userbase who wished to use this library (as opposed to - or as well as - the one provided by php5-sybase) - and given that the work involved in generating the necessary php5-mssql package would be negligible, can we not please agree that this would be a sensible step forward to keep the community happy and improve Ubuntu's offering.

(All of the above applies to Intrepid as well as Hardy and earlier releases.)
(There is, of course, a php5-mssql package already - but this is just a virtual package provided by php5-sybase.)

Revision history for this message
Ondřej Surý (ondrej) wrote :

Ok, I say it once again. What is contents of your php5-sybase package?

There is MSSQL.SO - so I would understand a bug asking for building separate SYBASE extension.

In debian/patches/119-sybase-alias.patch we aliased SYBASE functions to MSSQL in EXT/MSSQL/PHP_MSSQL.C and php5 is built with (see debian/rules): --with-mssql=shared,/usr --with-pdo-dblib=shared,/usr

And this was introduced in php 5.2.4-1. If you spent same time checking what I said (really reading changelog.Debian would be sufficient) as you spent writing you long reaction, it would save your and mine time as well.

Revision history for this message
Richard J. Turner (richard-zygous) wrote :

It's such a shame that it's taken this long to elicit an explanation from the packaging team, instead of just "php5-sybase provides php5-mssql now". Obviously if php5-sybase provides true MSSQL support as well as Sybase support then this bug is not valid (any more).

There are people here who know what they need from PHP, but don't know how to create Debian packages. Ondřej, if you or another packager had given the explanation you just did a lot earlier, instead of just blankly insisting that php5-sybase is enough, you'd not have had people like me, who don't know about how Debian packages are built, nagging you about needing php5-mssql.

When I raised this bug it was valid. The first explanation to it being closed without a new php5-mssql package being available was your comment (https://bugs.launchpad.net/ubuntu/+source/php5/+bug/87063/comments/28) which evidently didn't explain clearly enough for people that php5-sybase now includes --with-mssql=shared.

The people who've commented here are not whiners, nor are they trying to waste your time. Packagers, you can help yourselves and us by taking just a little more time to try to communicate with bug reporters and commentators more effectively, instead of regarding us as know-nothing irritations.

Revision history for this message
Seth.Griffin (sgriffin) wrote :

Hi,

I feel that this is still an issue that needs to be addressed with a package addition. The php5-sybase package is not sufficient as it is meant to handle sybase and not Microsoft SQL Server databases.

When using php5-sybase to query ntext data (unicode text) Microsoft SQL Server 2000 says:

"Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier."

After reconfiguring and building the libapache2-mod-php5 package with mssql everything works fine.

If this is a freetds issue, note that the freetds-dev package source debian/rules is configuring freetds to be built to tdsver 4.2. It has been my experience that Microsoft SQL Server 2000 works well with tdsver 8.0.

If Sybase works with tdsver 8.0, then distributing a freetds-dev package built with tdsver=8.0 might solve this problem.

I am willing to help you guys get more information on this to prove that this is an issue that needs attention.

Let me know how I can help, and let's stick to the facts.

Thanks.

Revision history for this message
Daniel Hahler (blueyed) wrote :

You may want to file a new bug report for this (and refer to this one here, if useful).
I don't know about details (i.e. I cannot help you), sorry.

Changed in php5 (Ubuntu):
assignee: Daniel Hahler (blueyed) → nobody
Changed in php5 (Ubuntu Hardy):
assignee: Daniel Hahler (blueyed) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.