Announcement

Collapse
No announcement yet.

My "PHP version per directory" config not working anymore after todays alt-php update

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • avolkov
    replied
    Hello!

    The fix is in beta


    Documentation:

    Leave a comment:


  • dk
    replied
    Same problem here. Is this script correct way to fix the original state?

    Code:
    #!/bin/bash
    
    for VERSION in `ls /opt/alt|grep "php[0-9]"`
    
    do
    
    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"
    
    fi
    
    done

    Leave a comment:


  • cinusik
    replied
    Sounds good

    Leave a comment:


  • bogdan.sh
    replied
    That is how it works now... Thats why it breaks php per directory.
    Going to make it selectable so it will work properly for standard and for php per directories also.

    Leave a comment:


  • accounts
    replied
    Were happy to go with:
    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

    Leave a comment:


  • bogdan.sh
    replied
    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.
    or
    - 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.

    Leave a comment:


  • bogdan.sh
    replied
    We are considering this situation right now to provide a right and working solution for you. I will update this thread.

    Leave a comment:


  • bogdan.sh
    replied
    I have just talked to our developers and unfortunately there is no
    ice solution for this as PHP per directory is not officially supported by CloudLinux .

    The solution to remove php.d and made symlinks is right, and yes the same should be done after next alt-php update.

    Leave a comment:


  • clm
    replied
    Same problem here, is this a bug ? Do you have a more reliable / long term solution to solve this issue ?

    Leave a comment:


  • cinusik
    replied
    UPDATE:
    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-phpXXdirectories.
    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?

    Leave a comment:


  • My "PHP version per directory" config not working anymore after todays alt-php update

    Hello,
    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 Im using:
    /opt/alt/php70/usr/bin/lsphp

    and this way me and my customers was able to switch PHP versions per directory basis since many months up until today.
Working...
X