$ 0 0 okay, the problem really was the write permission. My web hosting company set permissions. I retried the script and it worked!