Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PHP and SQL SERVER

28 views
Skip to first unread message

michele....@gmail.com

unread,
May 2, 2016, 4:51:54 PM5/2/16
to
I developed a small script in php some years ago (2007)
This script connected to MS Sql Server using mssql_* function on windows with a simple installation of XAMPP.

It has worked for many years.

Then, some days ago, the server has changed (now there is SQL Server 2014) and now the script doesn't work. But It can't connect to sql server.

Are mssql_* a good solution to connect to sql server today ? Are there better and so simple technology ?

Thank you
m.

Jerry Stuckle

unread,
May 2, 2016, 8:03:45 PM5/2/16
to
For starters: What version of PHP are you using? What errors do you
get? Why can't you connect to SQL Server?

Way too little information for an intelligent response.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstu...@attglobal.net
==================

in...@aadhocc.com

unread,
May 6, 2016, 4:02:09 AM5/6/16
to
Please contact Aadhocc Software Consultants for Print client from Browser to Dot matrix solution +91 9747205205

Arno Welzel

unread,
May 8, 2016, 1:09:05 PM5/8/16
to
michele....@gmail.com schrieb am 02.05.2016 um 22:51:

[...]
> Are mssql_* a good solution to connect to sql server today ? Are
> there better and so simple technology ?

Either use ODBC:

<http://www.easysoft.com/developer/languages/php/sql_server_unix_tutorial.html>

Or if the webserver runs in Windows as well:

<https://msdn.microsoft.com/en-us/library/cc296172%28v=sql.105%29.aspx>


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de

Luuk

unread,
May 8, 2016, 1:47:20 PM5/8/16
to
On 03-05-16 02:03, Jerry Stuckle wrote:
> On 5/2/2016 4:51 PM, michele....@gmail.com wrote:
>> I developed a small script in php some years ago (2007)
>> This script connected to MS Sql Server using mssql_* function on windows with a simple installation of XAMPP.
>>
>> It has worked for many years.
>>
>> Then, some days ago, the server has changed (now there is SQL Server 2014) and now the script doesn't work. But It can't connect to sql server.
>>
>> Are mssql_* a good solution to connect to sql server today ? Are there better and so simple technology ?
>>
>> Thank you
>> m.
>>
>
> For starters: What version of PHP are you using? What errors do you
> get? Why can't you connect to SQL Server?
>
> Way too little information for an intelligent response.
>

This gives more than enough info to know that OP has a problem....

http://php.net/manual/en/mssql.requirements.php

Before their database was migrated to 'SQL Server 2014' they should have
made a good impact analysys.

They never answered the question, 'What application do make use of this
database that we are going to upgrade'.

But, because it's a small script, you can always rewrite it with current
version (see link).


Thomas 'PointedEars' Lahn

unread,
May 8, 2016, 6:27:37 PM5/8/16
to
Arno Welzel wrote:

> michele....@gmail.com schrieb am 02.05.2016 um 22:51:
> [...]
>> Are mssql_* a good solution to connect to sql server today ? Are
>> there better and so simple technology ?
>
> Either use ODBC:
>
>
<http://www.easysoft.com/developer/languages/php/sql_server_unix_tutorial.html>
>
> Or if the webserver runs in Windows as well:
>
> <https://msdn.microsoft.com/en-us/library/cc296172%28v=sql.105%29.aspx>

As you can see there, the source code of the “Microsoft PHP Driver for SQL
Server”, including one variant that is PDO-based, is available on GitHub,
so, in theory, there should be no need to use the cumbersome low-level ODBC
PHP driver directly for MS SQL database access anymore.

<https://github.com/azure/msphpsql>

--
PointedEars
Zend Certified PHP Engineer
<http://www.zend.com/en/yellow-pages/ZEND024953> | Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

Erwin Moller

unread,
May 27, 2016, 5:24:36 AM5/27/16
to
On 5/9/2016 12:27 AM, Thomas 'PointedEars' Lahn wrote:
> Arno Welzel wrote:
>
>> michele....@gmail.com schrieb am 02.05.2016 um 22:51:
>> [...]
>>> Are mssql_* a good solution to connect to sql server today ? Are
>>> there better and so simple technology ?
>>
>> Either use ODBC:
>>
>>
> <http://www.easysoft.com/developer/languages/php/sql_server_unix_tutorial.html>
>>
>> Or if the webserver runs in Windows as well:
>>
>> <https://msdn.microsoft.com/en-us/library/cc296172%28v=sql.105%29.aspx>
>
> As you can see there, the source code of the “Microsoft PHP Driver for SQL
> Server”, including one variant that is PDO-based, is available on GitHub,
> so, in theory, there should be no need to use the cumbersome low-level ODBC
> PHP driver directly for MS SQL database access anymore.
>
> <https://github.com/azure/msphpsql>
>

Good advice.
Use “Microsoft PHP Driver for SQL Server”.
Maybe upgrade your PHP install too.

Might be some work to get things running again. :-)
Good luck.

Regards,
Erwin Moller


--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
0 new messages