Results 1 to 7 of 7

Thread: Easy Question - In 2 Much of A Rush it Figure it out

  1. #1

    Thread Starter
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Easy Question - In 2 Much of A Rush it Figure it out

    PHP Code:
    $filename $_SERVER['DOCUMENT_ROOT'] . '/includes/pages/whatsnew.txt';
    $fp fopen($filename"w+");
    $write fputs($fp$file);
    fclose($fp); 

    Error:
    Warning: fopen(/home/groups/htdocs/includes/pages/whatsnew.txt): failed to open stream: Read-only file system in /home/groups/htdocs/admin/1.php on line 4.
    I set the file and the directory to 777, so why is it still b1tchin?
    PHP in your FACE!

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Easy Question - In 2 Much of A Rush it Figure it out

    The clue is in the error message:
    Warning: fopen(/home/groups/htdocs/includes/pages/whatsnew.txt): failed to open stream: Read-only file system in /home/groups/htdocs/admin/1.php on line 4.
    You cannot open the file for writing because it resides on a read only file system.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Re: Easy Question - In 2 Much of A Rush it Figure it out

    So changing the directory properties won't do any thing? So theres nothing I can do?
    PHP in your FACE!

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Easy Question - In 2 Much of A Rush it Figure it out

    If you have permissions then you can unmount the file system and remount it as a read/write file system. If not, the only thing you can do is use a file system which is not read only.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Re: Easy Question - In 2 Much of A Rush it Figure it out

    Well there goes my whole site design out the window...
    PHP in your FACE!

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Easy Question - In 2 Much of A Rush it Figure it out

    Why not place the file somewhere else?
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  7. #7

    Thread Starter
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Re: Easy Question - In 2 Much of A Rush it Figure it out

    You mean a different server? Here's what I'm trying to do...

    I'm making a cms for my site on sourceforge. The html for the different sections are asaved in text files and then echoed in through PHP. When admins need to edit the content, the text file is loaded into a textarea (textbox), edited and then overwrites the file. But I guess the security on SF doesn't allow writting to files at all.

    I guess I will just have to use SQL :shrugs:
    PHP in your FACE!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width