How to run php script from shell?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DamageX
    Marketing & Strategy
    • Jun 2001
    • 14293

    #1

    How to run php script from shell?

    I need to run a php script from command line, does anyone know how I can do this?
    Whitehat is for chumps

    If you don't do it, somebody else will - true story!
  • dnsmonster
    Confirmed User
    • Jul 2002
    • 634

    #2
    If your PHP was compiled as an Apache module, you can't do that. If it was compiled as a CGI then just run php -f phofile.php
    I couldn't possibly know what I'm talking about, I'm completely, absolutely and definitively out of my fucking mind.

    Comment

    • Libertine
      sex dwarf
      • May 2002
      • 17860

      #3
      If it's an apache module, use wget on it
      /(bb|[^b]{2})/

      Comment

      • funkmaster
        So Fucking Banned
        • Sep 2001
        • 7938

        #4
        Originally posted by punkworld
        If it's an apache module, use wget on it
        or lynx

        Comment

        • dnsmonster
          Confirmed User
          • Jul 2002
          • 634

          #5
          If you do wget or lynx or curl make sure to set timeout to something more than the deafult 30 seconds if your script takes its sweet time to run.
          I couldn't possibly know what I'm talking about, I'm completely, absolutely and definitively out of my fucking mind.

          Comment

          • DamageX
            Marketing & Strategy
            • Jun 2001
            • 14293

            #6
            Thanks dnsmonster, that did it!
            Whitehat is for chumps

            If you don't do it, somebody else will - true story!

            Comment

            Working...