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

Purge Entire Cache action uses wrong purge method #323

Open
akansc opened this issue Jan 23, 2024 · 8 comments
Open

Purge Entire Cache action uses wrong purge method #323

akansc opened this issue Jan 23, 2024 · 8 comments

Comments

@akansc
Copy link

akansc commented Jan 23, 2024

The module seems to have 2 purge modes:
image

The GET PURGE/url method works fine when saving single posts and whatnot, however, the the "Purge Entire Cache" seem to execute the unlink_recursive function which of course fails on a shared hosting server due to insufficient permissions.

Allowing shared hosting users to reach and manipulate the global fcgi cache is not an option and would be considered as a security issue.

The PURGE/* wildcard is supported since the 2.4 that was released in 2016, that would still work with all your nginx examples:
https://github.com/nginx-modules/ngx_cache_purge/releases

@qcybb
Copy link

qcybb commented Apr 16, 2024

@gagan0123

I was disappointed to see this wasn't included in the latest update. I'm also effected by the issue above.

Are there any plans to add the PURGE/* now this it's supported?

https://github.com/nginx-modules/ngx_cache_purge/releases/tag/2.4

@JoAllg
Copy link

JoAllg commented Jun 26, 2024

I am currently testing fastcgi cache and nginx helper and noticed the same issue. Purging Entire Cache does not work for our isolated users. Since we use the /PURGE/ URL, @akansc 's suggestion would work for us as well

@JoAllg
Copy link

JoAllg commented Jun 28, 2024

That seems to be an old known issue. #306

@gridpane
Copy link

gridpane commented Jun 29, 2024

Working on this too, pulled other fork

Wrote this 6 years ago, other fork is bringing into nginx helper

https://github.com/JeffCleverley/NginxFastCGICachePurger

The curl functions require 5.5+ and nginx helper is set for 5.4 + compatibility, so im going to take the above fork and add a php guard...

Im also adding socket and other connection option supports.

@gridpane
Copy link

I have completed work on a fork here:

https://github.com/gridpane/nginx-helper

Settings can be configured by wp-admin or using constants

I have put in a guard to check for PHP version, since the curl option required is only available in 5.5+ and plugin is set to allow older versions...

Pulled in work from my old plugin and the pull above: #306

Screenshot 2024-06-29 at 22 26 31 Screenshot 2024-06-29 at 22 27 11

Going to complete testing on our platform and will make PR.

@gridpane
Copy link

#344

@qcybb
Copy link

qcybb commented Jun 29, 2024

Thank you, I hope this gets added in soon.

@JoAllg
Copy link

JoAllg commented Jul 2, 2024

I appreciate it as well @gridpane

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

4 participants