Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

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