Simple php websites work on my nginx + php-fpm server. But If I do fresh full Joomla or Akeeba kickstart I get "PHP Fatal error: Uncaught Error: Call to undefined method". Also if restart all nginx, php-fpm, mariab, only first screen comes but does go forward. Like kickstart comes but does not goto extraction page. If refresh it throws error
[09-Feb-2022 22:03:20] WARNING: [pool ******.***] child 80356 said into stderr: "NOTICE: PHP message: PHP Fatal error: Uncaught Error: Call to undefined method JLoader::setup() in /home/admin/web/******.***/public_html/libraries/import.legacy.php:52" [09-Feb-2022 22:03:20] WARNING: [pool ******.***] child 80356 said into stderr: "Stack trace:" [09-Feb-2022 22:03:20] WARNING: [pool ******.***] child 80356 said into stderr: "#0 /home/admin/web/******.***/public_html/includes/framework.php(17): require_once()" [09-Feb-2022 22:03:20] WARNING: [pool ******.***] child 80356 said into stderr: "#1 /home/admin/web/******.***/public_html/index.php(40e): require_once('/home/admin/web...')" [09-Feb-2022 22:03:20] WARNING: [pool ******.***] child 80356 said into stderr: "#2 {main}" [09-Feb-2022 22:03:20] WARNING: [pool ******.***] child 80356 said into stderr: " thrown in /home/admin/web/******.***/public_html/libraries/import.legacy.php on line 52"
Below are nginx.conf server block and php-fpm block
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_cache_bypass $no_cache;
fastcgi_no_cache $no_cache;
add_header X-Cache "no cache direct";
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_param HTTP_PROXY "";
fastcgi_index index.php;
# fastcgi_pass unix:/run/php-fpm/www.sock;
# fastcgi_pass php_upstream;
fastcgi_pass 127.0.0.1:9002;
include fastcgi3.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
}
[******.***]
listen = 127.0.0.1:9002
listen.allowed_clients = 127.0.0.1
user = nginx
group = nginx
pm = dynamic
pm.max_children = 800
pm.start_servers = 20
pm.min_spare_servers = 20
pm.max_spare_servers = 40
pm.process_idle_timeout = 20s;
pm.max_requests = 200
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
request_terminate_timeout = 300
access.log = /var/log/php-fpm/$pool.access.log
access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
slowlog = /var/log/php-fpm/www-slow.log
catch_workers_output = yes
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = On
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session
Just to clear the common pitfalls:
I have a nginx:nginx owner for
/var/lib/php/session
php-fpm gives same error msgs for www.sock or 127.0.0.1:9002
cgi.fix_pathinfo = 1
in php.inierror_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
in php.iniI have used both stream nginx and custom one from source
I have 2 other servers works fine with exactly same config and this Almalinux server instead of RockyLinux. But I don't think that this is relevant.