Discover Centmin Mod today
Register Now

WHMCS nginx 1.22. vs newer version?

Discussion in 'Other Web Apps usage' started by arlon, Jul 8, 2024.

  1. arlon

    arlon Member

    95
    6
    8
    Feb 20, 2016
    Ratings:
    +12
    Local Time:
    8:48 AM
    1.13.6
    10.1
    i have been using centminmod for almost 7 years to run whmcs (centos 7, nginx 1.21.6, php 7.2 and mariadb 10.3)
    since centos 7 EOL, i want to move my whmcs to new server , i have deployed new server and installed rockylinux 8 (nginx 1.27.0, php 7.2, mariadb 10.4)

    i moved my whmcs to new server and i got weird error, my domain checker didn't work on client side. then i changed order form template from default to else, it works. its weird because i dont have error on the previous server with default order form template.
    i have checked on php error log, nginx log, mariadb log, whmcs log, i can't find the issue.

    then i downgraded my nginx to 1.22.1, my domain checker works again, my conclusion is this domain checker (default order form template) doesn't work on nginx 1.24 or above.
    can anyone explain the differences between nginx 1.22 vs newer version? why does upgrading break default domain checker template function?



    1.JPG
    Nginx 1.22.1

    2.JPG
    nginx 1.27.x 1.26.x, 1.24.
    this is my testing web
    Code:
    https://bill.netpanel.my.id/cart.php?a=add&domain=register
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,384
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    11:48 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    How did you move your site data to new Centmin Mod LEMP stack running AlmaLinux 8? Which Centmin Mod version did you move to 124.00stable, 130.00beta01, or 131.00stable or 140.00beta01 ?

    Did you have a custom php.conf include file or using the default one created when Nginx vhost was created at /usr/local/nginx/conf/php.conf and referenced in your Nginx vhost as an include file. The default php.conf include matches PHP requests to serve using
    Code (Text):
    location ~ [^/]\.php(/|$) {
      include /usr/local/nginx/conf/503include-only.conf;
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        if (!-f $document_root$fastcgi_script_name) {
            return 404;
        }
    

    Depending on PHP web app, you may need to create a copy of your /usr/local/nginx/conf/php.conf i.e. /usr/local/nginx/conf/php-whmcs.conf and use that copy as include file in your Nginx vhost with modified PHP matching for your web app.
    Or it could be related to PHP-FPM default disabling of shell_exec in /usr/local/etc/php-fpm.conf
    Code (Text):
    php_admin_value[disable_functions] = shell_exec
    

    I can't think of anything off the top of my head that is related to Nginx version used though.
     
  3. arlon

    arlon Member

    95
    6
    8
    Feb 20, 2016
    Ratings:
    +12
    Local Time:
    8:48 AM
    1.13.6
    10.1
    131.00stable
    i only changed php timezone, the error also occured on new fresh whmcs instalation.
    the error fixed by downgrading nginx to 1.22.1
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,384
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    11:48 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Interesting. Maybe check Nginx stable https://nginx.org/en/CHANGES-1.26 and Nginx mainline change logs https://nginx.org/en/CHANGES for clues

    can you post the nginx -V output and use QUOTE bbcode tags for the output for nginx 1.22.1 and then for nginx 1.2.7

    Might need to debug nginx and php-fpm. If you have a lot of free disk space, you can enable debug nginx version and compile a nginx debug build of nginx via centmin.sh option NGINX_DEBUG='y'

    You can place the option in persistent config /etc/centminmod/custom_config.inc outlined at centminmod.com/upgrade.html#persistent so place in file /etc/centminmod/custom_config.inc
    Code:
    NGINX_DEBUG='y'
    then recompile nginx via centmin.sh menu option 4 and then in your nginx error_log directive add debug option A debugging log and restart nginx and check logs

    They will be very very very verbose and lot alot to disk usage logged to error logs, so ensure you have a lot of disk free space.

    You can minimise this by limiting it to specific ip based client connections too
    After debugging is done, reverse the debug now by setting NGINX_DEBUG=n and recompile Nginx again

    What's output for these commands - post output wrapped in CODE tags
    Code (Text):
    php -v

    Code (Text):
    php -m

    Code (Text):
    php-config --configure-options


    Examples with strace below:
    With gdb backtrace and PHP debug compiled mode where centmin.sh has a PHPDEBUGMODE variable which you can set to PHPDEBUGMODE=y and recompile php via centmin.sh menu option 5 to enable debug mode for PHP-FPM. After troubleshooting set PHPDEBUGMODE=n and recompile php via centmin.sh menu option 5 again to disable debug mode.
    Code:
    PHPDEBUGMODE=n # --enable-debug PHP compile flag
    Centmin Mod is provide as is, so short of scripted related bugs or issues, any further optimisation to the web stack components - nginx, php-fpm, mariadb mysql, csf firewall etc or web app specific configurations are left to the Centmin Mod user to deal with. So I do not provide any free support for such.
     
  5. arlon

    arlon Member

    95
    6
    8
    Feb 20, 2016
    Ratings:
    +12
    Local Time:
    8:48 AM
    1.13.6
    10.1