By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 712 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

followed manual instructions.. php_mssql.dll still doesn't load

P: n/a
I've RTFM'd and searched google and Zend and still am having a problem
loading php_mssql.dll.

First, background:

I'm using PHP Version 4.3.10
Apache/2.0.52
MySQL Server 4.1
Windows 2000 Professional OS

I installed Apache successfully, index.html works.
I've successfully downloaded and created a test page with simple php
instructions and that's working.
I've been using MySQL and have a running database.

Now I'm trying to be able to use dbx functions to access MySQL via PHP.
According to the manual, (since I'm using PHP4, not 5) I need to load
php_mssql.dll. I've updated the php.ini to the following:

extension_dir = c:/php/extensions/

and uncommented:

extension=php_mssql.dll

But got the famous error from Apache:

Unable to load dynamic library 'c:/php/extensions/php_mssql.dll' -
The specified module could not be found

After looking at the php.ini above and seeing:

; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"

I switched the forward slashed to backslashes and I get the same error
(showing the backslashes this time) that it could load/find.

I searched Google archives and Zend mailing list archives and some say
to put the extension_dir to just C:\php\ and copying the php_mssql.dll
to that directory. Did both, get the same error, can't find the file in
C:\php...

Some of the archives say that I they've copied the file to the windows
dir (C:\WINNT for me) and some say to the system dir (C:\WINNT\system32
for me), and each time still get the error can't load/find.

Any other suggestions would be appreciated.

There is a mention in the manual about loading via dl(). Is this a
consideration?

Thanks for any help :)
Glenn
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Sat, 18 Dec 2004 16:59:42 GMT, Glenn <ba******@yahoo.com> wrote:
Now I'm trying to be able to use dbx functions to access MySQL via PHP.
According to the manual, (since I'm using PHP4, not 5) I need to load
php_mssql.dll. I've updated the php.ini to the following:


php_mssql.dll is for Microsoft SQL Server.
php_mysql.dll is for MySQL. Surely you mean this DLL instead?

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2

P: n/a
Andy Hassall wrote:
On Sat, 18 Dec 2004 16:59:42 GMT, Glenn <ba******@yahoo.com> wrote:

Now I'm trying to be able to use dbx functions to access MySQL via PHP.
According to the manual, (since I'm using PHP4, not 5) I need to load
php_mssql.dll. I've updated the php.ini to the following:

php_mssql.dll is for Microsoft SQL Server.
php_mysql.dll is for MySQL. Surely you mean this DLL instead?


But this is PHP4, not 5.. therefore, there is no php_mysql.dll in this
version. From reading the documentation, it's my understanding that
php_mysql.dll is in version 5, not 4. Please correct me if I'm wrong.

Thanks
Glenn
Jul 17 '05 #3

P: n/a
On Sat, 18 Dec 2004 17:43:14 GMT, Glenn <ba******@yahoo.com> wrote:
Andy Hassall wrote:
On Sat, 18 Dec 2004 16:59:42 GMT, Glenn <ba******@yahoo.com> wrote:

Now I'm trying to be able to use dbx functions to access MySQL via PHP.
According to the manual, (since I'm using PHP4, not 5) I need to load
php_mssql.dll.

Please post a reference to the bits of the manual that have given you this
impression?
php_mssql.dll is for Microsoft SQL Server.
php_mysql.dll is for MySQL. Surely you mean this DLL instead?


But this is PHP4, not 5.. therefore, there is no php_mysql.dll in this
version. From reading the documentation, it's my understanding that
php_mysql.dll is in version 5, not 4. Please correct me if I'm wrong.


Yes, you're quite right that there is no php_mysql.dll in the current 4.3
Windows binary distribution, because as the manual and php.ini notes, MySQL
support is compiled directly into this build of PHP, so no additional php_*
extension DLLs are required. It's got MySQL support straight out of the box.

However, php_mssql.dll has always been for Microsoft SQL Server and has
nothing whatsoever to do with MySQL, and without SQL Server client libraries
installed you won't be able to load it.

PHP5 has an additional php_mysqli.dll for the MySQL-improved extension, which
gives access to MySQL 4.1 features, and php_mysql.dll returns as a separate
optionally loadable extension DLL for the "classic" interface.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #4

P: n/a
Andy Hassall wrote:
On Sat, 18 Dec 2004 17:43:14 GMT, Glenn <ba******@yahoo.com> wrote:

Andy Hassall wrote:
On Sat, 18 Dec 2004 16:59:42 GMT, Glenn <ba******@yahoo.com> wrote:

Now I'm trying to be able to use dbx functions to access MySQL via PHP.
According to the manual, (since I'm using PHP4, not 5) I need to load
php_mssql.dll.

Please post a reference to the bits of the manual that have given you this
impression?

php_mssql.dll is for Microsoft SQL Server.
php_mysql.dll is for MySQL. Surely you mean this DLL instead?


But this is PHP4, not 5.. therefore, there is no php_mysql.dll in this
version. From reading the documentation, it's my understanding that
php_mysql.dll is in version 5, not 4. Please correct me if I'm wrong.

Yes, you're quite right that there is no php_mysql.dll in the current 4.3
Windows binary distribution, because as the manual and php.ini notes, MySQL
support is compiled directly into this build of PHP, so no additional php_*
extension DLLs are required. It's got MySQL support straight out of the box.

However, php_mssql.dll has always been for Microsoft SQL Server and has
nothing whatsoever to do with MySQL, and without SQL Server client libraries
installed you won't be able to load it.

PHP5 has an additional php_mysqli.dll for the MySQL-improved extension, which
gives access to MySQL 4.1 features, and php_mysql.dll returns as a separate
optionally loadable extension DLL for the "classic" interface.

OMG.. in the manual "Microsoft SQL Server" & "MySQL" are right next to
each other, and I can see that the link for "Microsoft SQL Server" has
been clicked, but not for "MySQL"... a thousand pardons! I clicked the
wrong link and was following the instructions for including php_mssql.dll.

So, for my concerns.. I can re-comment out php_mssql.dll and I should be
good to go. Do I still use the dbx commands?

Still curious about the module not loading.. but I guess for me the
point is moot.

Thank you for pointing out my error.

Glenn
Jul 17 '05 #5

P: n/a
On Sat, 18 Dec 2004 19:59:33 GMT, Glenn <ba******@yahoo.com> wrote:
On Sat, 18 Dec 2004 17:43:14 GMT, Glenn <ba******@yahoo.com> wrote:

So, for my concerns.. I can re-comment out php_mssql.dll and I should be
good to go. Do I still use the dbx commands?
Well, that's up to you. I've never used dbx so can't offer much in the way of
informed comment. I see it's a database abstraction layer; so long as it
transparently emulates placeholders for MySQL then that'd be a good thing.

From looking at the manual, it doesn't appear to. In fact at a glance it
appears to force you to embed variables in literal SQL, even for databases that
support placeholders - so forcing you into the classic cases for SQL injection,
and crippling scalability on databases like Oracle. If this is the case, and
I've not missed something obvious, I'd say this is a particularly useless
abstraction layer.

Personally, I recommend ADOdb. In the end, you should research and find out
which one best suits your own requirements.
Still curious about the module not loading.. but I guess for me the
point is moot.


Here's the explanation again...
However, php_mssql.dll has always been for Microsoft SQL Server and has
nothing whatsoever to do with MySQL, and without SQL Server client libraries
installed you won't be able to load it.


--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.