Apache without write permissions

Hi people,

I installed the OpenSuSE 11, and I installed the Apache with the installation… after the os installed, I tried to use the Apache, and it’s ok.

But, I have a problem. Apache doesn’t have write permissions.
I give chmod 777 to all the folders and files of document root of apache, but it not works!

A simple code to test it:

<?php
$handle = fopen("test.txt", "w+");
fwrite($handle, "abc");
fclose($handle);

this code generate this warnings:

Warning: fopen(test.txt): failed to open stream: Permission denied in /srv/www/htdocs/test.php on line 7 Warning: fwrite(): supplied argument is not a valid stream resource in /srv/www/htdocs/test.php on line 8 Warning: fclose(): supplied argument is not a valid stream resource in /srv/www/htdocs/test.php on line 9

Alright, what is happening here?

See my answer re open_basedir in another thread.

Thanks guy! it worked…

Here is his reply: Sorting file permissions… failed badly - openSUSE Forums