You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, we write the config.php file if it's writeable, and if not, we show the user what to copy to the file by hand.
Since we don't ship with a config.php file, and since is_writeable() returns false when file does not exist, people will always have to copy it manually.
Maybe we should do a @touch($configfile); right before it? Suppressing any errors, because we check for writability next thing?
I’d rather not first try and force the creation of a file.
If you want to keep all the separate logic we have now, the solution would be to extend the if-statement to check if the directory is writeable when the file doesn’t exist:
file_put_contents will (over)write or create the file, does exactly what we currently do (it “is identical to calling fopen(), fwrite() and fclose() successively”), and will set $file_written to false if something went wrong so we can tell people to manually copy the file contents.
So, we write the config.php file if it's writeable, and if not, we show the user what to copy to the file by hand.
Since we don't ship with a config.php file, and since is_writeable() returns false when file does not exist, people will always have to copy it manually.
Maybe we should do a
@touch($configfile);
right before it? Suppressing any errors, because we check for writability next thing?selfauth/setup.php
Line 138 in 7ef3947
Mentioning PR #27 here, because it's about cleaning up setup.php
The text was updated successfully, but these errors were encountered: