Results 1 to 8 of 8

Thread: executing PHP

  1. #1

    executing PHP

    is there some command line interface tool i can use to run my php script? i've made a php script to use for a cron job and i want to test it - not in the browser and not with the cron.

    thanks

  2. You can get Command Line (CLI) versions of PHP.

    Edit: Don't ask me anything about it though, I don't know. I stick to my CGI PHP.

  3. #3
    Emmm... www.php.net is all I or anyone else can say...

  4. #4
    jw06's Avatar
    657
    posts
    Registered User


    You need to first find the file and chmod +x FILE.php

    After doing that: ./file.php

    Have fun Yay for PHP CLI!

  5. #5
    4,029
    posts
    home cooking is killing the restaurant industry
    Quote Originally Posted by jw06


    You need to first find the file and chmod +x FILE.php

    After doing that: ./file.php

    Have fun Yay for PHP CLI!
    That's only if you have the #!(shabang), which most PHP scripts don't. You probably want to execute

    Code:
    $ php myfile.php
    You don't even have to chmod +x it, how's that for a bonus?
    There are only 10 kinds of people in this world:
    Those that might know ternary, those that do, and those that don't
    Say NO to DRM.

  6. #6
    but where do I run the command? ssh? putty?

  7. #7
    telnet or ssh, I presume???
    CyanBlue / Jason Je / Flash Developer
    http://CyanBlue.FlashVacuum.com
    http://www.FlashVacuum.com

  8. #8
    jw06's Avatar
    657
    posts
    Registered User
    SSH I recomend if you can.. use the She-Bang as Cyanblue said.
    Yea it will save the chmod stuff... but.. do it lol.

    In a SSH session with the server you can do it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012