leokhoa / laragon

Laragon is a portable, isolated, fast & powerful universal development environment for PHP, Node.js, Python, Java, Go, Ruby. It is fast, lightweight, easy-to-use and easy-to-extend.
https://laragon.org
4.16k stars 354 forks source link

APCu Module Initialization Error with PHP 8.3.2 NTS on Windows #671

Open miztizm opened 4 months ago

miztizm commented 4 months ago

Description

When running Symfony console commands that utilize the APCu cache on Laragon with PHP 8.3.2 NTS, I encounter a startup warning stating that the APCu module cannot be initialized due to a mismatch between the module API and the PHP compiled API.

Steps to Reproduce

  1. Install Laragon 6 with Apache httpd-2.4.54-win64-VS16.
  2. Use PHP php-8.3.2-nts-Win32-vs16-x64.
  3. Download and enable APCu from https://github.com/krakjoe/apcu/releases/tag/v5.1.23, specifically the apcu-8.3-x64-nts.zip version.
  4. Run php bin/console app:migrate -u from the project directory.

Expected Behavior

APCu initializes without any warnings, and the Symfony console command executes as expected.

Current Behavior

The following warning is displayed, and APCu does not initialize correctly:

Warning: PHP Startup: apcu: Unable to initialize module Module compiled with module API=20230831 PHP compiled with module API=20220829 These options need to match in Unknown on line 0

Possible Solution

It seems that there is either an issue with the APCu build provided for PHP 8.3.2 NTS or a compatibility issue with Laragon's PHP setup. Ensuring that APCu is compiled against the same API version as the PHP version provided with Laragon might resolve the issue.

Environment

Additional Information

Any guidance on resolving this mismatch or providing the correct APCu builds for Laragon's PHP would be greatly appreciated.