PHP Extension loaded / but not loaded???
Posted by: NuAngel (---.neo.res.rr.com)
Date: December 01, 2022 04:05AM

I added a PHP extension, PHP APCU... it is in the Apache PHP.ini file, the DLL file is in the correct EXT directory and the path to the directory is correctly defined in the ini file, etc... in the left click menu under PHP extensions it is listed there, and has a green checkmark. There is no warning about not being defined in the ini file.

However, when I would click the option to "show enabled extensions" and it pops up that console with the white screen, APCU is suddenly not one of the extensions showing as loaded.

Nothing I did this morning was able to get it to show... the DLL file is there, WAMPManager clearly saw it and gave the green check mark, but PHP 8.1.13 was not seeing the file.

This was a very frustrating morning, I ended up having to roll back to a previous snapshot losing about 9 man-hours of work on a major upgrade because the file that was very clearly in the directory was not being picked up by PHP. Any ideas why?

Options: ReplyQuote
Re: PHP Extension loaded / but not loaded???
Posted by: Otomatic (Moderator)
Date: December 01, 2022 08:55AM

Hi,

apcu is not part of the distributions of the different versions of PHP by php.net and thus is not part of the distributions of the Wampserver addons.

See [www.php.net]

The extension addon line(s) must be in the phpForApache.ini and php.ini files of the PHP versions used.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: PHP Extension loaded / but not loaded???
Posted by: NuAngel (---.neo.res.rr.com)
Date: December 01, 2022 05:40PM

Otomatic Wrote:
-------------------------------------------------------

>
> The extension addon line(s) must be in the
> phpForApache.ini and php.ini files of the PHP
> versions used.


It must be in *both* the phpForApache and the php.ini files? I would have thought that just being in the phpForApache file would be enough? Or the PHP.ini file? But it does need to be in both?

Although I DO think I did this, there is a chance I may not have (as I said, I had to roll-back to a previous snapshot, losing my changes).

Can you think of any other reasons that it may have appeared with a Green Check in WampManager but not been a loaded extension according to PHP?

Options: ReplyQuote
Re: PHP Extension loaded / but not loaded???
Posted by: Otomatic (Moderator)
Date: December 01, 2022 08:35PM

Hi,

phpForApache.ini IS for PHP used as Apache module.
php.ini is for PHP used as FCGI or CLI.

Green-Check says that corresponding line extension= is not commented (; at thé beginning) but doesn't say that corresponding extension is correctly loaded.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: PHP Extension loaded / but not loaded???
Posted by: Otomatic (Moderator)
Date: December 02, 2022 10:04AM

Hi,

I complete my previous answer written via a Smarphone my PC being stopped around 7pm - France time.

The green ticks on the PHP extensions mean that a loading request is made by uncommenting, i.e. removing the ; at the beginning of the line related to the desired extension, for example
extension=mbstring
which will correspond to the loading of the file e:\wamp64\bin\php8.1.13\ext\php_mbstring.dll

But this does not mean that the extension is correctly loaded.

To check that the extensions are correctly loaded, you have to use PHP itself via the get_loaded_extensions statement, which is done by:
Left-click -> PHP -> Show PHP loaded extensions
which will show the extensions actually loaded for PHP used as an Aapche module (phpForApache.ini) and for PHP used in FCGI or CLI mode (php.ini)

Most PHP extensions ONLY require the loading of the related dll file but other extensions require additional actions and/or loads to work.

This is probably the case with APCu, which is why you should consult the related documentation APCu

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.