# mod_php56 package does not add php56 as dependence



## Michel P (Feb 28, 2017)

As opposite to my past install, I suprisingly discovered that mod_php5x install does no more install it's main dependence : package php5x...
Now, you have to manually add it !

It makes me spend a quite big amount of time before figure this out, it's so highly illogical 8-(


```
# pkg install mod_php56
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
mod_php56: 5.6.30
Number of packages to be installed: 1
The process will require 4 MiB more space.
1 MiB to be downloaded.
Proceed with this action? [y/N]: y
Fetching mod_php56-5.6.30.txz:   0%...
(...)
[1/1] Extracting mod_php56-5.6.30: 100%
[activating module `php5' in /usr/local/etc/apache24/httpd.conf]
Message from mod_php56-5.6.30:
***************************************************************
Make sure index.php is part of your DirectoryIndex.
You should add the following to your Apache configuration file:
<FilesMatch "\.php$">
...
</FilesMatch>
***************************************************************
```

And obviously it does not work as is.

`pkg install php56`

Now it will work (apache restart needed).
Hope this help

```
[FreeBSD XXXXXX 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64]
```


----------



## SirDice (Feb 28, 2017)

Note that www/mod_php56 isn't a "real" port but a slave port of lang/php56. As such it cannot depend on itself.


----------



## Michel P (Feb 28, 2017)

Maybe the "dependence" word I use is wrong, maybe I should have say "Requirement" ?

A mod_php56 install I made a few months ago (as other versions in older installs in the past) has installed automatically php56 when installing mod_php56... Does something changed, is it wanted and why ?


----------



## SirDice (Feb 28, 2017)

Michel P said:


> A mod_php56 install I made a few months ago (as other versions in older installs in the past) has installed automatically php56 when installing mod_php56


I'm quite sure it never did.


----------



## Michel P (Feb 28, 2017)

SirDice said:


> I'm quite sure it never did.



Really ? I'm sure it did (i'm talking of binary packages, not ports) :

I did not find the log of my install of this mod_php56 package some months ago,
but here is an extract from the log from my ssh client software (Penguinet/windows), 
it's part of a huge log from a brand new freebsd box install, back in June 2016 :

php70 was installed automatically when mod_php70 is installed, like it used to be with mod_php5x,
and today install is not the same.


```
root@ottokar:~michel # pkg install mod_php70
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        mod_php70: 7.0.7
        php70: 7.0.7

The process will require 21 MiB more space.
3 MiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching mod_php70-7.0.7.txz: 100%    1 MiB   1.2MB/s    00:01
Fetching php70-7.0.7.txz: 100%    2 MiB   2.1MB/s    00:01
Checking integrity... done (0 conflicting)
[1/2] Installing php70-7.0.7...
[1/2] Extracting php70-7.0.7: 100%
[2/2] Installing mod_php70-7.0.7...
[2/2] Extracting mod_php70-7.0.7: 100%
[activating module `php7' in /usr/local/etc/apache24/httpd.conf]
Message from mod_php70-7.0.7:
***************************************************************

Make sure index.php is part of your DirectoryIndex.

You should add the following to your Apache configuration file:

<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>

***************************************************************
root@ottokar:~michel #
root@ottokar:/usr/local/etc # pkg install php70-extensions
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 19 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        php70-extensions: 1.1
        php70-ctype: 7.0.7
        php70-iconv: 7.0.7
        php70-json: 7.0.7
(...)
```


----------



## SirDice (Feb 28, 2017)

I'm quite sure it has never pulled in lang/php56 or 7.0. But I double checked it anyway, this is on a brand new, fresh installed VM:

```
root@test11:~ # pkg -vv
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.9.4_1...
Extracting pkg-1.9.4_1: 100%
Version                 : 1.9.4
PKG_DBDIR = "/var/db/pkg";
PKG_CACHEDIR = "/var/cache/pkg";
PORTSDIR = "/usr/ports";
INDEXDIR = "";
INDEXFILE = "INDEX-11";
HANDLE_RC_SCRIPTS = false;
DEFAULT_ALWAYS_YES = false;
ASSUME_ALWAYS_YES = false;
REPOS_DIR [
    "/etc/pkg/",
    "/usr/local/etc/pkg/repos/",
]
PLIST_KEYWORDS_DIR = "";
SYSLOG = true;
ABI = "FreeBSD:11:amd64";
ALTABI = "freebsd:11:x86:64";
DEVELOPER_MODE = false;
VULNXML_SITE = "http://vuxml.freebsd.org/freebsd/vuln.xml.bz2";
FETCH_RETRY = 3;
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [
]
DEBUG_SCRIPTS = false;
PLUGINS_CONF_DIR = "/usr/local/etc/pkg/";
PERMISSIVE = false;
REPO_AUTOUPDATE = true;
NAMESERVER = "";
HTTP_USER_AGENT = "pkg/1.9.4";
EVENT_PIPE = "";
FETCH_TIMEOUT = 30;
UNSET_TIMESTAMP = false;
SSH_RESTRICT_DIR = "";
PKG_ENV {
}
PKG_SSH_ARGS = "";
DEBUG_LEVEL = 0;
ALIAS {
    all-depends = "query %dn-%dv";
    annotations = "info -A";
    build-depends = "info -qd";
    cinfo = "info -Cx";
    comment = "query -i \"%c\"";
    csearch = "search -Cx";
    desc = "query -i \"%e\"";
    download = "fetch";
    iinfo = "info -ix";
    isearch = "search -ix";
    prime-list = "query -e '%a = 0' '%n'";
    leaf = "query -e '%#r == 0' '%n-%v'";
    list = "info -ql";
    noauto = "query -e '%a == 0' '%n-%v'";
    options = "query -i \"%n - %Ok: %Ov\"";
    origin = "info -qo";
    provided-depends = "info -qb";
    raw = "info -R";
    required-depends = "info -qr";
    roptions = "rquery -i \"%n - %Ok: %Ov\"";
    shared-depends = "info -qB";
    show = "info -f -k";
    size = "info -sq";
}
CUDF_SOLVER = "";
SAT_SOLVER = "";
RUN_SCRIPTS = true;
CASE_SENSITIVE_MATCH = false;
LOCK_WAIT = 1;
LOCK_RETRIES = 5;
SQLITE_PROFILE = false;
WORKERS_COUNT = 0;
READ_LOCK = false;
PLIST_ACCEPT_DIRECTORIES = false;
IP_VERSION = 0;
AUTOMERGE = true;
VERSION_SOURCE = "";
CONSERVATIVE_UPGRADE = true;
PKG_CREATE_VERBOSE = false;
AUTOCLEAN = false;
DOT_FILE = "";
REPOSITORIES {
}
VALID_URL_SCHEME [
    "pkg+http",
    "pkg+https",
    "https",
    "http",
    "file",
    "ssh",
    "ftp",
    "ftps",
    "pkg+ssh",
    "pkg+ftp",
    "pkg+ftps",
]
ALLOW_BASE_SHLIBS = false;
WARN_SIZE_LIMIT = 1048576;
METALOG = "";


Repositories:
  FreeBSD: {
    url             : "pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
root@test11:~ # pkg install mod_php70
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01
Fetching packagesite.txz: 100%    6 MiB   2.0MB/s    00:03
Processing entries: 100%
FreeBSD repository update completed. 25860 packages processed.
Updating database digests format: 100%
The following 11 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        mod_php70: 7.0.16
        apache24: 2.4.25_1
        libxml2: 2.9.4
        expat: 2.2.0_1
        apr: 1.5.2.1.5.4_2
        gdbm: 1.12
        indexinfo: 0.2.6
        gettext-runtime: 0.19.8.1_1
        db5: 5.3.28_6
        perl5: 5.24.1.r4_1
        pcre: 8.39_1

Number of packages to be installed: 11

The process will require 143 MiB more space.
34 MiB to be downloaded.

Proceed with this action? [y/N]: n
root@test11:~ # pkg install mod_php56
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 11 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        mod_php56: 5.6.30
        apache24: 2.4.25_1
        libxml2: 2.9.4
        expat: 2.2.0_1
        apr: 1.5.2.1.5.4_2
        gdbm: 1.12
        indexinfo: 0.2.6
        gettext-runtime: 0.19.8.1_1
        db5: 5.3.28_6
        perl5: 5.24.1.r4_1
        pcre: 8.39_1

Number of packages to be installed: 11

The process will require 143 MiB more space.
34 MiB to be downloaded.

Proceed with this action? [y/N]: n
```
Same thing with latest instead of quarterly. There's no "reason" for it, the port simply doesn't have it listed as a dependency (or requirement, but that boils down to the same thing really). The reason appears quite simple, it would depend on (or require) itself. Which would result in a nice circular dependency when you try to build it 

I'm not sure why it does for you but it never pulled in PHP itself for me. Perhaps it's due to something else you installed _before_ installing www/mod_php70?


----------

