1 year ago

#334837

test-img

Mathis Detremmerie

Joomla Index.php not working PHP error error] 43979#0: *3 FastCGI sent in stderr:

I am trying to get joomla to work on nginx with postgresql. But i get this error in the error.log of nginx. I am running AlmaLinux8

10:24:55 [error] 43029#0: *3 FastCGI sent in stderr: "PHP message: PHP Warning:  SessionHandler::read(): open(/var/lib/php/session/sess_pdma2qg4ua4jock4llrgqqfn0t, O_RDWR) failed: Permission denied (13) in /var/www/html/libraries/vendor/joomla/session/src/Storage/NativeStorage.php on line 478PHP message: PHP Warning:  session_start(): Failed to read session data: user (path: /var/lib/php/session) in /var/www/html/libraries/vendor/joomla/session/src/Storage/NativeStorage.php on line 478PHP message: PHP Warning:  SessionHandler::read(): open(/var/lib/php/session/sess_l85tvgu52694uvci3nnfm2iomr, O_RDWR) failed: Permission denied (13) in /var/www/html/libraries/vendor/joomla/session/src/Storage/NativeStorage.php on line 478PHP message: PHP Warning:  session_start(): Failed to read session data: user (path: /var/lib/php/session) in /var/www/html/libraries/vendor/joomla/session/src/Storage/NativeStorage.php on line 478" while reading response header from upstream, client: 192.168.0.7, server: thematrix.local, request: "GET /installation/index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "192.168.0.252"
2022/03/25 10:24:55 [error] 43029#0: *3 open() "/var/www/html/50x.html" failed (2: No such file or directory), client: 192.168.0.7, server: thematrix.local, request: "GET /installation/index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock", host: "192.168.0.252"

This is when i just enter my ip into the browser.

My nginx conf file:

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  thematrix.local www.thematrix.local;
        root         /var/www/html/;
        index index.php index.html index.htm;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;
        
        location / {
        try_files $uri $uri /index.php?$args;
        index index.html index.htm index.php;
        }

        location ~ \.php$ {
            include fastcgi.conf;
            fastcgi_pass unix:/run/php/www.sock;
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

# Settings for a TLS enabled server.
#
    server {
        listen       443 ssl http2 default_server;
        listen       [::]:443 ssl http2 default_server;
        server_name  thematrix.local www.thematrix.local;
        root         /var/www/html/;
        index index.php index.html index.htm;

        ssl_certificate "/etc/nginx/ssl/thematrix.local.crt";
        ssl_certificate_key "/etc/nginx/ssl/thematrix.local.key";
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout  10m;
        ssl_ciphers PROFILE=SYSTEM;
        ssl_prefer_server_ciphers on;
#
#        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;
        
        location / {
            try_files $uri $uri /index.php?$args;
            index index.html index.htm index.php;
        }
        location ~ \.php$ {
            include fastcgi.conf;
            fastcgi_pass unix:/run/php/www.sock;
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

}

The weird thing is, is that i can access every other file within de root folder like readme and a test.php file i made. Those work file but index.php just doesn't work.

php

nginx

joomla

0 Answers

Your Answer

Accepted video resources