PHP cant write file to web server dir

Discussion in 'Web Design and Development' started by X1Lightning, Mar 26, 2011.

  1. X1Lightning macrumors 6502

    X1Lightning

    Joined:
    Feb 19, 2007
    #1
    i wrote a script that needs to read a txt file and create multiple pdf files from it. why i try to run it on my mac i get this error "failed to open stream: Permission denied"

    so i have been looking at how to give permission to that directory, but i cant find a way to do that. does anyone know how to do this?


    thanks
     
  2. SDub90 macrumors 6502a

    Joined:
    Nov 9, 2009
    Location:
    Long Island
    #2
    Open up terminal,

    chmod -R 777 /path/to/directory

    and let me know if that worked

    edit: you may also need to make safe_mode is off in php
     
  3. X1Lightning thread starter macrumors 6502

    X1Lightning

    Joined:
    Feb 19, 2007

Share This Page