<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Custom SquidGuard Error Pages Redux]]></title><description><![CDATA[<p dir="auto">I've been trying to create a customized SquidGuard error page.  I've followed the simple steps here:</p>
<p dir="auto">https://forum.pfsense.org/index.php?topic=9519.0<br />
https://forum.pfsense.org/index.php?topic=26057.0<br />
https://forum.pfsense.org/index.php?topic=77142.0</p>
<p dir="auto">I've modified the standard sgerror.php to add an include for my custom error page (KOMerr.php renamed from the personalSgerror.php file linked in one of the forum posts I listed above):</p>
<pre><code>include "globals.inc";
include "config.inc";
include "/usr/local/www/KOMerr.php";
$page_info = &lt;&lt; &lt;eod&lt; pre=""&gt;I've commented out the get_error_page function in sgerror.php:

</code></pre>
<h1><a class="anchor-offset"></a>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</h1>
<h1><a class="anchor-offset" name="ie-displayed-self-page-if-them-size-gt-1024"></a>IE displayed self-page, if them size &gt; 1024</h1>
<h1><a class="anchor-offset"></a>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</h1>
<p dir="auto">function Xget_error_page($er_code_id, $err_msg='') {<br />
        global $err_code;</p>
<pre><code>
I've set SquidGuard to block with an Ext URL Error Page to:

http://pfsense.mydomain.local/sgerror.php?url=http://pfsense.mydomain.local/KOMerr.php&amp;a=%a&amp;n=%n&amp;i=%i&amp;s=%s&amp;t=%t&amp;u=%u

When a site is blocked, all i get is a blank page, as if the get_error_page function isn't being called.  I'm not a PHP guy nor do I have a clue as to where the PHP logs are, if they exist.

Does anyone have a clue as to how I debug this?&lt;/eod&lt;&gt; 
</code></pre>
]]></description><link>https://forum.netgate.com/topic/78946/custom-squidguard-error-pages-redux</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Mar 2026 20:23:39 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/78946.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 29 Jan 2015 16:28:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Custom SquidGuard Error Pages Redux on Thu, 29 Jan 2015 18:28:43 GMT]]></title><description><![CDATA[<p dir="auto">I haven't tried that.  The problem with editing the local file is that any changes will be blown away during an upgrade.  The posts I linked to suggested just including the function in an external file so that you only had to add the include statement to the updated sgerror.php.  I know I should move the KOMerr.php out of /usr/local/www but I wanted to get it working at a basic level first.</p>
]]></description><link>https://forum.netgate.com/post/513105</link><guid isPermaLink="true">https://forum.netgate.com/post/513105</guid><dc:creator><![CDATA[KOM]]></dc:creator><pubDate>Thu, 29 Jan 2015 18:28:43 GMT</pubDate></item><item><title><![CDATA[Reply to Custom SquidGuard Error Pages Redux on Thu, 29 Jan 2015 18:11:41 GMT]]></title><description><![CDATA[<p dir="auto">If you edit the local sgerror.php, you may not need to call it external or change error url.</p>
<p dir="auto">when you call sgerror.php directly can you see your modifications?</p>
]]></description><link>https://forum.netgate.com/post/513090</link><guid isPermaLink="true">https://forum.netgate.com/post/513090</guid><dc:creator><![CDATA[marcelloc]]></dc:creator><pubDate>Thu, 29 Jan 2015 18:11:41 GMT</pubDate></item><item><title><![CDATA[Reply to Custom SquidGuard Error Pages Redux on Thu, 29 Jan 2015 17:49:13 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">The complete error page is still sgerror.php or all info is inside KOMerr.php?</p>
</blockquote>
<p dir="auto">Thanks.  The sgerror.php is the main error page that includes the function from KOMerr.php.  I've been doing it as per <a href="https://forum.pfsense.org/index.php?topic=26057.0" target="_blank" rel="noopener noreferrer nofollow ugc">this forum post</a> where they used the URL:</p>
<p dir="auto">https://firewall-ip:port#/sgerror.php?url=https://firewall-ip:port#/firewallblock.php&amp;a=%a&amp;n=%n&amp;i=%i&amp;s=%s&amp;t=%t&amp;u=%u</p>
<p dir="auto">In my case I substituted http for https and KOMerr.php for firewallblock.php.  I tried using just http://pfsense.mydomain.local/sgerror.php&amp;a=%a&amp;n=%n&amp;i=%i&amp;s=%s&amp;t=%t&amp;u=%u and that didn't work either.</p>
<p dir="auto">I fully admit that I have no idea what I'm doing here, so my problem is likely something silly.</p>
]]></description><link>https://forum.netgate.com/post/513078</link><guid isPermaLink="true">https://forum.netgate.com/post/513078</guid><dc:creator><![CDATA[KOM]]></dc:creator><pubDate>Thu, 29 Jan 2015 17:49:13 GMT</pubDate></item><item><title><![CDATA[Reply to Custom SquidGuard Error Pages Redux on Thu, 29 Jan 2015 17:30:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kom">@<bdi>KOM</bdi></a>:</p>
<blockquote>
<p dir="auto">I've set SquidGuard to block with an Ext URL Error Page to:</p>
<p dir="auto">http://pfsense.mydomain.local/sgerror.php?url=http://pfsense.mydomain.local/KOMerr.php&amp;a=%a&amp;n=%n&amp;i=%i&amp;s=%s&amp;t=%t&amp;u=%u</p>
</blockquote>
<p dir="auto">It looks like this redirect says that http://pfsense.mydomain.local/KOMerr.php is the denied page.</p>
<p dir="auto">The complete error page is still <strong>sgerror.php</strong> or all info is inside <strong>KOMerr.php</strong>?</p>
]]></description><link>https://forum.netgate.com/post/513060</link><guid isPermaLink="true">https://forum.netgate.com/post/513060</guid><dc:creator><![CDATA[marcelloc]]></dc:creator><pubDate>Thu, 29 Jan 2015 17:30:38 GMT</pubDate></item></channel></rss>