Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd behaviour with PHP7.4 Nginx & php-fpm #136

Open
jimmyfi opened this issue Dec 16, 2020 · 6 comments
Open

Odd behaviour with PHP7.4 Nginx & php-fpm #136

jimmyfi opened this issue Dec 16, 2020 · 6 comments

Comments

@jimmyfi
Copy link

jimmyfi commented Dec 16, 2020

Hi
I moved my Ompd! from virtual machine to native machine for better performance and "Reasons" and then I began receiving odd issues one was quite often typed "Login failed Unexpected IP address". Login to the page took ages and all of sudden i got request to login again. I checked logs and I got alot of following errors

2020/12/16 06:50:02 [error] 2951754#2951754: *152 FastCGI sent in stderr: "PHP message: PHP Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /mnt/zfs/Websites/Ompd/include/initialize.inc.php on line 239PHP message: PHP Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /mnt/zfs/Websites/Ompd/include/initialize.inc.php on line 240" while reading response header from upstream, client: 162.158.238.217, server: jukebox.sideburns.pm, request: "GET /cache.php?action=css&skin=dark_wide&hash=727c62abce3144da5f2c7c03f54b7bbe HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm-jukebox.sock:", host: "url", referrer: "url"
I've tried everything I Know including loading latest versions from github enabled systemwide opcache etc, but nothing seems to help so far :( I Wonder if community might have some suggestions?

My server setup
Debian Testing with latest kernele
PHP Version 7.4.11
Nginx nginx/1.18.0

php-fpm settings :

[jukebox]
user = www-data
group = www-data
listen = /var/run/php/php7.4-fpm-jukebox.sock
listen.owner = www-data
listen.group = www-data
php_admin_value[disable_functions] = passthru,shell_exec,system
php_admin_flag[allow_url_fopen] = off
pm = dynamic
pm.max_children = 5
pm.start_servers = 3
pm.min_spare_servers = 2
pm.max_spare_servers = 4
pm.max_requests = 200
chdir = /

With Kind Regards Jimmyfi

@ArturSierzant
Copy link
Owner

Hi Jimmyfi,

try to delete everything from table SESSION in DB (please make a copy of this table before deleting).

Regards,
Artur

@jimmyfi
Copy link
Author

jimmyfi commented Dec 17, 2020

Hi Jimmyfi,

try to delete everything from table SESSION in DB (please make a copy of this table before deleting).

Regards,
Artur

Hi
I deleted the sessions DB but no effect. after browsing the admin panel I got logged out and when logged back in I got errorthe error Unexpected IP address

Update
Hmmm I think I was able to fix it somehow? I had to disalbe Cloudflare Proxy to get it working properly?? I think this is not the optimum solution but.. it works now i guess :D

@ArturSierzant
Copy link
Owner

Do you open O!MPD page using host name or ip address?

@jimmyfi
Copy link
Author

jimmyfi commented Dec 17, 2020

Do you open O!MPD page using host name or ip address?

I use Hostname.

@ArturSierzant
Copy link
Owner

Please try with ip address - maybe Cloudflare Proxy blocks somehow communication when using hostname.

@jimmyfi
Copy link
Author

jimmyfi commented Dec 17, 2020

Please try with ip address - maybe Cloudflare Proxy blocks somehow communication when using hostname.

hmm direct IP doesn't work since there are multiple vhosts running.. When I had cloudflare proxy on the IP adress on sessions was kind of random, when I disabled it, it changed the IP address on session table to my local network IP address. I wonder if there is some way to fix it that it would work with cloudflare proxy on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants