Quick PHP Question

Discussion in 'OT Technology' started by Saicho, Jun 15, 2007.

  1. Saicho

    Saicho New Member

    Joined:
    Feb 13, 2006
    Messages:
    359
    Likes Received:
    0
    Location:
    Seattle
    I have a php script running on a remote LAMP linux box that uses things like exec() and fopen(). The script works prefectly using the php command line:

    Code:
    $ php script.php
    but when I try to run the script via:

    Code:
    http://myserver.host.com/script.php
    it doesn't seem to be executing things like exec(). I thought the problem was safe mode, but looking at php.ini safe mode is turned off.

    Any idea as to what the problem is here? Thanks for the help.
     
  2. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    probably something to do with chmod settings on the server
     
  3. Saicho

    Saicho New Member

    Joined:
    Feb 13, 2006
    Messages:
    359
    Likes Received:
    0
    Location:
    Seattle
    all of the files that the script deals with are world read/writeable
     
  4. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    permissions prolly
     
  5. Saicho

    Saicho New Member

    Joined:
    Feb 13, 2006
    Messages:
    359
    Likes Received:
    0
    Location:
    Seattle
    permissions on what? can you elaborate?

    permissions on what I can do as a user? that can't be the case since running the script from the command line works.

    permissions in the way apache was setup? can you even edit things like that? if so do you know where?
     
  6. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    What user is your apache daemon running as? Make sure that user has the correct permissions on the file.
     

Share This Page