Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2

Author Topic: MS server 2008 R2 PHP connecting to SQL2000  (Read 45945 times)

chenks

  • Kitizen
  • ****
  • Posts: 1106
MS server 2008 R2 PHP connecting to SQL2000
« on: January 18, 2018, 04:16:35 PM »

anyone here got any experience with windows server 2008 R2 and php connecting to an MS SQL 2000 database ?

migrating from a windows server 2003 php to 2008 R2 and the mssql connector for the current version of php are depreciated and now uses different ones.

it's been a bit hit and miss finding out exactly what php needs and installing that.
the 2008 R2 server has php 7.1.11 installed
Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33879
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #1 on: January 19, 2018, 10:14:04 AM »

Not me sorry:/
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

d2d4j

  • Kitizen
  • ****
  • Posts: 1103
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #2 on: January 19, 2018, 10:39:34 AM »

Hi

I would be surprised if php/ms packages were available for php 7

Mssql 2000 is considered too old and weak

You could try

GitHub - to see if packages are listed

Downgrade php 7 to php 5.6 if connectors still available (php 5.6 is still valid but coming up to EOL)

Upgrade mssql 2000 to free version of latest mssql (sorry the actual name escapes me at moment or purchase a standard license)

The connectors are available if it were an old php/ms os to newer mssql server but not the other way round.

I could be wrong though, so apologies in advance if I am

Many thanks

John
Logged

jelv

  • Helpful
  • Kitizen
  • *
  • Posts: 2054
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #3 on: January 19, 2018, 12:24:17 PM »

Why does it have to be MS SQL?
Logged
Broadband and Line rental: Zen Unlimited Fibre 2, Mobile: Vodaphone
Router: Fritz!Box 7530

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #4 on: January 19, 2018, 03:19:59 PM »

Hi

I would be surprised if php/ms packages were available for php 7

Mssql 2000 is considered too old and weak

there are, it's still very much supported
Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #5 on: January 19, 2018, 03:20:58 PM »

Why does it have to be MS SQL?

because that's what the production server is running.
it's not been upgraded because it works.
as they say "don't fix what isn't broken".
Logged

d2d4j

  • Kitizen
  • ****
  • Posts: 1103
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #6 on: January 20, 2018, 09:54:53 AM »

Hi chenks

Many thanks

Sorry, what is your question your asking then

Many thanks

John
Logged

jelv

  • Helpful
  • Kitizen
  • *
  • Posts: 2054
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #7 on: January 20, 2018, 06:18:21 PM »

as they say "don't fix what isn't broken".

On that basis, why change from windows server 2000?
Logged
Broadband and Line rental: Zen Unlimited Fibre 2, Mobile: Vodaphone
Router: Fritz!Box 7530

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #8 on: January 20, 2018, 09:54:24 PM »

The web server and the SQL server are not the same server.
IIS on 2000 has become limited in functions now required.

With regards to what question I was asking, thought it was quite clear?

Getting current version of PHP to connect to SQL 2000
Logged

watcher

  • Reg Member
  • ***
  • Posts: 748
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #9 on: January 20, 2018, 10:30:27 PM »

Microsoft control the PHP drivers for SQL Server and they have decided that version 4.0 for PHP 7.x will not support SQL Server 2000. So it looks like as has already been suggested that you need to downgrade from PHP 7.1.1 to a version of PHP that will support SQL Server 2000. This would seem to be PHP 5.6.33 released on 4 January 2018. The only other alternative I can find is this one.
Logged

d2d4j

  • Kitizen
  • ****
  • Posts: 1103
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #10 on: January 20, 2018, 10:33:29 PM »

Hi

@watcher - thank you

@chenks - I thought that was the question until you stated they were supported

Many thanks

John
Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #11 on: January 21, 2018, 12:16:20 PM »

Microsoft control the PHP drivers for SQL Server and they have decided that version 4.0 for PHP 7.x will not support SQL Server 2000. So it looks like as has already been suggested that you need to downgrade from PHP 7.1.1 to a version of PHP that will support SQL Server 2000. This would seem to be PHP 5.6.33 released on 4 January 2018. The only other alternative I can find is this one.

is this not a solution?
https://github.com/Microsoft/msphpsql
Logged

watcher

  • Reg Member
  • ***
  • Posts: 748
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #12 on: January 21, 2018, 02:26:54 PM »

No, this is another link to the Microsoft PHP drivers which use versions of the ODBC driver which do not support SQL2000. The earliest ODBC driver currently available is version 11 and according to Microsoft "...ODBC Driver 11 for SQL Server is a single dynamic-link library (DLL) containing run-time support for applications using native-code APIs to connect to Microsoft SQL Server 2005, 2008, 2008 R2, SQL Server 2012, SQL Server 2014 and Windows Azure SQL Database....". The definitive guide as to which versions of MS Server work with which PHP versions/drivers  appears on this Microsoft page.
« Last Edit: January 21, 2018, 02:37:08 PM by watcher »
Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #13 on: January 22, 2018, 11:06:20 AM »

it seems then the solution will be to use PHP 5.6.33 alongisde 2008 R2 server.

the current connection method on the 2003 server is

Code: [Select]
<?php
$serverName "server_name";
$connectionInfo = array( "Database"=>"dbname""UID"=>"user""PWD"=>"password");
$conn sqlsrv_connect$serverName$connectionInfo );
if( $conn === false ) {
    die( print_rsqlsrv_errors(), true));
}

$sql "select RIGHT(ld_filename, (CHARINDEX('\',REVERSE(ld_filename),0))-1) as filename, * from linked_documents where ld_id = '$ctsref'";
$stmt sqlsrv_query$conn$sql );
if( $stmt === false) {
    die( print_rsqlsrv_errors(), true) );
}

while( $row sqlsrv_fetch_array$stmtSQLSRV_FETCH_ASSOC) ) {
   
?>

Logged

watcher

  • Reg Member
  • ***
  • Posts: 748
Re: MS server 2008 R2 PHP connecting to SQL2000
« Reply #14 on: January 22, 2018, 01:29:44 PM »

That code is using sqlsrv which is the ODBC based driver. The only issue potentially is whether or not 5.6.33 will work with SQL2000 because that version of PHP is still using the later Microsoft ODBC drivers. This link says that it will not and that the latest version of PHP that will work with SQL2000 is 5.3.29, although there is a potential workaround for PHP 5.4.x. A Windows download of PHP 5.3.29 or the 5.4.x versions is available from here.
« Last Edit: January 22, 2018, 01:32:11 PM by watcher »
Logged
Pages: [1] 2
 

anything