Page 2 of 2

Posted: Wed Mar 03, 2004 8:44 am
by gurjit
i'm on apache. i can see permission denied. i'm going to ask the administrator to give me permissions to the folder to write.

the m2.txt does not have to exist at the beginning does it. the script will create a file what ever name i give it from fresh?

Posted: Wed Mar 03, 2004 8:48 am
by liljester
yes if you use fopen("filename", "w") it will (attempt to) create a new file, or if it exists it truncates it 0 bytes

Posted: Wed Mar 03, 2004 8:48 am
by markl999
Yeah, $string gets written to m2.txt, the 'w' on the fopen() will create the file if it doesn't already exist.

Posted: Wed Mar 03, 2004 8:56 am
by gurjit
i'm waiting for permissions from my administrator now. any probs i'll be back.

so far you been a great help. thank you for your time.

Posted: Wed Mar 03, 2004 10:39 am
by gurjit
i got the folders and files to create. thank you for your help. The only problem is that i cant delete them because when it creates the files it gives permissions only for apache user to delete. anyway of over coming this?

also in the $string i want to store the output from a function. this is how i echo the function normally

Code: Select all

<?php
 echo "<html><body><pre>";
 echo htmlspecialchars(mysqlbackup($host,$dbname,$uname,$upass,$structure_only,$crlf));
 echo "</PRE></BODY></HTML>";
?>

how can i store it in the $string variable????

Posted: Wed Mar 03, 2004 10:41 am
by malcolmboston
cant you just use chown/chmod on that directory, or is that not an option?

Posted: Wed Mar 03, 2004 10:58 am
by gurjit
i tried that but it never worked.