403 error in lighttpd server in my debian linux server while trying to store form data in a text file. How do I solve this

I had created a html form and was trying to store it in a text file using PHP but I kept getting a 403 error. It’s most probably because it does not have write permission . How do I give the script the permission to write in the directory? (I’m using the Raspbian Wheezy distro)

    <form method="POST" action="store.php">
    Enter Your Name: <input type="text" name="fullname" />

and for the server

    foreach($_POST as $name=>$value)
        $contents .= "$name = $value" . "\n";

    // save locally in cache folder
    $fd = fopen("cache/filename.txt", "w");
    fwrite($fd, $contents);


Leave a Reply


Hire Me
Follow Me!
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.