Aha, got it.. kind of. Apache's doing the loading, and it understands its own local path as default. So if you want to avoid setting a universal path (e.g. use system paths or creating one for PHP generically) so that you can run more than one version of PHP silmultaneously, you'd need to do something like this:
In system path (e.g. system32): the underlying extension libs (e.g. libmysqli.dll) - the alternative is to hold them locally whereever you want them, but if you do this you'd need a separate copy in apache2\bin and anywhere a php.exe needs them. In apache2\bin: copy of php5ts.dll, copy of php.ini In path_to_wherever_you_like: php5apache2.dll and php's dynamically loaded libraries (e.g. php_mysqli.dll), any other versions of PHP (cli/cgi) you fancy keeping there, a different copy of php.ini if you like (NB you could even load PHP-GTK from there because you'd be using an entirely separate PHP binary & ini to do so). Path given for both Apache's LoadModule configuration and PHP's extension_dir ini setting in apache2\bin need to match 'path_to_wherever_you_like'. My big question is, why wasn't this an issue under PHP 4? Is it a bug or a feature, and if so which version's correct? -----Original Message----- From: Steph [mailto:[EMAIL PROTECTED] Sent: 19 June 2004 16:37 To: Nuno Lopes; Gabor Hojtsy Cc: PHPdoc Subject: RE: [PHP-DOC] help needed with windows install part of the PHP manual following minor discussion with Nuno and a lot of fiddling around here.. Not being an Apache expert, I'm failing to understand why the apache2handler will only load php5apache2.dll (along with _all_ its friends, including php.ini) if it's in the apache\bin dir (directly, and don't mess with it!). I've had it running with a full path, but Nuno's right - it ignores the .ini file everywhere else when loaded as a SAPI module, so you either need to install it in apache\bin or else set the path for the .ini (or put the .ini in a system path). > > > > > > I have no clue why Nuno reports that it does not work for PHP 5. > Probably > > > the clue's in 'set PATH'. There's no reason to set PATH unless you're > doing > > > something very strange with PHP. I don't have any PHP-related > environmental > > > variables set. The php-specific shared libraries (e.g. > php_mysqli.dll) > are > > > in the same directory as the executable OR below it in a dir specified > in > > > php.ini, in 8 cases. I also have a php5 executable and php5ts.dll > running as > > > part of cygwin/bin - that's number 9. > > > > > > I have both PHP 4 and 5 versions of cgi running with Apache (switch > between > > > them depending on what I'm doing), with PHP-GTK, as cli and > as testbeds. > No > > > conflicts. > > > > This means that if we suggest people to replicate the PHP 5 package > > structure with PHP 4 (move the contents of the dlls folder and the sapi > > folder into the root PHP folder), and place php.ini there, then that > > should work without and special PATH settings either for PHP 4 or PHP 5. > > I wonder why this is not working for Nuno, it is/was hard to beleive... > > > Clarification: I have the PHP dir in the path, so that I can use the cli > version. > > Steph is using the CGI version, and I have problems with the > apache 2 module > (very different!). I need to copy the php.ini file to the windows dir, > otherwise it is not parsed. > > And I also need to copy the libmysql.dll to the system folder in order to > have the mysql extension working. > > Steph, cam you check if you get these problems, too? > > Thanks, > Nuno