Discussion:
[PHP-INSTALL] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server
Edward S.P. Leong
2010-01-18 12:14:25 UTC
Permalink
Dear All,

I had config the php.ini as the following :
extension=php_mssql.dll

Then run the cli "iisreset" and reboot the web server machine...
After that, there is NO any MS-SQL within the phpinfo()...
So, would you mind to help more ?

Thanks !

Edward.
Richard Quadling
2010-01-18 13:57:52 UTC
Permalink
Post by Edward S.P. Leong
Dear All,
extension=php_mssql.dll
Then run the cli "iisreset" and reboot the web server machine...
After that, there is NO any MS-SQL within the phpinfo()...
So, would you mind to help more ?
Thanks !
Edward.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
1 - Can you confirm that the ini file you are editing is the one that
is reported in phpinfo() as the file being used?
2 - At a command prompt, change directory to your PHP installation and type ...

php -m

See if you have any errors being reported.

If the INI file is in an unusual location, then use ...

php -c <location_of_php.ini file> -m

instead; e.g.

php -c D:\PHP\INI\php-cli.ini -m
php -c C:\windows\php-isapi.ini -m
etc.
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
e***@ita.org.mo
2010-01-19 02:20:08 UTC
Permalink
Post by Richard Quadling
1 - Can you confirm that the ini file you are editing is the one that
is reported in phpinfo() as the file being used?
Yes, BUT there is no MSSQL info of it...
Post by Richard Quadling
2 - At a command prompt, change directory to your PHP installation and type ...
php -m
See if you have any errors being reported.
If the INI file is in an unusual location, then use ...
php -c <location_of_php.ini file> -m
T:\php5>php -c t:\php5\php.ini -m
PHP Warning: PHP Startup: Unable to load dynamic library
'T:\PHP5\ext\php_mssql
.dll' - The specified module could not be found.
in Unknown on line 0
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mcrypt
mysql
odbc
pcre
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

T:\php5\ext>dir php_mssql.dll
Volume in drive T is Data
Volume Serial Number is DC85-706F

Directory of T:\php5\ext

2009/12/16 下午 05:06 49,232 php_mssql.dll
1 File(s) 49,232 bytes
0 Dir(s) 52,215,365,632 bytes free

T:\php5\ext>

BTW : when running the cli of php -c t:\php5\php.ini -m, the system
prompt me there is no "MSVCR71.dll" found...
So, how can I install the dll file for test ( php -m ) again ?

Thanks !

Edward.





----------------------------------------------------------------
ITA Web Site : http://www.ita.org.mo
E-mail Address : ***@ita.org.mo
Richard Quadling
2010-01-19 13:11:45 UTC
Permalink
Post by e***@ita.org.mo
Post by Richard Quadling
1 - Can you confirm that the ini file you are editing is the one that
is reported in phpinfo() as the file being used?
Yes, BUT there is no MSSQL info of it...
Post by Richard Quadling
2 - At a command prompt, change directory to your PHP installation  and
type ...
php -m
See if you have any errors being reported.
If the INI file is in an unusual location, then use ...
php -c <location_of_php.ini file> -m
T:\php5>php -c t:\php5\php.ini -m
PHP Warning:  PHP Startup: Unable to load dynamic library
'T:\PHP5\ext\php_mssql
.dll' - The specified module could not be found.
 in Unknown on line 0
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mcrypt
mysql
odbc
pcre
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
T:\php5\ext>dir php_mssql.dll
 Volume in drive T is Data
 Volume Serial Number is DC85-706F
 Directory of T:\php5\ext
2009/12/16  下午 05:06            49,232 php_mssql.dll
              1 File(s)         49,232 bytes
              0 Dir(s)  52,215,365,632 bytes free
T:\php5\ext>
BTW : when running the cli of php -c t:\php5\php.ini -m, the system prompt
me there is no "MSVCR71.dll" found...
So, how can I install the dll file for test ( php -m ) again ?
Thanks !
Edward.
----------------------------------------------------------------
ITA Web Site : http://www.ita.org.mo
It seems you are missing one (or more) of the MS Visual C Runtime files.

http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
is where I'd go next.

But, first, I'd confirm this issue.

If you have depends.exe (http://www.dependencywalker.com/) to open the
php_mssql.dll and see if it reports the missing file in the same way -
look at the bottom of the bottom panel.

Whilst PHP _can_ find the php_mssql.dll file, it is unable to load it
due to missing libraries required by the dll.
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Richard Quadling
2010-01-19 13:15:43 UTC
Permalink
But having said all of that, the php_mssql.dll uses a very old library
which may give you issues.

For the time being, using ODBC (php_odbc is built in for PHP on
Windows) is a much safer solution. You can also use the latest SQL
Native Client driver so you can talk to SQL7, 2000, 2005, 2008.

If you are used to using a DNS-less connection, then ...

$Conn = odbc_pconnect("Driver={SQL Server Native Client
10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
$User, $Password, SQL_CUR_USE_DRIVER);

will give you the connection without the need to have a DNS entry.
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
Edward S.P. Leong
2010-01-19 13:36:17 UTC
Permalink
Post by Richard Quadling
But having said all of that, the php_mssql.dll uses a very old library
which may give you issues.
For the time being, using ODBC (php_odbc is built in for PHP on
Windows) is a much safer solution. You can also use the latest SQL
Native Client driver so you can talk to SQL7, 2000, 2005, 2008.
If you are used to using a DNS-less connection, then ...
$Conn = odbc_pconnect("Driver={SQL Server Native Client
10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
$User, $Password, SQL_CUR_USE_DRIVER);
will give you the connection without the need to have a DNS entry.
Hello to you,

Where can we download the SQL Native Client driver for talking to MS-SQL
( eg : 2000 ) ?

Thanks !
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Richard Quadling
2010-01-19 13:46:25 UTC
Permalink
Post by Edward S.P. Leong
Post by Richard Quadling
But having said all of that, the php_mssql.dll uses a very old library
which may give you issues.
For the time being, using ODBC (php_odbc is built in for PHP on
Windows) is a much safer solution. You can also use the latest SQL
Native Client driver so you can talk to SQL7, 2000, 2005, 2008.
If you are used to using a DNS-less connection, then ...
$Conn = odbc_pconnect("Driver={SQL Server Native Client
10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
$User, $Password, SQL_CUR_USE_DRIVER);
will give you the connection without the need to have a DNS entry.
Hello to you,
Where can we download the SQL Native Client driver for talking to MS-SQL
( eg : 2000 ) ?
Thanks !
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

and you also have the option of an official MS SQL driver for PHP

http://www.codeplex.com/SQLSRVPHP
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
Edward S.P. Leong
2010-01-20 14:51:47 UTC
Permalink
Post by Richard Quadling
Post by Edward S.P. Leong
Post by Richard Quadling
But having said all of that, the php_mssql.dll uses a very old library
which may give you issues.
For the time being, using ODBC (php_odbc is built in for PHP on
Windows) is a much safer solution. You can also use the latest SQL
Native Client driver so you can talk to SQL7, 2000, 2005, 2008.
If you are used to using a DNS-less connection, then ...
$Conn = odbc_pconnect("Driver={SQL Server Native Client
10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
$User, $Password, SQL_CUR_USE_DRIVER);
will give you the connection without the need to have a DNS entry.
Hello to you,
Where can we download the SQL Native Client driver for talking to MS-SQL
( eg : 2000 ) ?
Thanks !
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
Sorry,

Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?

Thanks !

Edward.
Richard Quadling
2010-01-20 14:56:11 UTC
Permalink
Post by Richard Quadling
But having said all of that, the php_mssql.dll uses a very old library
which may give you issues.
For the time being, using ODBC (php_odbc is built in for PHP on
Windows) is a much safer solution. You can also use the latest SQL
Native Client driver so you can talk to SQL7, 2000, 2005, 2008.
If you are used to using a DNS-less connection, then ...
$Conn = odbc_pconnect("Driver={SQL Server Native Client
10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
$User, $Password, SQL_CUR_USE_DRIVER);
will give you the connection without the need to have a DNS entry.
Hello to you,
Where can we download the SQL Native Client driver for talking to MS-SQL
( eg : 2000 ) ?
Thanks !
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
Sorry,
Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
Thanks !
Edward.
Either ODBC or the MS SQL driver for PHP. Which ever suits you.

Both require the MS SQL Native Client (go for the latest).

That's it really.
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
Richard Quadling
2010-01-20 14:58:36 UTC
Permalink
Post by Richard Quadling
Post by Richard Quadling
But having said all of that, the php_mssql.dll uses a very old library
which may give you issues.
For the time being, using ODBC (php_odbc is built in for PHP on
Windows) is a much safer solution. You can also use the latest SQL
Native Client driver so you can talk to SQL7, 2000, 2005, 2008.
If you are used to using a DNS-less connection, then ...
$Conn = odbc_pconnect("Driver={SQL Server Native Client
10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
$User, $Password, SQL_CUR_USE_DRIVER);
will give you the connection without the need to have a DNS entry.
Hello to you,
Where can we download the SQL Native Client driver for talking to MS-SQL
( eg : 2000 ) ?
Thanks !
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
Sorry,
Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
Thanks !
Edward.
Either ODBC or the MS SQL driver for PHP. Which ever suits you.
Both require the MS SQL Native Client (go for the latest).
That's it really.
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
Microsoft SQL Server 2008 Native Client
Microsoft SQL Server 2008 Native Client (SQL Native Client) is a
single dynamic-link library (DLL) containing both the SQL OLE DB
provider and SQL ODBC driver. It contains run-time support for
applications using native-code APIs (ODBC, OLE DB and ADO) to connect
to Microsoft SQL Server 2000, 2005, or 2008. SQL Native Client should
be used to create new applications or enhance existing applications
that need to take advantage of new SQL Server 2008 features. This
redistributable installer for SQL Native Client installs the client
components needed during run time to take advantage of new SQL Server
2008 features, and optionally installs the header files needed to
develop an application that uses the SQL Native Client API.

Audience(s): Customer, Partner, Developer

X86 Package (sqlncli.msi) - 4549 KB -
http://go.microsoft.com/fwlink/?LinkId=123717&clcid=0x409
X64 Package (sqlncli.msi) - 7963 KB -
http://go.microsoft.com/fwlink/?LinkId=123718&clcid=0x409
IA64 Package (sqlncli.msi) - 11112 KB -
http://go.microsoft.com/fwlink/?LinkId=123719&clcid=0x409


Microsoft SQL Server 2005 Driver for PHP
The SQL Server 2005 Driver for PHP is a PHP 5 extension that allows
for accessing data in all Editions of SQL Server 2005 and SQL Server
2008 (including Express Editions) from within PHP scripts. The driver
provides a procedural interface for accessing data and makes use of
PHP features, including PHP streams to read and write large objects.
With this release, the source code for the driver is available here:
http://go.microsoft.com/fwlink/?LinkID=123842&clcid=0x409 . The SQL
Server 2005 Driver for PHP relies on the Microsoft SQL Server Native
Client to communicate with SQL Server. For more information about SQL
Server Native Client, visit the SQL Server Native Client page on MSDN.

Audience(s): Developer, DBA

Download site - http://go.microsoft.com/fwlink/?LinkID=123470
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Edward S.P. Leong
2010-01-20 15:02:11 UTC
Permalink
Post by Richard Quadling
Post by Richard Quadling
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
Sorry,
Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
Thanks !
Edward.
Either ODBC or the MS SQL driver for PHP. Which ever suits you.
Both require the MS SQL Native Client (go for the latest).
That's it really.
Sorry,

My means is which package support for connecting MS-SQL 2000 from php ?
Due to I don't know which package ( file name ) I download it on the
download site is suitable for me to use...

Thanks !

Edward.
Richard Quadling
2010-01-20 15:05:15 UTC
Permalink
Post by Richard Quadling
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
Sorry,
Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
Thanks !
Edward.
Either ODBC or the MS SQL driver for PHP. Which ever suits you.
Both require the MS SQL Native Client (go for the latest).
That's it really.
Sorry,
My means is which package support for connecting MS-SQL 2000 from php ?
Due to I don't know which package ( file name ) I download it on the
download site is suitable for me to use...
Thanks !
Edward.
As you are running IIS + PHP in 32bit mode, I'd stick with the x86 packages.
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
Edward S.P. Leong
2010-01-20 15:13:02 UTC
Permalink
Post by Richard Quadling
Post by Richard Quadling
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
Sorry,
Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
Thanks !
Edward.
Either ODBC or the MS SQL driver for PHP. Which ever suits you.
Both require the MS SQL Native Client (go for the latest).
That's it really.
Sorry,
My means is which package support for connecting MS-SQL 2000 from php ?
Due to I don't know which package ( file name ) I download it on the
download site is suitable for me to use...
Thanks !
Edward.
As you are running IIS + PHP in 32bit mode, I'd stick with the x86 packages.
Hello,

Do you means the x86 is suitable for me now ?

Thanks !

Edward.
Richard Quadling
2010-01-20 15:32:40 UTC
Permalink
Post by Richard Quadling
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
Sorry,
Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
Thanks !
Edward.
Either ODBC or the MS SQL driver for PHP. Which ever suits you.
Both require the MS SQL Native Client (go for the latest).
That's it really.
Sorry,
My means is which package support for connecting MS-SQL 2000 from php ?
Due to I don't know which package ( file name ) I download it on the
download site is suitable for me to use...
Thanks !
Edward.
As you are running IIS + PHP in 32bit mode, I'd stick with the x86 packages.
Hello,
Do you means the x86 is suitable for me now ?
Thanks !
Edward.
If you were running 64 bit everything, then obviously, you would use
the 64 bit packages.

But you are running IIS and PHP in 32bit mode, so, for ease of
compatibility, the 32bit packages (x86 rather than x64) are what I
would be using.

In terms of which one you want to use, well, you have to get the Native Client.
Post by Richard Quadling
From there you can either use odbc (built into PHP for Windows) or use
the MS SQL Driver for PHP.

Both of them use the Native Client.

As the MS SQL driver is fairly new, you may want to stick with the
ODBC route within PHP.
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
Loading...