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

    Cron and php

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 2 Posters 1.7k 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.
    • Z
      Zorac
      last edited by

      I'm trying to run a php script with cron.  The system log says it runs fine, but it isnt actually running.  I logged into the router and ran the command on the command line using putty and recieved the following error:

      You must enter valid credentials to access this resource.

      Not sure where to go, I am logged in as root, i am using 1.2.3release nano, but enabled rw on the file system prior to running the command (using /etc/rc.conf_mount_rw).  My command line is /usr/local/bin/php -q /usr/local/www/scriptname.php

      Any ideas?  The script runs just fine if I run it though a browser, it only when I try to run it local i get the error.

      Thanks.

      1 Reply Last reply Reply Quote 0
      • Z
        Zorac
        last edited by

        apparently no wget in pfsense, so i tried fetch, but can get it to submit a user/password, otherwise it would probably work?

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          Try it this way:

          fetch http://username:password@127.0.0.1/scriptname.php
          

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • Z
            Zorac
            last edited by

            pefect, thanks!

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