Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>How do I get the CHMOD to work? How do I get the php chmod(); to work, is there something I gotta change in the php.ini?</p> </blockquote> <p>From the PHP manual:</p> <blockquote> <p>The current user is the user under which PHP runs. It is probably not the same user you use for normal shell or FTP access. The mode can be changed only by user who owns the file on most systems.</p> </blockquote> <p>If PHP has problems chmod()ing files, change the mode yourself -- via FTP or shell. If you want to change the owner to avoid problem altogether, you must do this through shell. Have PHP create a test file e.g. <code>file_put_contents("foo.txt", "bar")</code> and note down the owner. Then use the chown command through shell and set the owner same as that of the test file. This would be a good time to chmod the files as well.</p> <blockquote> <p>What do I have to change in php.ini / Plesk / Server Settings to make my first bit of code work without having to CHMOD to 666 then back to 655 every time I create / edit a txt file?</p> </blockquote> <p>If you create a file via PHP, you should be able to edit through PHP it anytime you want (and chmod it if necessary). </p> <p>This makes it possible for you to create all the necessary files through PHP. You can read from original file (e.g. <code>$content = file_get_contents("textfile.txt")</code>) and write the content to new file (e.g. <code>file_put_contents("textfile.copy.txt", $content)</code>). Then delete the original file through FTP/shell.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload