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

    PfSense Developer Shell - $config always seems to be empty?

    Scheduled Pinned Locked Moved Development
    2 Posts 1 Posters 2.8k 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
      Briantist
      last edited by

      Every time I try to use the developer shell, $config appears to be empty. I've even tried examples straight from the help.

      
      echo $config;
      exec
      
      
      
      print_r($config);
      exec
      
      
      
      parse_config(true);
      print_r($config);
      exec
      
      

      All of these output nothing. I've tried it on several 2.0 machines, embedded, full installs, etc. I just tried it on 1.2.3 and I got the same thing. I must be doing something wrong, or missing something. I get the feeling that I'm going to feel really dumb when I find out why this isn't working..

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

        I figured it out by looking at one of the pre-recorded macros.

        
        global $config;
        
        

        This isn't in the help or documentation anywhere.. I guess I'm the only person who ever got tripped up on it though!

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