Install fann PHP extension
To install fann extension in php, make sure that libfann (development version) is installed on your system. If it is not installed, you can install it using yum or apt-get depending on your distro.
$ yum install fann-devel
Or in Ubnuntu:
$ sudo apt-get install libfann-dev
This extension is available on PECL. The installation is very simple. Run the following command:
$ sudo pecl install fann
Then run the following commands:
$ unzip php-fann-master.zip
$ cd php-fann-master
$ make all
$ sudo make install
Now you have to update the php.ini file to load the extension in php.
Make sure the extension_dir variable is pointing to the correct directory containing fann.so file. The build will display where it is installing the PHP driver with output similar to:
Verify that the extension directory is same by using the following:
$ php -i | grep extension_dir
extension_dir => /usr/lib/php/extensions/no-debug-non-zts-xxxxxxxx =>
If it’s not, change the extension_dir in php.ini or move fann.so file to the extension_dir.
To load the extension on PHP startup, add the following line in php.ini:
Restart apache web service and you should be ready to go.