I'm using macOS BigSur and trying use local web server apache2. All thing's ok since I get this fatal error:
Fatal error: require_once(): Failed opening required 'PEAR.php' (include_path='.:/usr/local/lib/php/pear') in /usr/local/lib/php/pear/common.php on line 22
Try to fix it:
% php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
In php.ini file I have this include line:
display_errors = on
error_reporting = -1
include_path = ".:/usr/local/lib/php/pear"
AND:
% pear config-get php_dir
/usr/local/lib/php
% pear
Commands:
build Build an Extension From C Source
bundle Unpacks a Pecl Package
channel-add Add a Channel
channel-alias Specify an alias to a channel name
channel-delete Remove a Channel From the List ...
Pear version show:
% pear version
PEAR Version: 1.10.12
PHP Version: 7.3.24-(to be removed in future macOS)
Zend Engine Version: 3.3.24
Running on: Darwin MacBook-Pro.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
In phpInfo file I have in include_path stuff:
include_path .:/usr/local/lib/php/pear .:/usr/local/lib/php/pear
What is the problem? I need you help.
After editing /etc/php.ini file like that:
include_path = ".:/usr/local/lib/php:/usr/local/lib/php/pear"
There is now error concerning the first one. Another error occurred:
Fatal error: Cannot declare class PEAR_Common, because the name is already in use in /usr/local/lib/php/PEAR/Common.php on line 835
One solution?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.