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

how to use PHP shell with static route add

Scheduled Pinned Locked Moved General pfSense Questions
pfssh.php
2 Posts 2 Posters 512 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.
  • F
    futare
    last edited by Dec 4, 2019, 9:20 PM

    Hi, I am not very good at PHP shell. I can do basic single field changes. Here is a static route example of what I'd like to do:

    $config["staticroutes"]["route"] = json_decode('[{"network":"1.2.3.4/32","gateway":"myint","descr":"mydescription"}]',true);
    

    Unfortunately the above example does not work when run via PHP shell. Please help.

    Thanks in advance,
    Futare

    1 Reply Last reply Reply Quote 0
    • S
      stephenw10 Netgate Administrator
      last edited by Dec 5, 2019, 6:38 PM

      You probably need some include files there for the functions involved.

      1 Reply Last reply Reply Quote 0
      2 out of 2
      • First post
        2/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received