go to bug id or search bugs for
Part of the new strategy of PHP is that you do not need to place files in the c:\windows or other "global" scattered directories. This does not yet work for extensions:
Changes to the PATH environment variable are not available for PHP. Only the original PATH (before having updated the PATH) appears to be visible to PHP.
If you want to load an extension, say php_mysql.dll, and this extension needs something from the new path, say libmysql.dll, you are out of luck.
1. Install Apache 2.0 or 2.2
2. Install PHP using default instructions
3. Add PHP path to the PATH (system wide)
4. Configure Apache to use PHP
5. Place php.ini in configs/apache
6. Test Apache with PHP --> success
7. Test PATH in command prompt --> success
8. Uncomment php_mysql.dll extension line
9. Copy php_mysql.dll to extension_dir
10. Restart Apache --> error occurs
Note: for these instructions to work, it is best to leave as much of the original settings in place.
Workaround: place the offended files (php_mysql.dll and libmysql.dll) in the root location of Apache.
I expect that after installing PHP, it will look for the PATH locations and locations mentioned in php.ini. The extension location is not searched by default (for linked dlls), so that is not an option.
If you do not have the luxury to restart a server, you will have to place some needed dll files manually to these scattered locations.
The result of steps 1-10: Apache cannot be restarted. PHP raised an error. In the Event Logs of Windows you will find:
Source: Application Popup
Event ID: 26
Application popup: httpd.exe - Unable To Locate DLL : The dynamic link library LIBMYSQL.dll could not be found in the specified path C:\Program Files\Apache Software Foundation\Apache2.2\bin;.;
Add a Patch
Add a Pull Request
>Changes to the PATH environment variable are not available
> for PHP. Only the original PATH (before having updated
> the PATH) appears to be visible to PHP.
Because you need to reboot for that.
Not PHP problem.
I understand that a reboot solves the problem. But why is that needed for PHP? Other programs don't have that issue. Changing to the PATH is visible upon restarting the application.
Programs like Tomcat and Perl, or any of the Apache modules have no trouble whatsoever with changes to the PATH. The web server only needs a restart to see the changes. Not the machine. PHP is (imo) the only exception here.
Why would this be important?
Well, mostly because servers, especially advanced monitored servers, cannot be shut down easily. Upgrades to programs need to be done through Remote Desktop or Telnet. Scheduling a real system restart may take days, if not weeks. That is not acceptable in production environments (and that's where I used it).