Giter Site home page Giter Site logo

purge's People

Contributors

bryanburgers avatar jaseclamp avatar kevincupp avatar timkelty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

purge's Issues

Not showing up in EE 2.5.x?

Hey,

I put the purge add on in /system/expressionengine/third_party, but it isn't showing up in accessories or add-ons so I can install it.

Any thoughts?

Thanks!

EE3 Version

Hi Kevin
Would you be available or could you recommend someone who may be available to develop an EE3 version of this addon ?
Thanks

Automatic Purge Results in Database Error

When attempting to publish a page, content item, etc, I get the following error:

A Database Error Occurred
Error Number: 1054
Unknown column 'site_id' in 'where clause'
SELECT * FROM (`exp_purge_rules`) WHERE `channel_id` = 1 AND `site_id` = 1
Filename: third_party/purge/ext.purge.php
Line Number: 108

After reviewing, I'm not exactly sure what the need for site_id is in the WHERE clause, and commenting out line 107 in ext.purge.php:

$this->EE->db->where('site_id',(int) $meta['site_id']);

does fix the issue for me. I can do a PR if needed, but I was hoping I could get more insight into the logic of having site_id in the WHERE clause before I went down that rabbit hole.

Error on install: syntax error, unexpected '}' in ext.purge.php on line 99

As the title says. :)

Parse error: syntax error, unexpected '}' in /vhosts/mysiteisgreat.com/httpdocs/sys/expressionengine/third_party/purge/ext.purge.php on line 99

My extensions page is also not loading at the moment, an issue I haven't seen before. I'm gonna roll back to an earlier Purge for now and hope for the best. :)

error: third_party/purge/helpers/varnish_helper.php on line 27

Hi,
Getting "Fatal error: Call to undefined function curl_init() ....[path]/third_party/purge/helpers/varnish_helper.php on line 27 " error when creating entry. Structure 3.2.4 is installed. possible conflict with Purge?
Line 27: $ch = curl_init();
Pls advise
Thanks

Load balanced Varnish purge?

Not really issue... more a question?

My sysadmin has setup a load balanced set of varnish servers. I would like to send the purge to both. How would you suggest we work this out? Any thoughts?

Thanks,
Taylor

Purge

Hi,
I am a newbie to varnish and successfully installed varnish as per your instructions. Unfortunately the purge addon doesn't appear to work for me e.g. if I edit a template in Template Manager with EE2.5.5 and click Purge the template does update with the change. Take about 10 pages refreshes and over and backs

I added

if (req.request == "EE_PURGE") {
    ban("req.http.host ~ example.com && req.url ~ ^/.*$");
    error 200 "Purged";
}

to
vcl_recv (withing /etc/varnish/main.vcl) with my domain and added

$config['varnish_site_url'] = 'http://mysite.com';
$config['varnish_port'] = 80;

to /system/expressionengine/config/config.php

http://ellislab.com/blog/entry/making-sites-fly-with-varnish

Is there something basic I'm doing wrong?
Thanks

here is my main.vcl (' need to be replaced with " for varnishd -f /etc/varnish/main.vcl -s malloc,200M to execute)

backend default {
.host = "127.0.0.1"; # IP address of your backend (Apache, nginx, etc.)
.port = "8080"; # Port your backend is listening on
.probe = {
.url = "/";
.timeout = 34ms;
.interval = 1s;
.window = 10;
.threshold = 8;
}
}

sub vcl_recv {
if (req.request == "EE_PURGE") {
ban("req.http.host ~ academ-ee.com && req.url ~ ^/.*$");
error 200 "Purged";
}
# Forward client"s IP to backend
remove req.http.X-Forwarded-For;
set req.http.X-Forwarded-For = client.ip;

# Set the URI of your system directory
if (req.url ~ "^/system/" ||
req.url ~ "/templates/" ||
    req.url ~ "ACT=" ||
    req.request == "POST" ||
    (req.url ~ "member_box" && req.http.Cookie ~ "exp_sessionid"))
{
    return (pass);
}

unset req.http.Cookie;

set req.grace = 1h;

return(lookup);

}

sub vcl_fetch {

# Enable ESI includes
set beresp.do_esi = true;

# Our cache TTL
set beresp.ttl = 1m;

set beresp.grace = 1h;

return(deliver);

}

Call to undefined function send_purge_request()

I've installed the add-on but when we publish or update an entry we get a PHP Fatal Error: Call to undefined function send_purge_request()

I noticed when I glanced through the ext that there is no send_purge_request function and assume it's in the varnish helper? This is EE 2.5.5 if that helps.

Smart Purge is now Ban

Just a heads up, because I'm new to Varnish and was wondering why I kept receiving compile errors in 3.x Varnish.

Purge no longer takes arguments and has become ban. In the readme, it should now be

if (req.request == "EE_PURGE") {
    purge("req.http.host ~ example.com && req.url ~ ^/.*$");
    error 200 "Purged";
}

See the upgrade documentation for more.

Stop curl from sending its output to browser

Please add following line before curl_exec($ch); to varnish_helper.php :

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

because with current codes curl is sending its output to browser and causing the EE to stop and show PHP errors ...

Thanks for your very useful addon ๐Ÿ‘

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.