SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am quite trying to figure how to run a script with the php binary.. it might sound as a really basic question.

    A sample script
    #!/usr/local/bin/php -q
    echo "Hello world";
    anything I type

    When I run it it only returns to me the script, not the results of the script.. it isn't even executing. Any ideas of what could be happening?

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One thing, when I want to run a PHP script through PHP as CGI on my server I have to save the script with .cgi extension rather than .php extension. So maybe its a configeration thing.

  3. #3
    SitePoint Guru
    Join Date
    Jan 2001
    Location
    Alkmaar, Netherlands
    Posts
    710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #!/usr/local/bin/php -q
    <?php
    echo "Hello world";
    ?>
    anything I type


Bookmarks

Posting Permissions

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