getting array_filter error parameter 2 must be array. In hestia cp - nginx

I have multiple sites running on my server using hestiacp.
Today when i tried to add new website database it gives me internal server error 500.
Same is the case when i try to open configure in admin settings its also gives internal server error 500.
What's the possible solution to fix it?
2023/02/03 13:16:29 [error] 1025149#0: *24 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array,thrown in /usr/local/hestia/web/edit/server/index.php on line 148” while reading response header from upstream, client: 119.73.117.147, server: _, request: “GET /edit/server/ HTTTP/1.1”, upstream: “fastcgi://unix:/var/run/hestia-php.sock:”, host: “user.silverline.dev:8083”, referrer: “https://user.silverline.dev:8083/list/server/ 1”
2023/02/03 13:16:29 [error] 1025149#0: *24 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /usr/local/hestia/web/add/db/index.php:152
Stack trace:
#0 /usr/local/hestia/web/add/db/index.php(152): array_map()
i tried to check all codes but there is nothing wrong it was working fine a day before and today all of a sudden this happened

Related

Passenger Looking for Permissions on a Missing File

Linux installation of Phusion Passenger(R) 6.0.14 on nginx/1.14.1. I'm not able to load a site (on a simplified nginx.conf with the conf.d/passenger.conf and conf.d/site1.conf includes. That error:
2022/08/03 19:24:34 [alert] 55601#0: *3 Error opening '/home/user3/sites/Passengerfile.json' for reading: Permission denied (errno=13);
This error means that the Nginx worker process (PID 55601, running as UID 992) does not have permission to access this file.
Please read this page to learn how to fix this problem: https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/?a=upon-accessing-the-web-app-nginx-reports-a-permission-denied-error;
Extra info, client: 192.168.1.4, server: domain1.com, request: "GET / HTTP/1.1", host: "server_f.local"
I don't even know what to ask, other than how can I get this to work? That file doesn't exist. I've restarted nginx many times, and this is the only feedback that I get. I've checked over that page, which tells me to look at the error log it's reported in already. The host and server are correct, and I am on my LAN.

My lapis server keeps throwing "error 500 Internal Server Error"

I have been experimenting with the lua web framework, lapis, recently. My issue is that when I run lapis server, and try to connect to the website via my browser (localhost:8081), I receive the following error: 500 Internal Server Error. In the logs I get a whole spew of errors:
coroutine 0:
[C]: in function 'require'
content_by_lua(nginx.conf.compiled:22):2: in main chunk, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", host: "localhost:8081"
2022/08/19 16:54:44 [error] 46270#4681084: *3 lua entry thread aborted: runtime error: content_by_lua(nginx.conf.compiled:22):2: module 'lapis' not found:
no field package.preload['lapis']
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/site/lualib/lapis.ljbc'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/site/lualib/lapis/init.ljbc'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/lualib/lapis.ljbc'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/lualib/lapis/init.ljbc'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/site/lualib/lapis.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/site/lualib/lapis/init.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/lualib/lapis.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/lualib/lapis/init.lua'
no file './lapis.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/luajit/share/luajit-2.1.0-beta3/lapis.lua'
no file '/usr/local/share/lua/5.1/lapis.lua'
no file '/usr/local/share/lua/5.1/lapis/init.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/luajit/share/lua/5.1/lapis.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/luajit/share/lua/5.1/lapis/init.lua'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/site/lualib/lapis.so'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/lualib/lapis.so'
no file './lapis.so'
no file '/usr/local/lib/lua/5.1/lapis.so'
no file '/opt/homebrew/Cellar/openresty/1.21.4.1_1/luajit/lib/lua/5.1/lapis.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
This is weird as I have all of these things installed. Does anyone know what the root of my problem might be?
lapis work on luajit 5.1 only. You might have 5.2 or 5.3 installed. Make sure you pin the version to 5.1 while installing.

Lua entry thread aborted: runtime error bad argument #2 to 'tonumber' (number expected, got string)

Im using lapis framework and torch, sometimes the website showing internal server error when trying to load page, and the error from lapis is:
[error] 3726#81246: *19 lua entry thread aborted: runtime error: ...s/MyUser/torch/install/share/lua/5.1/xlua/init.lua:227: bad argument #2 to 'tonumber' (number expected, got string)
stack traceback:
coroutine 0:
[C]: in function 'require'
.../MyUser/torch/install/share/lua/5.1/lapis/init.lua:15: in function 'serve'
content_by_lua(nginx.conf.compiled:22):2: in function <content_by_lua(nginx.conf.compiled:22):1>, client: 127.0.0.1, server: , request: "GET /recommend HTTP/1.1", host: "localhost:9999", referrer: "http://localhost:9999/home"
After looking arround, the problem is gone when i remark this part:
local lapis = require("lapis")
local config = require("lapis.config").get()
local inspect = require("inspect")
local json = require('cjson')
local kb_recommend = require("recommender.knowledge")
-- local cb_recommend = require("recommender.content") <---- remark this
local mysql = require "luasql.mysql"
local env = mysql.mysql()
local conn = env:connect("restoran", "root", "")
Thats link to file recommender/content.lua:
package.path = package.path .. ";../?.lua"
local predictor = require("Content Based.predictor")
return predictor
This file returning the class where i wrote my torch code. I suspect the problem is coming from the 'require' part, but dont know why? I've been looking on google for solution, and nothing found. This my current version:
Lua 5.1.5
Torch7
Lapis 1.6.0
nginx/1.13.9
openresty/1.13.6.1
anyone can help? im very newbie in Lua environment.
tonumber is a Lua function for an example like this: tonumber("10") or tonumber(10)
I'm sorry I couldn't be of more help.
If you could show us the line where the error is located, I can most likely determine a fix for you.

error with TimeZoneTransforme when running symfony2 on php 5.3 server

We are trying to deploy a symfony2 Web App in a shared hosting service offered by the University. The server has php 5.3. and we can only access it via FTP.
When I go to .../web/app.php I got an "503 Service Unavailable" message. When looking at the errors.log file I found:
GMT or UTC is not supported as a formatting output. Please install the "intl" extension for full localization capabilities.' in /var/www/vhosts/transmediacatalonia.uab.cat/httpdocs/vendor/symfony/symfony/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimeZoneTransformer.php:35
mod_fcgid: stderr: Stack trace:
mod_fcgid: stderr: #0 /var/www/.../DateFormat/FullTransformer.php(123): Symfony\\Component\\Intl\\DateFormatter\\DateFormat
\\TimeZoneTransformer->format(Object(DateTime), 1)
mod_fcgid: stderr: #1 /var/www/.../FullTransformer.php(96): Symfony\\Component\\Intl\\DateFormatter\\DateFormat\\FullTransformer->formatReplace('z', Object(DateTime))
mod_fcgid: stderr: #2 [internal function]: Symfony\\Component\\Intl\\DateFormatter\\DateFormat\\{closure}(Array)
mod_fcgid: stderr: #3 /var/ww in /var/www/.../Template.php on line 396
I understand the intnextension is required. The problem is that we have no way to install anything in the server.
Is there any way to solve this problem??
Thanks a lot in advance!!

PHP Fatal error with nginx

I'm having, in a PHP form, when I'm submiting one email as a suscriber in a Wordpress theme, the next error in error.log:
2013/08/03 21:39:22 [error] 19544#0: *11 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(TEMPLATEPATH/functions/theme-functions.php): failed to open stream: No such file or directory in /web/domain.com/public/wp-content/themes/launcheffect/functions.php on line 151
PHP message: PHP Fatal error: require_once(): Failed opening required 'TEMPLATEPATH/functions/theme-functions.php' (include_path='.:/usr/share/php:/usr/share/pear') in /web/domain.com/public/wp-content/themes/launcheffect/functions.php on line 151" while reading response header from upstream, client: 71.28.74.212, server: www.domain.com, request: "POST /wp-content/themes/launcheffect/post.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.domain.com", referrer: "http://www.domain.com/"
I've been reading about permissions, about nginx and fastcgi, about PHPfpm, reviewing my config...without success. More, I've other sites working perfectly, and that theme worked well some days ago.
Of course I've that file/directory.
My nginx.conf:
http://pastebin.com/5VB1BzHj
Can anyone help me to solve this error?
Thanks in advance!
Looking at your example error it appears you are not formatting the require correctly. It should look something like this:
require_once(TEMPLATEPATH . '/functions/theme-functions.php');
Make certain that you are also defining your TEMPLATEPATH.
define("TEMPLATEPATH ", "/this/is/your/path");
In the end, this should output a string:
/this/is/your/path/functions/theme-functions.php
For anyone having this problem, double check your file paths and file names as mine was caused by a case sensitive file path where I had missed an Uppercase letter

Resources