Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with php PEAR #1349

Closed
karmicdude opened this issue Jul 21, 2017 · 3 comments
Closed

Problem with php PEAR #1349

karmicdude opened this issue Jul 21, 2017 · 3 comments

Comments

@karmicdude
Copy link

I use Docker image based on alpine, php7.1-fpm with required extension, php7-pear is also installed:

$ docker-compose exec ipam sh

/ # pear version
PEAR Version: 1.10.4
PHP Version: 7.1.5
Zend Engine Version: 3.1.0
Running on: Linux ipam 4.11.8-1-zen #1 ZEN SMP PREEMPT Thu Jun 29 21:25:23 UTC 2017 x86_64

/ # php-fpm7 -m
[PHP Modules]
cgi-fcgi
Core
date
filter
gd
gettext
gmp
hash
json
ldap
libxml
mbstring
mcrypt
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
readline
Reflection
session
SimpleXML
sockets
SPL
standard
xml

/ # php-fpm7 -i | grep pear
Configure Command =>  ./configure  '--build=x86_64-alpine-linux-musl' ...
 '--with-pear=/usr/share/php7' '--with-config-file-path=/etc/php7'  ...

/ # pear config-get php_dir
/usr/share/php7

/ # php -c /etc/php7/php.ini -r 'echo get_include_path()."\n";'
.:/usr/share/php7

But phpipam return

The following required PHP extensions are missing:
php PEAR support
Please recompile PHP to include missing extensions and restart Apache.

I edited functions/checks/check_php_build.php and tried to change directive with pear check like that:

# check for PEAR functions
if ((@include_once '/usr/share/php7') != true) {
        $missingExt[] = "php PEAR support";
}

and it works, but I'd like to find what causes this problem to automate the process of update the container without kludges like an applying sed to edit a repo file.

@Park0
Copy link

Park0 commented Jul 21, 2017

What docker image did u use? Your own or a public one. In case it's public please link it.

@ursweiss
Copy link

ursweiss commented Aug 2, 2017

I think System.php should be used to check if PEAR exists. Not sure why, but seems that PEAR.php is not available in all cases.

# check for PEAR functions
if ((@include_once 'System.php') != true) {
        $missingExt[] = "php PEAR support";
}

Source:
https://pear.php.net/manual/en/installation.checking.php

System.php is shipped with every PEAR installation and ...

@GaryAllan
Copy link
Collaborator

Closing old thread. Please re-open if help is required.
See #2425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants