My "PHP version per directory" config not working anymore after todays alt-php update
  1. Forums
  2. General
  3. General Discussion
  1. Marcin Kedzia
  2. 21.03.2016
  3.  Subscribe via email
after todays php selector/alt-php upd ate my custom \"php version per directory\" config is not working anymore.
As I can see, you removed php.d symlink to /etc/cl.php.d/alt-phpXX and now you replaced it with regular php.d directory containing default.ini file in it.
So now for example if I place line in .htaccess:
AddType application/x-httpd-php70 .php
my php version is switched to 7.0.4 in my directory but modules configured in cPanel PHP Selector are not configured anymore and not visible in phpinfo();.
Instead of php.d symlink to /etc/cl.php.d/alt-phpXX you created link directory with cons symlink in it pointing to /opt/alt/phpXX/etc/php.d instead of pointing to /etc/cl.php.d/alt-phpXX like before, which breaks my custom php version se t per directory basis.

It was your intended action or you did this by mistake or any other reason?

FYI I have LiteSpeed Web Server with CageFS and as a Command config value in lsws for PHP 7 for example I\'m using:

and this way me and my customers was able to switch PHP versions per directory basis since many months up until today.
Rate this post:
  1. 21.03.2016 17:03:46
  2. # 1
Marcin Kedzia Accepted Answer
Posts: 7
Joined: 18.04.2012
As per suggestion in the ticket I removed php.d directories and changed them to php.d symlinks pointing to /etc/cl.php.d/alt-phpXX directories.
Now everything is working like before but only until next alt-php/selector upgrade. Can you do this permanent for users not using EaseApache and MultiPHP functionality? or I will have to manually do this every time after alt-php update?
  1. 21.03.2016 18:03:18
  2. # 2
Richard Hordern Accepted Answer
Posts: 212
Joined: 19.03.2011
Same problem here, is this a bug ? Do you have a more reliable / long term solution to solve this issue ?
  1. 23.03.2016 12:03:28
  2. # 3
kernow Accepted Answer
Posts: 72
Joined: 06.08.2010
Were happy to go with:
[color=#FF0000]default, where users will get same \'default\' modules for enabled and disabled CageFS. So alt-php could be used without cagefs and without PHP-Selector[/color]
  1. 23.03.2016 16:03:26
  2. # 4
Marcin Kedzia Accepted Answer
Posts: 7
Joined: 18.04.2012
We decided to cover all possible situations and in future going to implement following functionality - there will be a config option where you choose how those symlinks will be created:
- default, where users will get same \'default\' modules for enabled and disabled CageFS. So alt-php could be used without cagefs and without PHP-Selector.
- custom, where you will get modules chosen from PHP-Selector for PHP versions when CageFS enabled. However with disabled CageFS you will get default extensions.

After implementing PHP version per directory you will set th way alt-php handle symlinks for example in /etc/cl.selector/symlinks.rules file .This way PHP per directory will keep working after updates, etc.

Let me know what you think about this.
Sounds good :)
  1. 18.04.2016 05:04:37
  2. # 5
Dalibor Kouril Accepted Answer
Posts: 1
Joined: 24.11.2015
Same problem here. Is this script correct way to fix the original state?

for VERSION in `ls /opt/alt|grep "php[0-9]"`
if [ -d "/opt/alt/$VERSION/etc/php.d" ]; then
rm -rf "/opt/alt/$VERSION/etc/php.d"
ln - "/opt/alt/$VERSION/etc/php.d" "/etc/cl.php.d/alt-$VERSION"
echo "$VERSION - OK"
  1. 03.05.2016 07:05:45
  2. # 6
  • Page :
  • 1

There are no replies made for this post yet.
Be one of the first to reply to this post!
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.

EU e-Privacy Directive

This website uses cookies to ensure you get the best experience using our website and services. If you prefer we don’t use cookies, please disable them in your browser.

You have declined cookies. This decision can be reversed.

You have allowed cookies to be placed on your computer. This decision can be reversed.