what is php-common and what does it do?
Asked Answered
S

2

10

I am on centos 6.5 and when I install do yum install php-common it goes ahead and installs some packages, but php is still not installed. And, when I want to install php directly it is says php-common is causing conflict and does install the php module or even php-cli independently.

What is php-common used for?

Spears answered 25/4, 2014 at 14:3 Comment(2)
redhat/centos compile php to be pretty modular, and a lot of modules that are normally compiled directly into php are instead compiled as modules, and they go into the php-common package.Jeanmariejeanna
So the php-common package is not php itself, but list of extensions for a php package, that ought to be installed independently. @MarcBSpears
J
10

To answer the question, here's what's in php-common on Redhat Enterprise 6.4 version of the package:

[marc@foo ~]$ rpm -ql php-common
/etc/php.d
/etc/php.d/curl.ini
/etc/php.d/fileinfo.ini
/etc/php.d/json.ini
/etc/php.d/phar.ini
/etc/php.d/zip.ini
/etc/php.ini
/usr/lib64/php
/usr/lib64/php/modules
/usr/lib64/php/modules/curl.so
/usr/lib64/php/modules/fileinfo.so
/usr/lib64/php/modules/json.so
/usr/lib64/php/modules/phar.so
/usr/lib64/php/modules/zip.so
/usr/lib64/php/pear
/usr/share/doc/php-common-5.3.3
/usr/share/doc/php-common-5.3.3/CODING_STANDARDS
/usr/share/doc/php-common-5.3.3/CREDITS
/usr/share/doc/php-common-5.3.3/EXTENSIONS
/usr/share/doc/php-common-5.3.3/INSTALL
/usr/share/doc/php-common-5.3.3/LICENSE
/usr/share/doc/php-common-5.3.3/NEWS
/usr/share/doc/php-common-5.3.3/README.EXTENSIONS
/usr/share/doc/php-common-5.3.3/README.EXT_SKEL
/usr/share/doc/php-common-5.3.3/README.MAILINGLIST_RULES
/usr/share/doc/php-common-5.3.3/README.PARAMETER_PARSING_API
/usr/share/doc/php-common-5.3.3/README.PHP4-TO-PHP5-THIN-CHANGES
/usr/share/doc/php-common-5.3.3/README.REDIST.BINS
/usr/share/doc/php-common-5.3.3/README.RELEASE_PROCESS
/usr/share/doc/php-common-5.3.3/README.SELF-CONTAINED-EXTENSIONS
/usr/share/doc/php-common-5.3.3/README.STREAMS
/usr/share/doc/php-common-5.3.3/README.SUBMITTING_PATCH
/usr/share/doc/php-common-5.3.3/README.SVN-RULES
/usr/share/doc/php-common-5.3.3/README.TESTING
/usr/share/doc/php-common-5.3.3/README.TESTING2
/usr/share/doc/php-common-5.3.3/README.UNIX-BUILD-SYSTEM
/usr/share/doc/php-common-5.3.3/README.WIN32-BUILD-SYSTEM
/usr/share/doc/php-common-5.3.3/README.input_filter
/usr/share/doc/php-common-5.3.3/README.namespaces
/usr/share/doc/php-common-5.3.3/TSRM_LICENSE
/usr/share/doc/php-common-5.3.3/ZEND_CHANGES
/usr/share/doc/php-common-5.3.3/ZEND_LICENSE
/usr/share/doc/php-common-5.3.3/php.ini-development
/usr/share/doc/php-common-5.3.3/php.ini-production
/usr/share/doc/php-common-5.3.3/regex_COPYRIGHT
/usr/share/php
/var/lib/php

As you can see, it basically contains the .so modules for curl, zip, fileinfo, json, and phar, plus license/support files.

Jeanmariejeanna answered 25/4, 2014 at 14:14 Comment(0)
P
1

What is package php-common and what does it ?

Its is a php package that includes common files for PHP packages, this package contains common utilities shared among all packaged PHP versions. The php-common package contains files used by both the php package and the php-cli package.

 Package: php-common  

The php-common package provides followings commands to manage PHP modules:

   phpenmod – Used to enable modules in PHP
   phpdismod – Used to disable modules in PHP
   phpquery – Used to view status of modules of PHP

Use phpenmod command followed by module name to enable specific PHP module on your system:

### Syntax
$phpenmod MODULE_NAME

You can also define the PHP version using -v switch to enable specific modules:

### Syntax
$phpenmod -v <PHP VERSION> <MODULE NAME>

You can also disable any un-necessary PHP modules from your system using phpdismod command:

$phpdismod mbstring
Potemkin answered 5/5, 2019 at 22:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.