1

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.ini

  • error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT in php.ini

  • I 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.

2
  • 1
    PHP is complaining that it's calling an undefined method. This is not a problem with PHP or your web server, but something wrong with the way you've installed Joomla. Try asking on Joomla Commented Feb 9, 2022 at 22:45
  • akeeba kickstart also gives similiar error. There is only one way to unzip fresh full Joomla. So it is not related to Joomla directly. Something in Joomla or Akeeba causes the problem with server Commented Feb 9, 2022 at 22:48

1 Answer 1

1

I have resolved the issue by converting server to Rocky Linux from Almalinux. I dont know exactly what was the issue but exact same server configuration worked

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.