Xampp 7.3 looking in wrong directory for dll extensions

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Xampp 7.3 looking in wrong directory for dll extensions

Postby TomXampp » 20. December 2018 03:01

The extension directives in php.ini are not looking in the correct directory.

Starting with the Xampp 7.2.#, the extension directives did not require the 'php_' prefix nor the '.dll' file extension, hence, to specify php_bz2.dll, you only needed to provide:

Code: Select all
extension=bz2


...and it would locate the dll in C:\xampp\php\ext\, which is where the extensions are located by default on my Windows set-up.

When I upgraded to Xampp 7.3, I received an error message for each of the extensions specified in php.ini, each like this:

[20-Dec-2018 01:55:08 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'php_bz2' (tried: C:\php\ext\php_bz2 (The specified module could not be found.), C:\php\ext\php_php_bz2.dll (The specified module could not be found.)) in Unknown on line 0


The error here is that Xampp is looking for the extensions in C:\php\ext, not in C:\Xampp\php\ext, where they're kept on my system.

The work-around is to spell out the location in full, like this:

Code: Select all
extension=C:\Xampp\php\ext\php_bz2.dll


This works, but it's inconvenient.

Is the directory location of the extensions stored in a variable anywhere, either in an INI file or an environment variable? If I could edit it once there, I'd be spared having to specify the full path name of the file each time.

Many thanks,
Tom
TomXampp
 
Posts: 54
Joined: 12. March 2015 03:58
Operating System: Windows 8.1

Re: Xampp 7.3 looking in wrong directory for dll extensions

Postby Nobbie » 20. December 2018 12:35

TomXampp wrote:...and it would locate the dll in C:\xampp\php\ext\, which is where the extensions are located by default on my Windows set-up.


Nonsense. PHP does not know anything about Xampp. Its due to the value of extension_dir in php.ini.

TomXampp wrote:Is the directory location of the extensions stored in a variable anywhere, either in an INI file or an environment variable?


http://php.net/manual/en/ini.core.php#ini.extension-dir

I just downloaded and installed Xampp 7.3 for Windows, in php.ini there is

Code: Select all
extension_dir="C:\xampp\php\ext"


and all extensions are loading from C:\xampp\php\ext. Probably you must have changed something in php.ini, out of the box it runs fine.
Nobbie
 
Posts: 10668
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 86 guests