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

Unable to load dynamic library './php_mysql.dll'

P: n/a
Hi,

When I start my PC(winXP Pro), it always says: Unknown(): Unable
toload dynamic library './php_msql.dll' - The specified module could
not be found.

Then my Apache servre starts, load php module and works well.
I copied php_msql.dll to my system32 directory. Who knows what's
wrong? Thanks a lot?

Nancy
Jul 17 '05 #1
Share this Question
Share on Google+
19 Replies


P: n/a
Nancy wrote:
When I start my PC(winXP Pro), it always says: Unknown(): Unable
toload dynamic library './php_msql.dll' - The specified module could
not be found.


Are you talking about msql or mysql? Here you say msql, the subject says
mysql.

Regards,
Matthias
Jul 17 '05 #2

P: n/a
Nancy wrote:
Hi,

When I start my PC(winXP Pro), it always says: Unknown(): Unable
toload dynamic library './php_msql.dll' - The specified module could
not be found.

Then my Apache servre starts, load php module and works well.
I copied php_msql.dll to my system32 directory. Who knows what's
wrong? Thanks a lot?

Nancy


You may need to set your "extensions_dir" in your php.ini
PHP searches for the file before including it, so adding it to your
system32 folder wouldn't make a difference, because PHP only searches
the extensions_dir. Normally in php.ini it is the same folder as PHP.exe
Jul 17 '05 #3

P: n/a
"Nancy" <wx*****@hotmail.com> wrote in message
news:cf**************************@posting.google.c om...
Hi,

When I start my PC(winXP Pro), it always says: Unknown(): Unable
toload dynamic library './php_msql.dll' - The specified module could
not be found.

Then my Apache servre starts, load php module and works well.
I copied php_msql.dll to my system32 directory. Who knows what's
wrong? Thanks a lot?

Nancy


Got IIS running on your computer, perhaps?
Jul 17 '05 #4

P: n/a
If you are using windows try copying "libmysql.dll" to windows/system32/
folder! this helped me :) This is documented in the install manual but is a
must!!!
"Chung Leong" <ch***********@hotmail.com> wrote in message
news:6N********************@comcast.com...
"Nancy" <wx*****@hotmail.com> wrote in message
news:cf**************************@posting.google.c om...
Hi,

When I start my PC(winXP Pro), it always says: Unknown(): Unable
toload dynamic library './php_msql.dll' - The specified module could
not be found.

Then my Apache servre starts, load php module and works well.
I copied php_msql.dll to my system32 directory. Who knows what's
wrong? Thanks a lot?

Nancy


Got IIS running on your computer, perhaps?

Jul 17 '05 #5

P: n/a
Hi,
I am sorry, it doesn't work. The unable to load file is
php_msql.dll, not php_mysql.dll or php_mssql.dll. I am not sure this
file means MySql or MS SQL.
Thanks.

Nancy
"D_Angle" <ga***@mindless.com> wrote in message news:<F_********************@news.telia.no>...
If you are using windows try copying "libmysql.dll" to windows/system32/
folder! this helped me :) This is documented in the install manual but is a
must!!!
"Chung Leong" <ch***********@hotmail.com> wrote in message
news:6N********************@comcast.com...
"Nancy" <wx*****@hotmail.com> wrote in message
news:cf**************************@posting.google.c om...
Hi,

When I start my PC(winXP Pro), it always says: Unknown(): Unable
toload dynamic library './php_msql.dll' - The specified module could
not be found.

Then my Apache servre starts, load php module and works well.
I copied php_msql.dll to my system32 directory. Who knows what's
wrong? Thanks a lot?

Nancy


Got IIS running on your computer, perhaps?

Jul 17 '05 #6

P: n/a
Hi,
I have my IIS runing on my PC at same time. IIS uses 80 port and
Apache uses 8080 port. ...?
Thanks.

Nancy

"Chung Leong" <ch***********@hotmail.com> wrote in message news:<6N********************@comcast.com>...
"Nancy" <wx*****@hotmail.com> wrote in message
news:cf**************************@posting.google.c om...
Hi,

When I start my PC(winXP Pro), it always says: Unknown(): Unable
toload dynamic library './php_msql.dll' - The specified module could
not be found.

Then my Apache servre starts, load php module and works well.
I copied php_msql.dll to my system32 directory. Who knows what's
wrong? Thanks a lot?

Nancy


Got IIS running on your computer, perhaps?

Jul 17 '05 #7

P: n/a
Hi,
It should be php_msql.dll

Nancy

Matthias Esken <mu******************@usenetverwaltung.org> wrote in message news:<cd**********@usenet.esken.de>...
Nancy wrote:
When I start my PC(winXP Pro), it always says: Unknown(): Unable
toload dynamic library './php_msql.dll' - The specified module could
not be found.


Are you talking about msql or mysql? Here you say msql, the subject says
mysql.

Regards,
Matthias

Jul 17 '05 #8

P: n/a
Hi,
I don't know how to change this part, but I tried many ways, let
extensions_dir = "./system32" ; my php_msql.dll in this directory
extensions_dir = "c:/system32"
extensions_dir = "c:/php"
...

The strange thing is after showing two times this error message, my
Apache server starts and load php module, python module, mod_python,
works very well.
So what's the problem?
Thanks a lot.

Nancy

neur0maniak <us****@neur0maniak.co.uk> wrote in message news:<40***********************@ptn-nntp-reader01.plus.net>...
Nancy wrote:
Hi,

When I start my PC(winXP Pro), it always says: Unknown(): Unable
toload dynamic library './php_msql.dll' - The specified module could
not be found.

Then my Apache servre starts, load php module and works well.
I copied php_msql.dll to my system32 directory. Who knows what's
wrong? Thanks a lot?

Nancy


You may need to set your "extensions_dir" in your php.ini
PHP searches for the file before including it, so adding it to your
system32 folder wouldn't make a difference, because PHP only searches
the extensions_dir. Normally in php.ini it is the same folder as PHP.exe

Jul 17 '05 #9

P: n/a
On 24 Jul 2004 07:18:06 -0700, wx*****@hotmail.com (Nancy) wrote:
I don't know how to change this part, but I tried many ways, let
extensions_dir = "./system32" ; my php_msql.dll in this directory
Does that exist? '.' is 'current directory' so depends on context at
runtime...
extensions_dir = "c:/system32"
Does that exist?
extensions_dir = "c:/php"


Is the file actually in any of those directories?

Typically it's c:/php/extensions.

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

P: n/a
Hi,
I don't know how to change this part, but I tried many ways, let
extensions_dir = "./system32" ; my php_msql.dll in this directory
Does that exist? '.' is 'current directory' so depends on context at
runtime...

Yes, there exists '.'.
extensions_dir = "c:/system32"
Does that exist?

Sorry, it should be
extension_dir = "c:/windows/system32"
extensions_dir = "c:/php"
Is the file actually in any of those directories?

Yes, most *.dll files in "c:/php/sapi"
So I changed it to
extension_dir = "c:\php\sapi"

However, it still doesn't work. Apache runs normally, just show
error message, so maybe I should forget it. I just wonder where is
wrong.

Nancy
Typically it's c:/php/extensions.

Jul 17 '05 #11

P: n/a
On 24 Jul 2004 13:36:48 -0700, wx*****@hotmail.com (Nancy) wrote:
Hi,
> I don't know how to change this part, but I tried many ways, let
> extensions_dir = "./system32" ; my php_msql.dll in this directory
Does that exist? '.' is 'current directory' so depends on context at
runtime...

Yes, there exists '.'.


There exist many '.' directories, since it stands for current directory.
Current directory depends on context, so it's not a good idea to use that.
> extensions_dir = "c:/system32"


Does that exist?

Sorry, it should be
extension_dir = "c:/windows/system32"


For what reason did you set it to that?
> extensions_dir = "c:/php"


Is the file actually in any of those directories?

Yes,


In which one?
most *.dll files in "c:/php/sapi"
That wasn't on the list you posted, so that would make the answer "No"... ?
So I changed it to
extension_dir = "c:\php\sapi"
Why did you set it to that? There's no extension DLLs in there unless you've
seriously messed with your install.
However, it still doesn't work. Apache runs normally, just show
error message, so maybe I should forget it. I just wonder where is
wrong.
If you're loading the php_mysql.dll or php_msql.dll or whichever one you are
actually trying to load, presumably it is to get access to the functions it
provides. If that error appears, none of the functions will work, so it's
hardly running "normally".

If you actually don't need those functions, then comment out the line in
php.ini that's trying to load it.
Nancy

Typically it's c:/php/extensions.


Have you tried setting it to c:/php/extensions yet? That's where it's supposed
to be.

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

P: n/a
Hi,
When I changed it to
wxtersions_dir = "c:/php"
It shows new error
"Unable to load dynamic library 'c:\php4\php_msql.dll'..."
and,
"The requested operation has failed."

What's difference between php and php4?

Thanks a lot.
Nancy
Andy Hassall <an**@andyh.co.uk> wrote in message news:<l2********************************@4ax.com>. ..
On 24 Jul 2004 07:18:06 -0700, wx*****@hotmail.com (Nancy) wrote:
I don't know how to change this part, but I tried many ways, let
extensions_dir = "./system32" ; my php_msql.dll in this directory


Does that exist? '.' is 'current directory' so depends on context at
runtime...
extensions_dir = "c:/system32"


Does that exist?
extensions_dir = "c:/php"


Is the file actually in any of those directories?

Typically it's c:/php/extensions.

Jul 17 '05 #13

P: n/a
On 24 Jul 2004 15:49:53 -0700, wx*****@hotmail.com (Nancy) wrote:
Andy Hassall <an**@andyh.co.uk> wrote in message news:<l2********************************@4ax.com>. ..
On 24 Jul 2004 07:18:06 -0700, wx*****@hotmail.com (Nancy) wrote:

Is the file actually in any of those directories?
Typically it's c:/php/extensions.
When I changed it to
wxtersions_dir = "c:/php"


What's "wxtersions_dir"? Why are you setting it to "c:/php" ?
It shows new error
"Unable to load dynamic library 'c:\php4\php_msql.dll'..."
and,
"The requested operation has failed."

What's difference between php and php4?


It indicates that what you've posted has no relation to what you've actually
done?

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

P: n/a
> > When I changed it to
wxtersions_dir = "c:/php"
What's "wxtersions_dir"?

I am very sorry. It should be
"extension_dir = "c:\php""
Why are you setting it to "c:/php" ? Since you suggested me to set the extension_dir to c:\php and my
php.exe in this directory and *.dll files in c:\php\sapi (in fact it
is c:/php/sapi ).

It shows new error
"Unable to load dynamic library 'c:\php4\php_msql.dll'..."
and,
"The requested operation has failed."

What's difference between php and php4?


It indicates that what you've posted has no relation to what you've actually
done?


Er,... this new error message appears because I changed
extension_dir of php.ini.

Thanks a lot.

Nancy
Jul 17 '05 #15

P: n/a
Andy Hassall <an**@andyh.co.uk> wrote in message news:<iu********************************@4ax.com>. ..
On 24 Jul 2004 13:36:48 -0700, wx*****@hotmail.com (Nancy) wrote:
Hi,
> I don't know how to change this part, but I tried many ways, let
> extensions_dir = "./system32" ; my php_msql.dll in this directory

Does that exist? '.' is 'current directory' so depends on context at
runtime... Yes, there exists '.'.


There exist many '.' directories, since it stands for current directory.
Current directory depends on context, so it's not a good idea to use that.
> extensions_dir = "c:/system32"

Does that exist?

Sorry, it should be
extension_dir = "c:/windows/system32"


For what reason did you set it to that?

No reason, just try because my php.ini in this directory
> extensions_dir = "c:/php"

Is the file actually in any of those directories? Yes,


In which one?
most *.dll files in "c:/php/sapi"


That wasn't on the list you posted, so that would make the answer "No"... ?

??? Not understand!
So I changed it to
extension_dir = "c:\php\sapi"
Why did you set it to that? There's no extension DLLs in there unless you've
seriously messed with your install.

All my *.dll files in "c:/php/sapi" directory and in my httpd.conf,
there is
LoadModule php4_module c:/php/sapi/php4apache2.dll

So I think when Apache starts, it loads extension DLLs from this
directory. And php_msql.dll is also in this directory. I just don't
understand why it cann't be loaded. It looks there are some other
parts or files which I set maybe not correct. But what is that?...

In my php.ini file, if I set
extension_dir = "c:\php"
Or
extension_dir = "./"
Or
extension_dir = "c:\php\extensions"
Or
extension_dir = "c:\php\extension"
The results are same, "unable to load dynamic library
'c:\php4\php_msql.dll' ..."

If I set,
extension_dir = "c:\php\sapi"
Or
extension_dir = "./"
The results will be, "unable to load dynamic library
'c:\php\sapi\php_msql.dll' ... "
However, it still doesn't work. Apache runs normally, just show
error message, so maybe I should forget it. I just wonder where is
wrong.


If you're loading the php_mysql.dll or php_msql.dll or whichever one you are
actually trying to load, presumably it is to get access to the functions it
provides. If that error appears, none of the functions will work, so it's
hardly running "normally".

If you actually don't need those functions, then comment out the line in
php.ini that's trying to load it.

You are right, I don't need msql.dll. I think Apache didn't load
this module sucessfully. But all other parts of my Apache works fine.
I don't know which line I should comment? If I comment the line of
extension_dir = ...
The whole php4 module will not be loaded - a new error message
appears. This is why I asked what is difference between php and php4.

Thank you very much!

Nancy
Jul 17 '05 #16

P: n/a
On 25 Jul 2004 14:39:25 -0700, wx*****@hotmail.com (Nancy) wrote:
Andy Hassall <an**@andyh.co.uk> wrote in message news:<iu********************************@4ax.com>. ..
On 24 Jul 2004 13:36:48 -0700, wx*****@hotmail.com (Nancy) wrote:
Does that exist?
Sorry, it should be
extension_dir = "c:/windows/system32"
For what reason did you set it to that?

No reason, just try because my php.ini in this directory


(1) Why is your php.ini in there?
(2) If it's looking for php_msql.dll, and php_msql.dll isn't in there, then
why set it to that directory for "no reason" - it's not going to work.
So I changed it to
extension_dir = "c:\php\sapi"


Why did you set it to that? There's no extension DLLs in there unless you've
seriously messed with your install.


All my *.dll files in "c:/php/sapi" directory and in my httpd.conf,
there is
LoadModule php4_module c:/php/sapi/php4apache2.dll


No, not all the .dll files are in the sapi directory. Only the .dll files
relating to SAPI, i.e. loading PHP as a module into a webserver, are in there.
All the DLLs relating to extensions are in the extensions directory.
So I think when Apache starts, it loads extension DLLs from this
directory.
Apache doesn't load PHP extension DLLs, it loads the PHP SAPI DLL, and PHP
then loads its own extension DLLs from the extension_dir directory.
And php_msql.dll is also in this directory.
Why is php_msql.dll in the sapi directory? I suggest you wipe your install of
PHP as it looks like it's been messed around with and just get a fresh copy
from php.net.
I just don't understand why it cann't be loaded. It looks there are some other
parts or files which I set maybe not correct. But what is that?...
Well, presumably the php_msql.dll requires other DLLs. It's the extension for
MS SQL Server isn't it? Do you have SQL Server or its client installed? (I
don't use SQL Server so can't comment on what you'd need).
In my php.ini file, if I set
extension_dir = "c:\php"
Or
extension_dir = "./"
Or
extension_dir = "c:\php\extensions"
Or
extension_dir = "c:\php\extension"
The results are same, "unable to load dynamic library
'c:\php4\php_msql.dll' ..."
You set it to wherever your extensions directory is, don't just randomly set
it to other directories. It's this random changing of settings without any
apparent method behind it that I keep commenting on.
If I set,
extension_dir = "c:\php\sapi"
Or
extension_dir = "./"
The results will be, "unable to load dynamic library
'c:\php\sapi\php_msql.dll' ... "


If it exists in the sapi directory, it's in the wrong place.
If it doesn't exist in the sapi directory, then why set it to that directory.
> However, it still doesn't work. Apache runs normally, just show
>error message, so maybe I should forget it. I just wonder where is
>wrong.


If you're loading the php_mysql.dll or php_msql.dll or whichever one you are
actually trying to load, presumably it is to get access to the functions it
provides. If that error appears, none of the functions will work, so it's
hardly running "normally".

If you actually don't need those functions, then comment out the line in
php.ini that's trying to load it.

You are right, I don't need msql.dll. I think Apache didn't load
this module sucessfully. But all other parts of my Apache works fine.
I don't know which line I should comment? If I comment the line of
extension_dir = ...


I didn't say comment extension_dir, I said comment out the line that loads
php_msql.dll. Find the line that says "extension=php_msql.dll" and add a ";" to
the start to comment it out.

You probably ought to just do that for all the extensions until you know you
need one.

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

P: n/a
On 25 Jul 2004 13:46:18 -0700, wx*****@hotmail.com (Nancy) wrote:
> When I changed it to
> wxtersions_dir = "c:/php"


What's "wxtersions_dir"?

I am very sorry. It should be
"extension_dir = "c:\php""
Why are you setting it to "c:/php" ?

Since you suggested me to set the extension_dir to c:\php


No, I didn't. I've said to set it to c:\php\extensions a few times.

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

P: n/a
Hi,
Thanks God, I got my Apache works perfect. Just as you told me, I
set (php.ini),
extension_dir = "c:\php\extensions"
And commented out the line
extension=php_msql.dll

HOwever, If I didn't comment out the line
extension=php_msql.dll
When I restart my server, it show the following error,
"unable to load dynamic library 'c:\php4\php_msql.dll' ..."

May I ask you why? I don't have any directory called 'php4' and I
didn't set and extension directory to php4. Thank you very much!

Nancy
Jul 17 '05 #19

P: n/a
On 27 Jul 2004 19:01:31 -0700, wx*****@hotmail.com (Nancy) wrote:
Thanks God, I got my Apache works perfect. Just as you told me, I
set (php.ini),
extension_dir = "c:\php\extensions"
And commented out the line
extension=php_msql.dll

HOwever, If I didn't comment out the line
extension=php_msql.dll
When I restart my server, it show the following error,
"unable to load dynamic library 'c:\php4\php_msql.dll' ..."

May I ask you why? I don't have any directory called 'php4' and I
didn't set and extension directory to php4. Thank you very much!


It looks like there are a number of hardcoded paths that PHP may fall back to
if all else fails from the ini file:

root@server:/usr/src/php-4.3.8# find . -type f | xargs grep 'c\:\\\\php4'
../main/config.w32.h:#define PEAR_INSTALLDIR "c:\\php4\\pear"
../main/config.w32.h:#define PHP_BINDIR "c:\\php4"
../main/config.w32.h:#define PHP_DATADIR "c:\\php4"
../main/config.w32.h:#define PHP_EXTENSION_DIR "c:\\php4"
../main/config.w32.h:#define PHP_INCLUDE_PATH ".;c:\\php4\\pear"
../main/config.w32.h:#define PHP_LIBDIR "c:\\php4"
../main/config.w32.h:#define PHP_LOCALSTATEDIR "c:\\php4"
../main/config.w32.h:#define PHP_PREFIX "c:\\php4"
../main/config.w32.h:#define PHP_SYSCONFDIR "c:\\php4"

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

This discussion thread is closed

Replies have been disabled for this discussion.