Always error "Internal Server Error" when quick install any App

Hi,
I installed Hestiacp on a new Debian 11 64bit
I added domain and issue SSL for it, when I try to install WordPress then I always get errors:

Internal Server Error
Oops! Something went wrong.

The server encountered an internal error or misconfiguration and was unable to complete your request.

Error Code: 500

Below is the log of file /var/log/hestia/nginx-error.log

  thrown in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 197" while reading response header from upstream, client: 171.247.215.195, server: _, request: "GET /add/webapp/?app=Opencart&domain=test.mydomain.com HTTP/1.1", upstream: "fastcgi://unix:/var/run/hestia-php.sock:", host: "server.anotherdomain.com:2083", referrer: "https://server.anotherdomain.com:2083/add/webapp/?app=MediaWiki&domain=test.mydomain.com"
2022/09/13 03:11:29 [error] 869#0: *77 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $supported in /usr/local/hestia/web/add/webapp/index.php on line 48" while reading response header from upstream, client: 171.247.215.195, server: _, request: "GET /add/webapp/?app=MediaWiki&domain=test.mydomain.com HTTP/1.1", upstream: "fastcgi://unix:/var/run/hestia-php.sock:", host: "server.anotherdomain.com:2083", referrer: "https://server.anotherdomain.com:2083/add/webapp/?domain=test.mydomain.com"
2022/09/13 03:11:51 [error] 869#0: *74 FastCGI sent in stderr: "PHP message: PHP Warning:  Trying to access array offset on value of type null in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 195PHP message: PHP Warning:  Trying to access array offset on value of type null in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 195PHP message: PHP Fatal error:  Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, null given in /usr/local/hestia/web/src/app/System/HestiaApp.php:197
Stack trace:
#0 /usr/local/hestia/web/src/app/System/HestiaApp.php(197): preg_match()
#1 /usr/local/hestia/web/src/app/WebApp/AppWizard.php(69): Hestia\System\HestiaApp->getCurrentBackendTemplate()
#2 /usr/local/hestia/web/templates/pages/setup_webapp.html(27): Hestia\WebApp\AppWizard->getOptions()
#3 /usr/local/hestia/web/inc/main.php(192): include('/usr/local/hest...')
#4 /usr/local/hestia/web/add/webapp/index.php(95): render_page()
#5 {main}
  thrown in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 197" while reading response header from upstream, client: 171.247.215.195, server: _, request: "GET /add/webapp/?app=Wordpress&domain=test.anotherdomain.com HTTP/1.1", upstream: "fastcgi://unix:/var/run/hestia-php.sock:", host: "server.mydomain.com:2083", referrer: "https://server.mydomain.com:2083/add/webapp/?app=MediaWiki&domain=test.mydomain.com"

Please help

Do you use php-fpm or modphp

I use php-fpm

But after changing the default template to WordPress and also changing the domain template to WordPress. I can install WordPress without the error.

I guess, we have to choose the WordPress template first before installing it

What version are you using:

It should be patched in 1.6.8

Installed the server 6 hours ago so it should be the latest version.

By default “default” template is selected so it should not fail

Hi @eris

Today, I install a new Nginx server and install WordPress then get the same error.
I changed both template of the Default package and website template to WordPress but still error

Internal Server Error
Oops! Something went wrong.

The server encountered an internal error or misconfiguration and was unable to complete your request.

Error Code: 500

Log

 PHP Warning:  Undefined array key "v_ns7" in /usr/local/hestia/web/edit/package/index.php on line 243P                                                                                   HP message: PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecate                                                                                   d in /usr/local/hestia/web/edit/package/index.php on line 243PHP message: PHP Warning:  Un
2022/09/24 12:42:44 [error] 875#0: *360 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined a                                                                                   rray key "v_ns1" in /usr/local/hestia/web/edit/package/index.php on line 237PHP message: PHP Deprecated                                                                                   :  trim(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/local/hestia/web                                                                                   /edit/package/index.php on line 237PHP message: PHP Warning:  Undefined array key "v_ns2" in /usr/local                                                                                   /hestia/web/edit/package/index.php on line 238PHP message: PHP Deprecated:  trim(): Passing null to par                                                                                   ameter #1 ($string) of type string is deprecated in /usr/local/hestia/web/edit/package/index.php on lin                                                                                   e 238PHP message: PHP Warning:  Undefined array key "v_ns3" in /usr/local/hestia/web/edit/package/index                                                                                   .php on line 239PHP message: PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type st                                                                                   ring is deprecated in /usr/local/hestia/web/edit/package/index.php on line 239PHP message: PHP Warning:                                                                                     Undefined array key "v_ns4" in /usr/local/hestia/web/edit/package/index.php on line 240PHP message: P                                                                                   HP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/loc                                                                                   al/hestia/web/edit/package/index.php on line 240PHP message: PHP Warning:  Undefined array key "v_ns5"                                                                                    in /usr/local/hestia/web/edit/package/index.php on line 241PHP message: PHP Deprecated:  trim(): Passin                                                                                   g null to parameter #1 ($string) of type string is deprecated in /usr/local/hestia/web/edit/package/ind                                                                                   ex.php on line 241PHP message: PHP Warning:  Undefined array key "v_ns6" in /usr/local/hestia/web/edit/                                                                                   package/index.php on line 242PHP message: PHP Deprecated:  trim(): Passing null to parameter #1 ($strin                                                                                   g) of type string is deprecated in /usr/local/hestia/web/edit/package/index.php on line 242PHP message:                                                                                    PHP Warning:  Undefined array key "v_ns7" in /usr/local/hestia/web/edit/package/index.php on line 243P                                                                                   HP message: PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecate                                                                                   d in /usr/local/hestia/web/edit/package/index.php on line 243PHP message: PHP Warning:  Un
2022/09/24 12:43:13 [error] 875#0: *358 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined v                                                                                   ariable $v_redirect_custom in /usr/local/hestia/web/templates/pages/edit_web.html on line 178" while re                                                                                   ading response header from upstream, client: 171.247.215.195, server: _, request: "GET /edit/web/?domai                                                                                   n=mywebsite.com&token=4e35a70dcd63965c7660accce8832ded HTTP/1.1", upstream: "fastcgi://unix:/var/                                                                                   run/hestia-php.sock:", host: "42.32.46.70:2083", referrer: "https://42.32.46.70:2083/list/web/"
2022/09/24 12:43:18 [error] 875#0: *365 FastCGI sent in stderr: "PHP message: PHP Warning:  Trying to a                                                                                   ccess array offset on value of type null in /usr/local/hestia/web/src/app/System/HestiaApp.php on line                                                                                    195PHP message: PHP Warning:  Trying to access array offset on value of type null in /usr/local/hestia/                                                                                   web/src/app/System/HestiaApp.php on line 195PHP message: PHP Fatal error:  Uncaught TypeError: preg_mat                                                                                   ch(): Argument #2 ($subject) must be of type string, null given in /usr/local/hestia/web/src/app/System                                                                                   /HestiaApp.php:197
Stack trace:
#0 /usr/local/hestia/web/src/app/System/HestiaApp.php(197): preg_match()
#1 /usr/local/hestia/web/src/app/WebApp/AppWizard.php(69): Hestia\System\HestiaApp->getCurrentBackendTe                                                                                   mplate()
#2 /usr/local/hestia/web/templates/pages/setup_webapp.html(27): Hestia\WebApp\AppWizard->getOptions()
#3 /usr/local/hestia/web/inc/main.php(192): include('/usr/local/hest...')
#4 /usr/local/hestia/web/add/webapp/index.php(95): render_page()
#5 {main}
  thrown in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 197" while reading response head                                                                                   er from upstream, client: 171.247.215.195, server: _, request: "GET /add/webapp/?app=Wordpress&domain=n                                                                                   hacaiuytinfree.com HTTP/1.1", upstream: "fastcgi://unix:/var/run/hestia-php.sock:", host: "42.32.46.70:                                                                                   2083", referrer: "https://42.32.46.70:2083/add/webapp/?domain=mywebsite.com"

Please help

There is bug present if you use the default template it will befixed for 1.6.9

Not just the default template. When I choose WordPress template when installing a new site I also get the error.

Is there any quick fix for this error?

I tried to replace line 197 as shown in the code above but still error.

Run:

v-update-sys-hestia-git hestiacp staging/1.6.9

And it should been saved…

Thank you so much, Eris

Problem solved.

Hello, try to update hestia, but after successful update still have v1.6.8

my OS Debian 11

the log from cp

30 Sep 202212:08:23UpdatesUpdate installed (Version: 1.6.8).
30 Sep 202212:08:23SystemService restarted (Name: hestia).
30 Sep 202212:08:23SystemService restarted (Name: ssh).
30 Sep 202212:08:23SystemService restarted (Name: fail2ban).
30 Sep 202212:08:23SystemService restarted (Name: php8.1-fpm).
30 Sep 202212:08:23SystemService restarted (Name: php8.0-fpm).
30 Sep 202212:08:23SystemService restarted (Name: php7.4-fpm).
30 Sep 202212:08:23SystemService restarted (Name: php7.3-fpm).
30 Sep 202212:08:22SystemService restarted (Name: php7.2-fpm).
30 Sep 202212:08:22SystemService restarted (Name: php7.1-fpm).
30 Sep 202212:08:22SystemService restarted (Name: php7.0-fpm).
30 Sep 202212:08:22SystemService restarted (Name: php5.6-fpm).
30 Sep 202212:08:22SystemService restarted (Name: bind9).
30 Sep 202212:08:22SystemService restarted (Name: nginx).
30 Sep 202212:08:21SystemService restarted (Name: dovecot).
30 Sep 202212:08:21SystemService restarted (Name: exim4).
30 Sep 202212:08:21SystemService restarted (Name: dovecot).
30 Sep 202212:08:18SystemSystem configuration value changed (Key: RELEASE_BRANCH, Value: release).
30 Sep 202212:08:18SystemSystem configuration value changed (Key: VERSION, Value: 1.6.8).
30 Sep 202212:08:18PluginsPHPMailer enabled (Version: 6.6.4).
30 Sep 202212:08:17SystemSystem configuration value changed (Key: VERSION, Value: 1.6.8).
30 Sep 202212:08:16UpdatesStarted update installation (Latest: 1.6.8, Previous: 1.6.8).
30 Sep 202212:08:04SystemSystem configuration value changed (Key: RELEASE_BRANCH, Value: staging/1.6.9).

It looks like I didn’t update the version yet in the config…

Changed right now

good, but 500 error with Wordpress Quick Install still exists

/var/log/hestia/nginx-error.log

2022/09/30 12:20:45 [error] 800521#0: *3 FastCGI sent in stderr: "PHP message: PHP Warning:  Trying to access array offset on value of type null in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 195PHP message: PHP Warning:  Trying to access array offset on value of type null in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 195PHP message: PHP Warning:  Undefined property: Hestia\System\HestiaApp::$1 in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 206PHP message: PHP Warning:  Attempt to read property "json" on null in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 206PHP message: PHP Warning:  Trying to access array offset on value of type null in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 206PHP message: PHP Warning:  foreach() argument must be of type array|object, null given in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 241PHP message: PHP Warning:  Trying to access array offset on value of type null in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 195PHP message: PHP Warning:  Trying to access array offset on value of type null in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 195PHP message: PHP Warning:  Undefined property: Hestia\System\HestiaApp::$1 in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 206PHP message: PHP Warning:  Attempt to read property "json" on null in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 206PHP message: PHP Warning:  Trying to access array offset on value of type null in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 206PHP message: PHP Warning:  foreach() argument must be of type array|object, null given in /usr/local/hestia/web/src/app/System/HestiaApp.php on line 241PHP message: PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /usr/local/hestia/web/templates/pages/setup_webapp.html:68
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.