如何在Windows 10上安装FANN for PHP?

I followed these steps to install FANN on PHP but couldn't make it work :

  1. Add php_fann.dll to C:\xampp\php\ext
  2. Add doublefann.dll to C:\xampp\php
  3. In php.ini I added -> extension=php_fann.dll;
  4. In php.ini I set extension_dir = "C:\xampp\php\ext"
  5. Restart Apache.

I use:

  • Windows 10
  • PHP version 7.1.11 Thread safety: enabled
  • Apache: 2.4.29
  • Pear version: 1.10.1

But both var_dump(function_exists("fann_create_standard")); and var_dump(extension_loaded('php_fann')); return False. I can't figure out why.

I was able to use PHP FANN on windows 10. I did the following steps:

  1. Downloaded version corresponding to my environment at http://pecl.php.net/package/fann/1.1.1/windows.
  2. Added "php_fann.dll" to my "PHP\ext" folder.
  3. Added "extension=php_fann.dll" to my php.ini

I had trouble with wampserver, I followed these advises to download the good dll. Then I did the following steps to make it working:

  • Added "php_fann.dll" to the "C:\wamp64\bin\php\php7.2.10\ext" and "C:\wamp64\bin\apache\apache2.4.35\bin" folders.
  • Added "doublefann.dll" to the "C:\wamp64\bin\php\php7.2.10" and "C:\wamp64\bin\apache\apache2.4.35\bin" folders.
  • Added "extension=fann" to php.ini and phpForApache.ini
  • Restarted all services