1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP cmdline issues - Win + Cygwin

Discussion in 'PHP' started by rickbkis, Jun 30, 2005.

  1. #1
    Hmph!!

    I've taken to using PHP for general scripting, and it's been working pretty well, but now something's happened & I can't quite figure out what's going on.

    Here's the crux: If I run a script from anywhere but the directoy it resides in, I get: "Could not open input file: <fully qualified filename>."

    I'm running PHP 4.3.11, cygwin latest (just upgraded, again, to check), from a tcsh shell, script starts with:

    #! /usr/local/bin/php

    Which is where my php is installed. It runs great from the script-local directory, won't run from anywhere else.

    Anybody have a clue on this?

    Thanx,
    rickb
     
    rickbkis, Jun 30, 2005 IP
  2. Will.Spencer

    Will.Spencer NetBuilder

    Messages:
    14,789
    Likes Received:
    1,040
    Best Answers:
    0
    Trophy Points:
    375
    #2
    When you enter the fully qualified filename, are you using forward slashes or backward slashes?

    i.e. are you using DOS syntax or Unix syntax?

    Try the other one. :D
     
    Will.Spencer, Jun 30, 2005 IP
  3. rickbkis

    rickbkis Peon

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah, I've tried both forms. Anyway, the fully qualified filename is in the error message - I'm getting the script from the initial shell invocation. It seems something's happening on the PHP side, i.e., once PHP has started, it back-references the script and it can't find it.

    Well, PHP 4.0 is just released, maybe that fixes it.

    rickb
     
    rickbkis, Jul 4, 2005 IP
  4. rickbkis

    rickbkis Peon

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Answer:

    Build PHP under cygwin.

    I was lazy and was trying to use the windows pre-built php.

    BZZZT!

    The windows binaries aren't aware of cygwin directory specs & don't know how to handle it. Building everything under cygwin fixes it.

    rickb
     
    rickbkis, Jul 4, 2005 IP