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

    [FIXED] PHP ERROR when enabling Squid Authentication Method to CAPTIVE Portal on version 2.7.0

    Scheduled Pinned Locked Moved Cache/Proxy
    4 Posts 4 Posters 1.9k 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.
    • R
      remzej
      last edited by

      Good Day Everyone!

      After upgrading my pfSense 2.6.0 to 2.70 I encountered this PHP ERROR: Type: 1, File: /usr/local/bin/check_ip.php, Line: 28, Message: Uncaught Error: Undefined constant "STDIN" in /usr/local/bin/check_ip.php:28.

      This php error occurs when setting the Squid Authentication Method to Captive Portal. I edited the /usr/local/bin/check_ip.php file to fix this problem by modifying the proper declaration of STDIN and STDOUT to these lines below:

      if (!defined('STDIN')) {
      define("STDIN", fopen('php://stdin', 'r'));
      }
      if (!defined('STDOUT')) {
      define("STDOUT", fopen('php://stdout', 'w'));
      }

      then reapplied all my Squid and Captive Portal settings and worked back to normal.

      1 Reply Last reply Reply Quote 4
      • H
        hdfan
        last edited by

        thank you so much!

        1 Reply Last reply Reply Quote 1
        • H
          hari.kalathil
          last edited by

          Thank you very much. Works fine.

          1 Reply Last reply Reply Quote 0
          • G
            guilhermesleal
            last edited by guilhermesleal

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