|
Posted by Brian V Bonini on 10/05/19 11:32
On Sun, 2005-11-20 at 05:44, Łukasz Hejnak wrote:
> Hello again, here's some more extra info on my case that came out while
> Suhas Pharkute was helping me find a resolution:
> So the safe-mode is off, that's for sure, I turned it off at compile stage.
>
> I delete the file after each run of the script, the folder where the
> script is located has 777 permissions and the ownership is given to uid
> 1027 gid 1020, whereas these are the uid/gid set for apache to run with
> (and it does!).
> The script:
>
> $data="some data";
> $file="file.txt";
> $handle = fopen($file,"w");
> fwrite($handle,$data);
> fflush($handle);
> fclose($handle);
> if (is_writable($file))
> echo "Is writable<br>";
> else
> echo "Isn't writable<br>";
>
> works when I run it as root, from the shell (php script.php),
> but when it's run from the server, it doesn't.
I missed the beginning of this thread...
You are saying:
>From the CLI you can write to a file all day long, no prob.
>From the web, if the file does not exist it is created, however, no
content is appended to it. Furthermore, IF there is content in the file
it can be appended to via web, but if it's an empty file it will not get
written too. Am I following correctly?
-Brian
--
s/:-[(/]/:-)/g
Brian GnuPG -> KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
======================================================================
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org
Navigation:
[Reply to this message]
|