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

Editing PHP FPM Configuration for a vertual server #24

Open
mazataza opened this issue Jan 31, 2022 · 17 comments
Open

Editing PHP FPM Configuration for a vertual server #24

mazataza opened this issue Jan 31, 2022 · 17 comments

Comments

@mazataza
Copy link

I am tring on dev server to use nginx stack..
i have 2 php version installed

php5.6

php7.4`

i can switch php version in FPM mode without any issue.
currently i set it to 7.4 but when tring to edit the php-fpm configuration under "Services/PHP-FPM Configuration" it always try to edit the configuration for php5.6 which not exist.
i have somthing like this URL
https://192.168.4.54:10000/phpini/list_ini.cgi?file=%2Fetc%2Fphp%2F5%2E6%2Ffpm%2Fpool%2Ed%2F1643654253103481%2Econf&xnavigation=1

i use virtualmin 6.17-3

@jcameron
Copy link
Collaborator

jcameron commented Feb 1, 2022

Is the link to edit the PHP config still wrong, even if you logout and login again?

@mazataza
Copy link
Author

mazataza commented Feb 1, 2022

yes even if i logout and again login.
i tried just before

@iliajie
Copy link
Contributor

iliajie commented Feb 1, 2022

yes even if i logout and again login.

What if you clear cache using right side slider?

image

If that doesn't help, try re-running config check using Virtualmin / System Settings ⇾ Re-Check Configuration link.

Does it help?

What distoro and version you're on?

@mazataza
Copy link
Author

mazataza commented Feb 1, 2022

i am on ubuntu 20.04 (64bit) server edition.
tried both (clear cache and run re-check, but doesn't help.

@iliajie
Copy link
Contributor

iliajie commented Feb 1, 2022

@mazataza Do you see this when you logged in as master administrator or server owner?

@jcameron Jamie, I see some problems too, related to PHP for server owner.

Ubuntu 20.04

  1. Permissions access issue - even though Administration Options ⇾ Edit Owner Limits for a domain do not have enabled Can edit PHP and website options, PHP Configuration options are still available on the menu (and work just fine when clicked on) when logged in as server owner, including Configure Website (different links but the same happens in FCGId/FPM modes). Although, limiting option Can select PHP versions is considered and works as expected.

    To be specific access option edit_phpmode is ignored (even though updated on domains .acl file).

CentOS 7

  1. Exactly the same problem as described for Ubuntu 20.04
  2. Although, when master administrator changes PHP to FPM, server owner still sees the PHP-FPM Configuration link, but cannot access the module disregard of Can edit PHP and website options limiting option and the error returned -- You are not allowed to manage this PHP configuration file.

@mazataza
Copy link
Author

mazataza commented Feb 1, 2022

i run as master adminstrator not domain owner

@iliajie
Copy link
Contributor

iliajie commented Feb 1, 2022

i run as master adminstrator not domain owner

These issues may be connected. Also, what is the output of the following command:

apt list --installed | grep php

@mazataza
Copy link
Author

mazataza commented Feb 2, 2022

`bukhari@dev:~$ apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
php-cgi/focal,now 2:7.4+75 all [installed,upgradable to: 2:8.1+92+ubuntu20.04.1+deb.sury.org+2]
php-common/focal,now 2:75 all [installed,upgradable to: 2:92+ubuntu20.04.1+deb.sury.org+2]
php-fpm/focal,now 2:7.4+75 all [installed,upgradable to: 2:8.1+92+ubuntu20.04.1+deb.sury.org+2]
php-mbstring/focal,now 2:7.4+75 all [installed,upgradable to: 2:8.1+92+ubuntu20.04.1+deb.sury.org+2]
php-mysql/focal,now 2:7.4+75 all [installed,upgradable to: 2:8.1+92+ubuntu20.04.1+deb.sury.org+2]
php-pear/focal-updates,focal-security,now 1:1.10.9+submodules+notgz-1ubuntu0.20.04.3 all [installed,upgradable to: 1:1.10.12+submodules+notgz+20210212-1+ubuntu20.04.1+deb.sury.or             g+1]
php-xml/focal,now 2:7.4+75 all [installed,upgradable to: 2:8.1+92+ubuntu20.04.1+deb.sury.org+2]
php5.6-cgi/focal,now 5.6.40-57+ubuntu20.04.1+deb.sury.org+1 amd64 [installed]
php5.6-cli/focal,now 5.6.40-57+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php5.6-common/focal,now 5.6.40-57+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php5.6-fpm/focal,now 5.6.40-57+ubuntu20.04.1+deb.sury.org+1 amd64 [installed]
php5.6-gd/focal,now 5.6.40-57+ubuntu20.04.1+deb.sury.org+1 amd64 [installed]
php5.6-json/focal,now 5.6.40-57+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php5.6-mbstring/focal,now 5.6.40-57+ubuntu20.04.1+deb.sury.org+1 amd64 [installed]
php5.6-opcache/focal,now 5.6.40-57+ubuntu20.04.1+deb.sury.org+1 amd64 [installed]
php5.6-readline/focal,now 5.6.40-57+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php5.6-zip/focal,now 5.6.40-57+ubuntu20.04.1+deb.sury.org+1 amd64 [installed]
php7.4-cgi/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-cli/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-common/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-fpm/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed]
php7.4-gd/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed]
php7.4-json/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-mbstring/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-mysql/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-opcache/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-readline/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-xml/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.4-zip/focal,now 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 amd64 [installed]
webmin-php-pear/virtualmin-universal,virtualmin-universal,now 1.5 all [installed,automatic]`

@iliajie
Copy link
Contributor

iliajie commented Feb 2, 2022

@mazataza If you install php-cli package, and re-run config check, clear cache, change PHP version afterwards -- does it change anything for you?

If after all that I just suggested, it doesn't work, can you go to Edit Virtual Server and hit save button, re-saving virtual server details, and again clear cache -- do you get the right link?

I cannot reproduce the issue you're having, although I have discovered more PHP related bugs to fix.

@mazataza
Copy link
Author

mazataza commented Feb 2, 2022

i have ..

1- installed php-cli (which install php8.1)
2- run recheck and cleared the cache
3- changed php version from 7.4 to 5.6 and then redone point 2 and then change back 7.4 and redone point 2
nothing changed
4- edited virtual server and save it.
5- cleared cache
nothing changed.

@mazataza
Copy link
Author

mazataza commented Feb 2, 2022

i will try in a new test enviroment to install virtualmin with apache first with 2 php versions
then disable apache and activate nginx plugin
ans see if the issue still exist.

@mazataza
Copy link
Author

mazataza commented Feb 2, 2022

i installed a fresh ubuntu 20.04 and installed a fresh virtualmin (lamp stack)
and configured a default server.
and check that when switching php-fpm for different version i can edit php-fpm configuration for the selected php version
now i changed the stack to nginx by installing nginx plugins and disabled apache plugins and disabled apache services in my ubuntu.
the result is same, i still have same issue. always try to edit php version 5.6 although i configured my site to use 7.4.

all the test enviroments are running on VMWare

@iliajie
Copy link
Contributor

iliajie commented Feb 8, 2022

@jcameron Jamie, is this an issue for you?

@jcameron
Copy link
Collaborator

jcameron commented Feb 9, 2022

Unfortunately currently the "Can edit PHP and website options" permission doesn't control access to editing php.ini

But we could add that I suppose ..

@iliajie
Copy link
Contributor

iliajie commented Apr 14, 2022

Jamie, have this been implemented yet?

@jcameron
Copy link
Collaborator

No, not yet

@iliajie
Copy link
Contributor

iliajie commented Jun 10, 2022

The issue with incorrect menu link for PHP-FPM configs was just fixed.

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

3 participants