[PHP-DB] Cannot load module php_mysql.dl!!

2004-11-17 Thread colin_e
Jonathan, this appears to be an FAQ. LOts of people have the same 
problem, here's my
commentary from a couple of weeks ago-

Regards: Colin
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - - - - - - - - - - - - - - - - - - - -
I spent some time experimenting with this to get it working, and came to 
some interesting conclusions,
which the docs don't always help you with. Here's what I found-

* The libmySQL.dll (note capitalisation) that comes with the mysql 
install will NOT work with
  Apache/PHP, at least with the versions I have. Only the libmysql.dll 
shipped with the PHP
  install works.

  I don't know what the reason is, it could be a version mismatch or 
maybe mysql and PHP are
  built using different compilers, but it's a problem.

* I think if the lib shipped with mysql is first in your search path 
(but see below), it prevents the
  PHP-shipped one being seen, and prevents the module loading.

* Some apps install elements in the path using shell variables, i.e.-
  PATH Entry   Resolves To
  -   
  %SystemRoot%\system32 C:\WINDOWS\system32
  %ProgramFiles%\PHP  C:\Program Files\PHP
 It looks like Apache and/or PHP have a problem with this, and fail to 
load DLLs if their
 path is specified using a variable.

 If you list the path directories explicitly, i.e.-
  C:\WINDOWS\system32;C:\Program Files\PHP
  it works ok. I can now keep my libmysql.dll file in the PHP install 
directory, rather than
  putting a copy in WINDOWS\system32.

Nett of all this, is (for me), to get a working system I have:
1) In Apache httpd.conf:
   #
   # PHP 5 Support.
   #
   LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll"
   AddType application/x-httpd-php .php
2) System PATH:
   C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\MySQL\bin;C:\Program 
Files\PHP

3) In C:\WINDOWS\php.ini:
   extension_dir = "C:\Program Files\PHP\ext"
   extension=php_mysql.dll
4)  In C:\Program Files\PHP:
The libmysql.dll supplied with the  PHP install.
Overall this is more than a bit obscure and error-prone. My initial 
impression is that Apache 2 is still
fairly "green", for instance on my machine after a couple of basic edits 
of the httpd.conf file I now find
the server will crash if I use the Stop or Restart functions of the 
Apache Service Monitor.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - - - - - - - - - - - - - - - - - - - -

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Cannot load module php_mysql.dl!!

2004-11-11 Thread Jonathan Charette
I've got php5, apache2 and mysql4 installed.
I've got some stardocks products installed and some registry tweaks too.

My php.ini in C:\windows\ is I think correctly configured and I removed the 
; before the mysql extension. I configured Apache2 httpd.conf for php5, from 
some forum on the net. It worked before I reinstall my computer and my 
webserver. Now it gives me an error :

PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_mysql.dll'

I asked on phpfreaks.com, they told me to ask on php.net. Thats what I'm 
doing I think.. plz help me! 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php