Error 500 on Panel (Nginx, PHP 7.3)

Hey,

I’ve spent all day browsing through the forum to find solutions to my problem, but to no avail, so now I’m asking.

I am hosting a Kirby installation on a VPS (FreeBSD12, Nginx, PHP 7.3) and everything but the panel works. I’ve been through the “troubleshooting” section and believe, that mb_string is installed and enabled. .htaccess won’t do me any good, since I’m running Nginx. Also the installation is pretty vanilla, so no additional plugins or anything of that sort.

Here is the Nginx error message:

2019/06/06 15:46:53 [error] 1190#100120: *44 rewrite or internal redirection cycle while internally redirecting to "/panel/index.php", client: **.**.**.**, server: example.com, request: "GET /panel HTTP/1.1", host: "example.com"

My Nginx.conf:

server {
    listen 443 ssl default_server;
    listen [::]:443 ssl;
    server_name example.com www.example.com;

    ssl on;

    ssl_certificate *****/fullchain.pem;
    ssl_certificate_key *****/privkey.pem;

    root /usr/local/www/kirby;

    index index.html index.php;

    # don't hint these as folders
    rewrite ^/(content|site|kirby)$ /error last;

    # block content
    rewrite ^/content/(.*).(txt|md|mdown)$ /error last;

    # block all files in the site and kirby folder from being accessed directly
    rewrite ^/(site|kirby)/(.*)$ /error last;

    # removes trailing slashes (prevents SEO duplicate content issues)
    if (!-d $request_filename) {
        rewrite ^/(.+)/$ /$1 permanent;
    }

    # panel links
    location ~ /panel {
        try_files $uri $uri/ /panel/index.php?$uri&$args;
    }

    # site links
    location / {
        try_files $uri $uri/ /index.php?$uri&$args;
    }

    # prevent clients from accessing to backup/config/source files
    location ~ (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ {
        deny all;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php73-fpm.sock;
        #fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}

If you need any more information, please let me know!

Hey @nikken Welcome to the Kirby forum.

Not familiar with Nginx, but since the Panel doesn’t work (there is no file /panel/index.php), I’d assume this line

is causing the issue. So maybe just remove it.

See this config file as an example for Kirby 3:

(Note the example above doesn’t block access to some folders as they were put outside the web root)

Hey,

thanks for the superfast reply!

I’ve uncommented everything but

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

and

location ~ \.php$ {
    fastcgi_pass unix:/var/run/php73-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

and now I am getting this error (in the Kirby CMS Debugger):

Error

Call to undefined function Kirby\Cms\hash()

which points to /kirby/src/Cms/PanelPlugins.php:136

Might this still be an Ngnix issue? Do you need more info from the debugger?

Is there an error stack for this message?

As I said, I’m an nginx noob… so likely not a help with debugging this.

So I copied the Nginx config from the post you cited 1:1 and the error on /panel is still the same (the rest of the webpage seems to be working still, so only the panel is affected).

There is an Error stack, yes. Should I screenshot it? Can I copy it into the post?

Don’t know if it helps at all, but yes, you can either post a screenshot or post it as code.

Maybe someone more into nginx will show up here in the meantime.

I’m using the kirby-3.1.4 release, btw.

This is another configuration from Bastian

# site links
location /
{
        try_files $uri $uri/ /index.php$is_args$args;
}

# pass the PHP scripts to FastCGI server listening on the php-fpm socket
location ~ \.php$ {
        try_files $uri = 404;
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
}

Maybe try that (changing the path to your php version), don’t know what exactly these little differences do…

Thanks,

I tried the config but the issue is still the same. I had a look at the debugger again and it seems, that it is trying to do something or other with the cache and the issue you cited mentions file permissions as well. I will try setting some permissions differently and come back here if anything comes up.

Thanks a lot so far, texnixe!

I edited some file permissions to 0775 but I’m still not getting any closer.

Maybe do a phpinfo and share installed packages with us? It kind of feels like something is missing.

Okay, here goes the whole thing:

$ php -r 'echo phpinfo();'
phpinfo()
PHP Version => 7.3.6

System => FreeBSD kirbycms 12.0-RELEASE-p4 FreeBSD 12.0-RELEASE-p4 GENERIC amd64
Build Date => Jun  8 2019 01:11:32
Configure Command =>  './configure'  '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--with-libxml-dir=/usr/local' '--with-pcre-regex=/usr/local' '--with-password-argon2=/usr/local' '--program-prefix=' '--enable-mysqlnd' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--enable-embed' '--enable-dtrace' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd12.0' 'build_alias=amd64-portbld-freebsd12.0' 'CFLAGS=-O2 -pipe -fstack-protector -fno-strict-aliasing ' 'CPPFLAGS=' 'CPP=cpp' 'CXXFLAGS=-O2 -pipe -fstack-protector -fno-strict-aliasing '
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/etc
Loaded Configuration File => /usr/local/etc/php.ini
Scan this dir for additional .ini files => /usr/local/etc/php
Additional .ini files parsed => /usr/local/etc/php/ext-20-ctype.ini,
/usr/local/etc/php/ext-20-curl.ini,
/usr/local/etc/php/ext-20-filter.ini,
/usr/local/etc/php/ext-20-gd.ini,
/usr/local/etc/php/ext-20-json.ini,
/usr/local/etc/php/ext-20-mbstring.ini

PHP API => 20180731
PHP Extension => 20180731
Zend Extension => 320180731
Zend Extension Build => API320180731,NTS
PHP Extension Build => API20180731,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => available, disabled

Registered PHP Streams => php, file, glob, data, http, ftp
Registered Stream Socket Transports => tcp, udp, unix, udg
Registered Stream Filters => string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk

This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.3.6, Copyright (c) 1998-2018 Zend Technologies


 _______________________________________________________________________


Configuration

Core

PHP Version => 7.3.6

Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => UTF-8 => UTF-8
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => Off => Off
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
expose_php => On => On
extension_dir => /usr/local/lib/php/20180731 => /usr/local/lib/php/20180731
file_uploads => On => On
hard_timeout => 2 => 2
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/local/share/pear => .:/usr/local/share/pear
input_encoding => no value => no value
internal_encoding => no value => no value
log_errors => On => On
log_errors_max_len => 1024 => 1024
mail.add_x_header => Off => Off
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_encoding => no value => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 4096K => 4096K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i  => /usr/sbin/sendmail -t -i 
serialize_precision => -1 => -1
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sys_temp_dir => no value => no value
syslog.facility => LOG_USER => LOG_USER
syslog.filter => no-ctrl => no-ctrl
syslog.ident => php => php
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.assertions => -1 => -1
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.multibyte => Off => Off
zend.script_encoding => no value => no value
zend.signal_check => Off => Off

ctype

ctype functions => enabled

curl

cURL support => enabled
cURL Information => 7.65.0
Age => 4
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => No
IDN => No
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
NTLMWB => Yes
SPNEGO => Yes
SSL => Yes
SSPI => No
TLS-SRP => Yes
HTTP2 => Yes
GSSAPI => Yes
KERBEROS5 => Yes
UNIX_SOCKETS => Yes
PSL => No
HTTPS_PROXY => Yes
MULTI_SSL => No
BROTLI => No
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp
Host => amd64-portbld-freebsd12.0
SSL Version => OpenSSL/1.1.1a
ZLib Version => 1.2.11

Directive => Local Value => Master Value
curl.cainfo => no value => no value

date

date/time support => enabled
timelib version => 2018.01RC3
"Olson" Timezone Database Version => 2019.1
Timezone Database => internal
Default timezone => UTC

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => no value => no value

filter

Input Validation and Filtering => enabled

Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value

gd

GD Support => enabled
GD headers Version => 2.2.5
GD library Version => 2.2.5
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.9.1
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 8
PNG Support => enabled
libPNG Version => 1.6.37+apng
WBMP Support => enabled
XBM Support => enabled
WebP Support => enabled

Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 1 => 1

json

json support => enabled
json version => 1.7.0

libxml

libXML support => active
libXML Compiled Version => 2.9.8
libXML Loaded Version => 20908
libXML streams => enabled

mbstring

Multibyte Support => enabled
Multibyte string engine => libmbfl
HTTP input encoding translation => disabled
libmbfl version => 1.3.2
oniguruma version => 6.9.0

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Multibyte (japanese) regex support => enabled
Multibyte regex (oniguruma) version => 6.9.0

Directive => Local Value => Master Value
mbstring.detect_order => no value => no value
mbstring.encoding_translation => Off => Off
mbstring.func_overload => 0 => 0
mbstring.http_input => no value => no value
mbstring.http_output => no value => no value
mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
mbstring.internal_encoding => no value => no value
mbstring.language => neutral => neutral
mbstring.regex_stack_limit => 100000 => 100000
mbstring.strict_detection => Off => Off
mbstring.substitute_character => no value => no value

mysqlnd

mysqlnd => enabled
Version => mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $
Compression => not supported
core SSL => supported
extended SSL => not supported
Command buffer size => 4096
Read buffer size => 32768
Read timeout => 86400
Collecting statistics => Yes
Collecting memory statistics => No
Tracing => n/a
Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
API Extensions =>  

mysqlnd statistics =>  
bytes_sent => 0
bytes_received => 0
packets_sent => 0
packets_received => 0
protocol_overhead_in => 0
protocol_overhead_out => 0
bytes_received_ok_packet => 0
bytes_received_eof_packet => 0
bytes_received_rset_header_packet => 0
bytes_received_rset_field_meta_packet => 0
bytes_received_rset_row_packet => 0
bytes_received_prepare_response_packet => 0
bytes_received_change_user_packet => 0
packets_sent_command => 0
packets_received_ok => 0
packets_received_eof => 0
packets_received_rset_header => 0
packets_received_rset_field_meta => 0
packets_received_rset_row => 0
packets_received_prepare_response => 0
packets_received_change_user => 0
result_set_queries => 0
non_result_set_queries => 0
no_index_used => 0
bad_index_used => 0
slow_queries => 0
buffered_sets => 0
unbuffered_sets => 0
ps_buffered_sets => 0
ps_unbuffered_sets => 0
flushed_normal_sets => 0
flushed_ps_sets => 0
ps_prepared_never_executed => 0
ps_prepared_once_executed => 0
rows_fetched_from_server_normal => 0
rows_fetched_from_server_ps => 0
rows_buffered_from_client_normal => 0
rows_buffered_from_client_ps => 0
rows_fetched_from_client_normal_buffered => 0
rows_fetched_from_client_normal_unbuffered => 0
rows_fetched_from_client_ps_buffered => 0
rows_fetched_from_client_ps_unbuffered => 0
rows_fetched_from_client_ps_cursor => 0
rows_affected_normal => 0
rows_affected_ps => 0
rows_skipped_normal => 0
rows_skipped_ps => 0
copy_on_write_saved => 0
copy_on_write_performed => 0
command_buffer_too_small => 0
connect_success => 0
connect_failure => 0
connection_reused => 0
reconnect => 0
pconnect_success => 0
active_connections => 0
active_persistent_connections => 0
explicit_close => 0
implicit_close => 0
disconnect_close => 0
in_middle_of_command_close => 0
explicit_free_result => 0
implicit_free_result => 0
explicit_stmt_close => 0
implicit_stmt_close => 0
mem_emalloc_count => 0
mem_emalloc_amount => 0
mem_ecalloc_count => 0
mem_ecalloc_amount => 0
mem_erealloc_count => 0
mem_erealloc_amount => 0
mem_efree_count => 0
mem_efree_amount => 0
mem_malloc_count => 0
mem_malloc_amount => 0
mem_calloc_count => 0
mem_calloc_amount => 0
mem_realloc_count => 0
mem_realloc_amount => 0
mem_free_count => 0
mem_free_amount => 0
mem_estrndup_count => 0
mem_strndup_count => 0
mem_estrdup_count => 0
mem_strdup_count => 0
mem_edupl_count => 0
mem_dupl_count => 0
proto_text_fetched_null => 0
proto_text_fetched_bit => 0
proto_text_fetched_tinyint => 0
proto_text_fetched_short => 0
proto_text_fetched_int24 => 0
proto_text_fetched_int => 0
proto_text_fetched_bigint => 0
proto_text_fetched_decimal => 0
proto_text_fetched_float => 0
proto_text_fetched_double => 0
proto_text_fetched_date => 0
proto_text_fetched_year => 0
proto_text_fetched_time => 0
proto_text_fetched_datetime => 0
proto_text_fetched_timestamp => 0
proto_text_fetched_string => 0
proto_text_fetched_blob => 0
proto_text_fetched_enum => 0
proto_text_fetched_set => 0
proto_text_fetched_geometry => 0
proto_text_fetched_other => 0
proto_binary_fetched_null => 0
proto_binary_fetched_bit => 0
proto_binary_fetched_tinyint => 0
proto_binary_fetched_short => 0
proto_binary_fetched_int24 => 0
proto_binary_fetched_int => 0
proto_binary_fetched_bigint => 0
proto_binary_fetched_decimal => 0
proto_binary_fetched_float => 0
proto_binary_fetched_double => 0
proto_binary_fetched_date => 0
proto_binary_fetched_year => 0
proto_binary_fetched_time => 0
proto_binary_fetched_datetime => 0
proto_binary_fetched_timestamp => 0
proto_binary_fetched_string => 0
proto_binary_fetched_json => 0
proto_binary_fetched_blob => 0
proto_binary_fetched_enum => 0
proto_binary_fetched_set => 0
proto_binary_fetched_geometry => 0
proto_binary_fetched_other => 0
init_command_executed_count => 0
init_command_failed_count => 0
com_quit => 0
com_init_db => 0
com_query => 0
com_field_list => 0
com_create_db => 0
com_drop_db => 0
com_refresh => 0
com_shutdown => 0
com_statistics => 0
com_process_info => 0
com_connect => 0
com_process_kill => 0
com_debug => 0
com_ping => 0
com_time => 0
com_delayed_insert => 0
com_change_user => 0
com_binlog_dump => 0
com_table_dump => 0
com_connect_out => 0
com_register_slave => 0
com_stmt_prepare => 0
com_stmt_execute => 0
com_stmt_send_long_data => 0
com_stmt_close => 0
com_stmt_reset => 0
com_stmt_set_option => 0
com_stmt_fetch => 0
com_deamon => 0
bytes_received_real_data_normal => 0
bytes_received_real_data_ps => 0

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 10.32 2018-09-10
PCRE Unicode Version => 11.0.0
PCRE JIT Support => not compiled in

Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.recursion_limit => 100000 => 100000

Reflection

Reflection => enabled

SPL

SPL support => enabled
Interfaces => OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

standard

Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i 

Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.exception => 0 => 0
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
from => no value => no value
session.trans_sid_hosts => no value => no value
session.trans_sid_tags => a=href,area=href,frame=src,form= => a=href,area=href,frame=src,form=
url_rewriter.hosts => no value => no value
url_rewriter.tags => form= => form=
user_agent => no value => no value

Additional Modules

Module Name

Environment

Variable => Value
SSH_CLIENT => **.**.**.** 36670 22
LOGNAME => ***
PAGER => less
MAIL => /var/mail/***
PATH => /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/***/bin
EDITOR => vi
ENV => /home/***/.shrc
OLDPWD => /usr/local/www/example
PWD => /usr/local/www/example/site
TERM => xterm-256color
SSH_TTY => /dev/pts/0
HOME => /home/***
USER => ***
SSH_CONNECTION => **.**.**.** 36670 **.**.**.** 22
SHELL => /bin/sh
BLOCKSIZE => K

PHP Variables

Variable => Value
$_SERVER['SSH_CLIENT'] => **.**.**.** 36670 22
$_SERVER['LOGNAME'] => ***
$_SERVER['PAGER'] => less
$_SERVER['MAIL'] => /var/mail/***
$_SERVER['PATH'] => /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/***/bin
$_SERVER['EDITOR'] => vi
$_SERVER['ENV'] => /home/***/.shrc
$_SERVER['OLDPWD'] => /usr/local/www/example
$_SERVER['PWD'] => /usr/local/www/example/site
$_SERVER['TERM'] => xterm-256color
$_SERVER['SSH_TTY'] => /dev/pts/0
$_SERVER['HOME'] => /home/***
$_SERVER['USER'] => ***
$_SERVER['SSH_CONNECTION'] => **.**.**.** 36670 **.**.**.** 22
$_SERVER['SHELL'] => /bin/sh
$_SERVER['BLOCKSIZE'] => K
$_SERVER['PHP_SELF'] => Standard input code
$_SERVER['SCRIPT_NAME'] => Standard input code
$_SERVER['SCRIPT_FILENAME'] => 
$_SERVER['PATH_TRANSLATED'] => 
$_SERVER['DOCUMENT_ROOT'] => 
$_SERVER['REQUEST_TIME_FLOAT'] => 1560346994.3925
$_SERVER['REQUEST_TIME'] => 1560346994
$_SERVER['argv'] => Array
(
    [0] => Standard input code
)

$_SERVER['argc'] => 1

PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file:  LICENSE

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact license@php.net.

Looks like there’s nothing missing from your installation.

Could you recommend me something else to troubleshoot?

I don’t have an answer for you, but have brought this thread to the attention of the team.

Thank you so much!

Ok, I got a hint from @lukasbestle. Looks like the global PHP hash() function is not implemented and he recommends you contact your hosting provider.

Called here:

    public function id(): string
    {
        return hash('crc32', implode(array_values($this->files())));
    }

(/kirby/cms/PanelPlugins.php#136)

So the original problem seems to have been the wrong configuration, but the second issue point to a problem with a PHP installation compiled without the hash() method.

So!
After browsing a little, I found that, indeed, the hash() function was missing. To get it on FreeBSD 12 you need to install php73-extensions in addition to php73.

The Panel now seems to work^WWWW start (but I think, that’s another issue)!

Thank you all very much!

I have fiddled a bit more with the nginx.conf and now everything is working alright. So if I may, for posterity, here is a “works for me” nginx.conf:

server {
	listen 80;
	listen [::]:80;
	server_name _;
	return 301 https://example.com$request_uri;
}

server {
	listen 443 ssl default_server;
	listen [::]:443 ssl;
	server_name example.com www.example.com;

	ssl on;

	ssl_certificate /usr/local/etc/letsencrypt/live/example.com/fullchain.pem;
	ssl_certificate_key /usr/local/etc/letsencrypt/live/example.com/privkey.pem;

	root /usr/local/www/example.com;

	index index.html index.php;

	# don't hint these as folders
	rewrite ^/(content|site|kirby)$ /error last;

	# block content
	rewrite ^/content/(.*).(txt|md|mdown)$ /error last;

	# block all files in the site and kirby folder from being accessed directly
	rewrite ^/(site|kirby)/(.*)$ /error last;

	# removes trailing slashes (prevents SEO duplicate content issues)
	if (!-d $request_filename) {
		rewrite ^/(.+)/$ /$1 permanent;
	}

	# site links
	location / {
		try_files $uri $uri/ /index.php?$uri&$args;
	}

	# prevent clients from accessing to backup/config/source files
	location ~ (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ {
		deny all;
	}

	location ~ \.php$ {
		try_files $uri = 404;
		fastcgi_pass unix:/var/run/php73-fpm.sock;
		fastcgi_index index.php;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		include fastcgi_params;
	}
}
1 Like