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

PHP Options disappearing. #899

Open
redsector72 opened this issue Sep 12, 2024 · 4 comments
Open

PHP Options disappearing. #899

redsector72 opened this issue Sep 12, 2024 · 4 comments

Comments

@redsector72
Copy link

redsector72 commented Sep 12, 2024

This happened to me more than once on multiple servers. At first i thought it was my mistake, now I suppose there is a bug.
I periodically use virtualmin interface to check php logs, and sometimes they are simply not listed under Logs and Reports. It's like PHP is not even enabled for the domain.
I have to go to Webmin -> configuration and re enable PHP-PFM.
But PHP Was already up and working for the website, so it's like virtualmin is not able to tell it's enabled.

I'm not sure what it checks to determine if php is enabled.

I have to say that I have a second issue that maybe is related.
When I manually modify the directives (both SLL and not SLL) regarding <FilesMatch ".php"> it simply does not understand it and keep adding its lines to the config "at random times".

I change to this:

<FilesMatch "\.(inc|php|phtml|phps|php72)$">
    ProxyErrorOverride on
    <If "-f %{REQUEST_FILENAME}">
        SetHandler proxy:unix:/run/php/XXXXXXXX.sock|fcgi://127.0.0.1
    </If>
</FilesMatch>

and from time to time is simply re-add its line to the config. Maybe there's a way to change this behavior I was not able to find.

My system is Ubuntu 24.04.1, Webmin 2.202 and Virtualmin 7.20.2

@iliajie
Copy link
Collaborator

iliajie commented Sep 12, 2024

Hello,

Does this issue occur if you only use Virtualmin to change PHP execution mode/versions? Because we use different config options in Apache to enable PHP, and Virtualmin may simply not recognize your syntax.

@redsector72
Copy link
Author

hello @iliajie,
I suppose the bug is in there. As I have changed the config manually and now the PHP part is gone again.
I will do some test

@redsector72
Copy link
Author

redsector72 commented Sep 12, 2024

So, I've made some test.
It's not clear when, but seems like if I do remove or modify

`#<FilesMatch \.php$>
#    SetHandler proxy:unix:/run/php/XXXXX.sock|fcgi://127.0.0.1
#</FilesMatch>`

at some point Virtualmin looses the knowledge about PHP being enabled.

I suppose the check in the code is done badly as in my test I have found:

  1. it adds the 3 lines at the end if I have modified the original one my way
  2. it adds the 3 lines at the end if I have modified the original in any way, it seems like is checking for the full lines.

There is something I can do about this?

@iliajie
Copy link
Collaborator

iliajie commented Sep 12, 2024

Can you explain more about your use cases for:

<FilesMatch "\.(inc|php|phtml|phps|php72)$">
    ProxyErrorOverride on
    <If "-f %{REQUEST_FILENAME}">
        SetHandler proxy:unix:/run/php/XXXXXXXX.sock|fcgi://127.0.0.1
    </If>
</FilesMatch>

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