What's installed:
php81
php81-pear
apache24
mod_php81
etc.
I need to use that specific library
This extension used to be located in ports 'net/GeoIP' ( https://www.freshports.org/net/GeoIP/ ), but not anymore
So I installed this extension with
and pear said that the extension is installed.
Include_path looks fine and pointing to the right folder
and all the files seem to be located in the right place. But I'm unable to use them in PHP code.
What am I doing wrong or what I missed?
p.s. In theory, PHP should automatically load all extensions, but it seems that this does not happen with PEAR extensions. The rest of the '*.so' extensions load normally and work as they should.
php81
php81-pear
apache24
mod_php81
etc.
I need to use that specific library
php81-pear-Net_GeoIP-1.0.0.r1_1
This extension used to be located in ports 'net/GeoIP' ( https://www.freshports.org/net/GeoIP/ ), but not anymore
So I installed this extension with
Code:
[root@freebsd /usr/local/etc]# pkg install php81-pear-Net_GeoIP
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 9 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
php81-pear: 1.10.13
php81-pear-Cache: 1.5.6_1
php81-pear-HTTP_Request: 1.4.4
php81-pear-Net_GeoIP: 1.0.0.r1_1
php81-pear-Net_Socket: 1.2.2
php81-pear-Net_URL: 1.0.15
php81-pear-XML_Parser: 1.3.8
php81-pear-XML_Serializer: 0.21.0
php81-pear-XML_Util: 1.4.5
Number of packages to be installed: 9
The process will require 3 MiB more space.
392 KiB to be downloaded.
Proceed with this action? [y/N]: y
[1/9] Fetching php81-pear-Net_Socket-1.2.2.pkg: 100% 8 KiB 7.8kB/s 00:01
[2/9] Fetching php81-pear-Net_GeoIP-1.0.0.r1_1.pkg: 100% 14 KiB 14.6kB/s 00:01
[3/9] Fetching php81-pear-HTTP_Request-1.4.4.pkg: 100% 17 KiB 17.1kB/s 00:01
[4/9] Fetching php81-pear-Cache-1.5.6_1.pkg: 100% 28 KiB 29.2kB/s 00:01
[5/9] Fetching php81-pear-Net_URL-1.0.15.pkg: 100% 7 KiB 7.4kB/s 00:01
[6/9] Fetching php81-pear-XML_Serializer-0.21.0.pkg: 100% 31 KiB 32.0kB/s 00:01
[7/9] Fetching php81-pear-XML_Util-1.4.5.pkg: 100% 18 KiB 18.6kB/s 00:01
[8/9] Fetching php81-pear-1.10.13.pkg: 100% 254 KiB 260.4kB/s 00:01
[9/9] Fetching php81-pear-XML_Parser-1.3.8.pkg: 100% 15 KiB 14.9kB/s 00:01
Checking integrity... done (0 conflicting)
[1/9] Installing php81-pear-1.10.13...
[1/9] Extracting php81-pear-1.10.13: 100%
PHP Warning: Trying to access array offset on value of type bool in /usr/local/share/pear/PEAR/DependencyDB.php on line 173
PHP Warning: Trying to access array offset on value of type bool in /usr/local/share/pear/PEAR/DependencyDB.php on line 177
PHP Warning: Trying to access array offset on value of type null in /usr/local/share/pear/PEAR/DependencyDB.php on line 177
[2/9] Installing php81-pear-Net_Socket-1.2.2...
[2/9] Extracting php81-pear-Net_Socket-1.2.2: 100%
install ok: channel://pear.php.net/Net_Socket-1.2.2
[3/9] Installing php81-pear-Net_URL-1.0.15...
[3/9] Extracting php81-pear-Net_URL-1.0.15: 100%
install ok: channel://pear.php.net/Net_URL-1.0.15
[4/9] Installing php81-pear-HTTP_Request-1.4.4...
[4/9] Extracting php81-pear-HTTP_Request-1.4.4: 100%
install ok: channel://pear.php.net/HTTP_Request-1.4.4
[5/9] Installing php81-pear-Cache-1.5.6_1...
[5/9] Extracting php81-pear-Cache-1.5.6_1: 100%
install ok: channel://pear.php.net/Cache-1.5.6
[6/9] Installing php81-pear-XML_Parser-1.3.8...
[6/9] Extracting php81-pear-XML_Parser-1.3.8: 100%
install ok: channel://pear.php.net/XML_Parser-1.3.8
[7/9] Installing php81-pear-XML_Util-1.4.5...
[7/9] Extracting php81-pear-XML_Util-1.4.5: 100%
install ok: channel://pear.php.net/XML_Util-1.4.5
[8/9] Installing php81-pear-XML_Serializer-0.21.0...
[8/9] Extracting php81-pear-XML_Serializer-0.21.0: 100%
install ok: channel://pear.php.net/XML_Serializer-0.21.0
[9/9] Installing php81-pear-Net_GeoIP-1.0.0.r1_1...
[9/9] Extracting php81-pear-Net_GeoIP-1.0.0.r1_1: 100%
warning: pear/Net_GeoIP requires PHP (version >= 5.0.0, version <= 6.0.0), installed version is 8.1.32
install ok: channel://pear.php.net/Net_GeoIP-1.0.0RC1
[root@freebsd /usr/home/domains/__hosts]#
and pear said that the extension is installed.
Code:
[root@freebsd /usr]# pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.4.14 stable
Cache 1.5.6 stable
Console_Getopt 1.4.3 stable
HTTP_Request 1.4.4 stable
Net_GeoIP 1.0.0RC1 beta
Net_Socket 1.2.2 stable
Net_URL 1.0.15 stable
PEAR 1.10.13 stable
Structures_Graph 1.1.1 stable
XML_Parser 1.3.8 stable
XML_Serializer 0.21.0 beta
XML_Util 1.4.5 stable
Include_path looks fine and pointing to the right folder
.:/usr/local/share/pear
and all the files seem to be located in the right place. But I'm unable to use them in PHP code.
Code:
[root@freebsd /usr/local/etc]# php -r 'print phpinfo();' | grep PEAR
[root@freebsd /usr/local/etc]#
What am I doing wrong or what I missed?
p.s. In theory, PHP should automatically load all extensions, but it seems that this does not happen with PEAR extensions. The rest of the '*.so' extensions load normally and work as they should.