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

PHP extension directory not consistent with PECL installed extensions #11618

Closed
deeky666 opened this issue Dec 11, 2015 · 0 comments
Closed

PHP extension directory not consistent with PECL installed extensions #11618

deeky666 opened this issue Dec 11, 2015 · 0 comments

Comments

@deeky666
Copy link
Contributor

I ran into a problem when trying to install PHP + PECL extensions (via phpPackages package).
When PHP compiles, it installs extensions configured during build into a default directory like lib/php/extensions/no-debug-zts-20131226 which differs for each PHP version and compile configurations (like ZTS support).
When installing PECL extensions via phpPackages ontop of PHP, they are installed into a fixed directory lib/php/extensions which makes it impossible to load those via php.ini (without knowing the absolute path) as PHP expects them to find in lib/php/extensions/no-debug-zts-20131226.
In scenarios where you define your php.ini outside of nix context, it is impossible to load the PECL extensions.

I wonder if a consistent extension directory for both PHP and PECL extensions could be established. Maybe the PHP package could set the EXTENSION_DIR (see here) environment variable to lib/php/extensions before configure like it is done in the PECL builder.

That would make it much easier to configure PHP extensions.

See my profile to get an impression:

root@a4a1c46b4e9a:/# ls -ali /nix/var/nix/profiles/zosch/lib/php/extensions/                      
total 24
13778796 dr-xr-xr-x 2 root nixbld 4096 Jan  1  1970 .
13778778 dr-xr-xr-x 3 root nixbld 4096 Jan  1  1970 ..
13778797 lrwxrwxrwx 1 root nixbld   85 Jan  1  1970 apcu.so -> /nix/store/xwiamby7pbnx8zmwpa68rqbmgwal7v97-php-apcu-4.0.7/lib/php/extensions/apcu.so
13778798 lrwxrwxrwx 1 root nixbld   95 Jan  1  1970 no-debug-zts-20131226 -> /nix/store/5bv024pmkg4p6kx49b5g3mqycbsfyz6w-php-5.6.15/lib/php/extensions/no-debug-zts-20131226
13778799 lrwxrwxrwx 1 root nixbld   94 Jan  1  1970 pthreads.so -> /nix/store/mmi3rlnqwrjn283rcq4w79jgbvnzs0lm-php-pthreads-2.0.10/lib/php/extensions/pthreads.so
13778800 lrwxrwxrwx 1 root nixbld   89 Jan  1  1970 xdebug.so -> /nix/store/dwbp7avnlcask7dd3a9ywhgis4y3hm2g-php-xdebug-2.3.1/lib/php/extensions/xdebug.so

root@a4a1c46b4e9a:/# ls -ali /nix/var/nix/profiles/zosch/lib/php/extensions/no-debug-zts-20131226/
total 444
13774978 dr-xr-xr-x 2 root nixbld   4096 Jan  1  1970 .
13774899 dr-xr-xr-x 3 root nixbld   4096 Jan  1  1970 ..
13778726 -r-xr-xr-x 1 root nixbld 268300 Jan  1  1970 opcache.a
13775037 -r-xr-xr-x 1 root nixbld 175298 Jan  1  1970 opcache.so

/cc @shlevy @globin

@shlevy shlevy closed this as completed in de327c7 Dec 11, 2015
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

1 participant