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
Related
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
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.
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.
my route is fetching user tokens
GET /tokens
average response time is around 180ms and response is json.
using Flask + nginx.
some requests, the response content is truncated at around 33kb, thus the JSON is malformed. some requests, with the same parameters, at nearly the same time, the response is ok at around 216kb.
My question is, why is this happening and why is this happening in an un consist way?
here is flask response code
class NormalResponse(Response):
def __init__(self, response):
super(NormalResponse, self).__init__(response, 200)
res = json.dumps(paginator.paginate(tokens))
return NormalResponse(res)
I found the issue related to nginx since the failed responses have this logs
2018/12/18 16:35:17 [crit] 16#16: *95010 open() "/var/tmp/nginx/uwsgi/1/42/0000000421" failed (13: Permission denied) while reading upstream, client: 172.31.72.76, server: , request: "GET /tokens?limit=501&offset=0&order=desc&owner_id=11111 HTTP/1.1", upstream: "uwsgi://unix:/run/server.socket:", host: "oauth.dev.bla_bla.com"
Seems like response overflows proxy_buffers and tries to temporarily save it to proxy_temp_path and your error message quite confirms it. You should check file permissions of nginx's user on that folder.
This problem has been resolved by adding
RUN chown -R www-data:www-data /var/tmp/nginx
to the Dockerfile
i am new to nginx, yesterday i installed lemp on centos and hosted a website on. today i get this in error message. please tell me if this is a security bug of nginx? Thank you!
cat /var/log/nginx/error.log
2017/07/01 03:52:18 [error] 6073#0: *23151 open() "/usr/share/nginx/html/testproxy.php" failed (2: No such file or directory), client: 91.196.50.33, server: _, request: "GET http://testp3.pospr.waw.pl/testproxy.php HTTP/1.1", host: "testp3.pospr.waw.pl"
It's not an nginx bug: If you're currently running a site that's live and accessible on the internet, bot scripts will try to find common vulnerabilities by hitting your server with various automated requests of common URLs, paths and patterns (e.g. admin.php, /wp-login.php for WordPress blogs...). Just make sure you set up proper security for your server and you'll be fine.