Roundcube Community Forum

 

Im confused from updating from 1.7 to fresh 1.7

Started by Dmitry42, October 20, 2025, 08:37:53 AM

Previous topic - Next topic

Dmitry42

#15
I use this
<?php
echo '-';
echo 
$_SERVER['PATH_INFO'];
echo 
'-';
echo 
$_SERVER['SCRIPT_FILENAME'];
echo 
'';

https://10.1.1.1/tets.php/123

QuotePATH_INFO /123
SCRIPT_FILENAME /var/www/html/webmail/public_html/tets.php

if I use try_files then:
the same URL https://10.1.1.1/tets.php/123 give me
Quote404 Not Found

and https://10.1.1.1/tets.php give me
QuotePATH_INFO empty
SCRIPT_FILENAME /var/www/html/webmail/public_html/tets.php

Dmitry42

#16
now I test config like this:

    location ~ \.php(?:$|/) {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;

        if (!-f $document_root$fastcgi_script_name) {
                return 404;
        }

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        include fastcgi_params;
        fastcgi_param HTTPS on;
        fastcgi_param modHeadersAvailable true;
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
        fastcgi_intercept_errors on;
        fastcgi_buffers 4 256k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_read_timeout 180s;
    }

replace TRY_FILES with IF

dea75

no, it doesn't work.

Black and white page that require login.. no skin, no graphics.

try_files $uri = 404; commented and nginx restarted....

Dmitry42

try comment all try_files in you nginx config
and check what you see in /var/log/nginx/error.log

and you try update all with composer from RC root directory (when composer.json placed)?

dea75

OK !

this is my setting:


*************************
        root /var/www/html/public_html;
        index index.php;

        location / {
                try_files $uri $uri/ /index.php?q=$uri&$args;
        }

        location ~ ^/(README.md|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
                deny all;
        }

        location ~ ^/(config|temp|logs|SQL|bin)/ {
                deny all;
        }

        location ~ /\. {
                deny all;
                access_log off;
                log_not_found off;
        }

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                include fastcgi_params;
        }
*************************

I should remove:

                try_files $uri =404;
and at this point:

location / {
                try_files $uri $uri/ /index.php?q=$uri&$args;
        }

how should I change the configuration?

Thanks !!

Luca

Dmitry42

yes try...and what about error.log and composer ?

dea75

OK, I've commented try_files sections.
The error persist, no skin.

these are the errors in log:

*****************************
2025/11/01 01:22:57 [error] 1901155#1901155: *14 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: mail.xxx.xxx, request: "GET /vendor/autoload.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.2-fpm.sock:", host: "mail.xxx.xxx"
2025/11/01 01:22:57 [error] 1901155#1901155: *14 open() "/var/www/html/public_html/favicon.ico" failed (2: No such file or directory), client: xxx.xxx.xxx.xxx, server: mail.xxx.xxx, request: "GET /favicon.ico HTTP/2.0", host: "mail.xxx.xxx", referrer: "https://mail.xxx.xxx/vendor/autoload.php"
2025/11/01 01:23:40 [error] 1901155#1901155: *14 access forbidden by rule, client: xxx.xxx.xxx.xxx, server: mail.xxx.xxx, request: "GET /config/config.inc.php HTTP/2.0", host: "mail.xxx.xxx"
2025/11/01 01:27:50 [error] 1901154#1901154: *18 open() "/var/www/html/public_html/static.php/skins/elastic/deps/bootstrap.min.css" failed (20: Not a directory), client: xxx.xxx.xxx.xxx, server: mail.xxx.xxx, request: "GET /static.php/skins/elastic/deps/bootstrap.min.css?s=1759310275 HTTP/2.0", host: "mail.xxx.xxx", referrer: "https://mail.xxx.xxx/"
2025/11/01 01:27:50 [error] 1901154#1901154: *18 open() "/var/www/html/public_html/static.php/skins/elastic/styles/styles.min.css" failed (20: Not a directory), client: xxx.xxx.xxx.xxx, server: mail.xxx.xxx, request: "GET /static.php/skins/elastic/styles/styles.min.css?s=1759310266 HTTP/2.0", host: "mail.xxx.xxx", referrer: "https://mail.xxx.xxx/"
2025/11/01 01:27:50 [error] 1901154#1901154: *18 open() "/var/www/html/public_html/static.php/plugins/jqueryui/themes/elastic/jquery-ui.min.css" failed (20: Not a directory), client: xxx.xxx.xxx.xxx, server: mail.xxx.xxx, request: "GET /static.php/plugins/jqueryui/themes/elastic/jquery-ui.min.css?s=1759310265 HTTP/2.0", host: "mail.xxx.xxx", referrer: "https://mail.xxx.xxx/"
2025/11/01 01:27:50 [error] 1901154#1901154: *18 open() "/var/www/html/public_html/static.php/program/js/jquery.min.js" failed (20: Not a directory), client: xxx.xxx.xxx.xxx, server: mail.xxx.xxx, request: "GET /static.php/program/js/jquery.min.js?s=1759310271 HTTP/2.0", host: "mail.xxx.xxx", referrer: "https://mail.xxx.xxx/"
2025/11/01 01:27:50 [error] 1901154#1901154: *18 open() "/var/www/html/public_html/static.php/program/js/common.min.js" failed (20: Not a directory), client: xxx.xxx.xxx.xxx, server: mail.xxx.xxx, request: "GET /static.php/program/js/common.min.js?s=1759310265 HTTP/2.0", host: "mail.xxx.xxx", referrer: "https://mail.xxx.xxx/"
*****************************