Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Cant Install/Uninstall Squid on Pfsesne 2.3.1-RELEASE-p5

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    3 Posts 2 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      brien
      last edited by

      [12/15] Extracting squid-3.5.19: …......
      pkg: cannot rename //usr/local/etc/squid/errors/zh-cn.Bou6cRp1Evpn to //usr/local/etc/squid/errors/zh-cn: Is a directory
      [12/15] Extracting squid-3.5.19… done
      [12/15] Deleting files for squid-3.5.19: …....... done
      Failed

      cant install and remove SQUID any ideas?

      1 Reply Last reply Reply Quote 0
      • B
        brien
        last edited by

        If i click services/proxy server it says:

        Fatal error: Call to a member function read() on boolean in /etc/inc/pfsense-utils.inc on line 506 Call Stack: 0.0000 121064 1. {main}() /usr/local/www/pkg_edit.php:0 0.0200 1120476 2. eval('squid_before_form_general($pkg);') /usr/local/www/pkg_edit.php:142 0.0201 1121956 3. squid_before_form_general() /usr/local/www/pkg_edit.php(142) : eval()'d code:1 0.0201 1122064 4. get_dir() /usr/local/pkg/squid.inc:284 PHP ERROR: Type: 1, File: /etc/inc/pfsense-utils.inc, Line: 506, Message: Call to a member function read() on boolean

        1 Reply Last reply Reply Quote 0
        • J
          JorgeOliveira
          last edited by

          Hi,

          You can edit /etc/inc/pfsense-utils.inc

          Find:

          function get_dir($dir) {
          	$dir_array = array();
          	$d = dir($dir);
          	while (false !== ($entry = $d->read())) {
          		array_push($dir_array, $entry);
          	}
          	$d->close();
          	return $dir_array;
          }
          

          Replace with:

          function get_dir($dir) {
          	$dir_array = array();
          	$d = dir($dir);
          	if(!is_object($d)) {
          		return array();
          	}
          	while (false !== ($entry = $d->read())) {
          		array_push($dir_array, $entry);
          	}
          	$d->close();
          	return $dir_array;
          }
          

          This will fix that specific error.

          My views have absolutely no warranty express or implied. Always do your own research.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.