By twohills on
can anyone tell us why Apache 2.2 refuses to find PHP5's libmysql.dll and hence php_mysqli.dll load fails. libmysql.dll is in c:/php and c:/php is in the windows system path, but ti ddoesn't work. My kludge-around is to copy libmysql.dll to c:/windows/system32. Don't like doing it but it works. Anyone shed some light?
Comments
WAMP Setup?
I put (drive letter):\php and (drive letter):\php\ext in my Windows environment global path (need to restart Windows to take effect), and both dll files are in the \ext folder. Oh, my "extention_dir" variable in php.ini is "./ext/", so you can adjust that and the env path for your own installation. Actually have the include_path variable commented out. I am using Apache HTTP 2.2.4, PHP 5.2.1 and MySQL 5.0.37; it works for me. I am sure someone can improve on this.
You may wish to use the MySQLi connectors for Windows from the MySQL site; I have had problems in the past with the set delivered with PHP.
PHP installer adds c:\php in PATH variable but not c:\php\ext
isn't it frightening what you miss when you have been workign on somethign too long!! thankyou, you pointed me to what was too obvious for me to notice. The PHP Windows installer adds c:\php in the PATH variable but not c:\php\ext!
Welcome!
It's a Windows thing; do not trust the "automatics." I try not to use the installer (get the zip file); dump the files into a folder, and set my own variables. Keeps me in touch, takes the "assume" out of the equation, and I cannot blame anyone but myself if something goes wrong.
Only wish my typing was better, though. So many problems due to typos...
Installation instructions for Apache/PHP on WinXP SP2
The following installation instructions worked for me:
Install the Apache 2.2 webserver
Install PHP 5.2
Configure PHP
Configure Apache
Restart Apache after configuration of PHP and Apache
C:/Program files or any path with spaces in it
Cool, thanks! That deserves to be a handbook page.
Note that C:/Program files or any path with spaces in it can still cause problems with some software, so I prefer to install Apache to C:/apache2 and PHP to C:/php
Update: If the "Loaded configuration File" is C:\WINDOWS\php.ini
Browse once more to http://localhost/info.php (replace localhost with the real server name if on a remote machine). If you see a lengthy web page showing the status of the PHP installation (PHP Version 5.2.2), the Apache/PHP installation was successful. Lookup the value of "Loaded Configuration File". This is the PHP ini file that will be read by Apache.
If the "Loaded configuration File" is C:\WINDOWS\php.ini
Sometimes the PHP installer incorrectly sets the value of the PHPIniDir variable in the Apache configuration file (single instead of double backslashes, trailing backslashes). Another possibility is that the path is actually incorrect. In either case the PHP configuration file (php.ini) is not read (since the PHP installer does not create a php.ini file in C:\WINDOWS)
Browse again to http://localhost/info.php (replace localhost with the real server name if on a remote machine) and verify again the value of "Loaded Configuration File": it should now read "C:\Program Files\PHP\php.ini".