Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Thanked 0 Times in 0 Posts

    PHP and CHMOD problem

    I have 2 php scripts, 1 detects pics in a folder and displays them the other is a file uploader (to upload pics to a dir to be detected)

    The first works fine but when i chmod the dir the other doesnt work

    The first time I tried this for a mates site I didnt have any problem, I cant for the life of me do it again, the chmod (777) seems to cancel the pic detect script

    someone mentioned including a chmod into one of the scripts but im a novice at this so dont have a clue.

    The dir has a php file there for the file detection

    any ideas?

  • #2
    New Coder
    Join Date
    Jul 2005
    Thanked 0 Times in 0 Posts
    Check this notes from php documentation about chmod
    Note: The current user is the user under which PHP runs. It is probably not the same user you use for normal shell or FTP access. The mode can be changed only by user who owns the file on most systems.

    Note: This function will not work on remote files as the file to be examined must be accessible via the servers filesystem.

    Note: When safe mode is enabled, PHP checks whether the files or directories you are about to operate on have the same UID (owner) as the script that is being executed. In addition, you cannot set the SUID, SGID and sticky bits.
    If you can not find a decision, maybe you have to try to change a problem



    Posting Permissions

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