Sorry this idea didn't get into 1.0.9, Dick ... just ran out of time.
BUT, I've had an idea that might be even better. See: http://moodle.org/mod/forum/discuss.php?d=1374
Martin Dougiamas
Posts made by Martin Dougiamas
I just had an idea that might solve the safe mode problem.
The PHP "safe mode" problem is this:
- Moodle files are owned by the user
- Uploaded files are owned by the web server user
- Safe Mode denies all access to files from scripts that are owned by a different user than the file.
So I just had a flash: what if the file-reading script was automatically CREATED by Moodle during installation (from a template stored in the library) - then this script would be owned by the user, and it shouldn't have any problems reading the files.
The instructions for installing Moodle under safe mode could be:
- use FTP or shell to "chmod 777 files" where files is the script folder
- visit the admin page, which will autodetect safe mode and create the safe-mode script
- chmod the directory again to turn off write permissions again "chmod 755 files" (for security)
When upgrading, the admin script could delete the old script and create a new one there (assuming chmod had been done).
Anyone see any problems with that?
It seems so simple - I'm surprised no-one's come up with it before. If it works I think it will have a lot less to go wrong than the FTP workaround which was the best solution until now.
The PHP "safe mode" problem is this:
- Moodle files are owned by the user
- Uploaded files are owned by the web server user
- Safe Mode denies all access to files from scripts that are owned by a different user than the file.
So I just had a flash: what if the file-reading script was automatically CREATED by Moodle during installation (from a template stored in the library) - then this script would be owned by the user, and it shouldn't have any problems reading the files.
The instructions for installing Moodle under safe mode could be:
- use FTP or shell to "chmod 777 files" where files is the script folder
- visit the admin page, which will autodetect safe mode and create the safe-mode script
- chmod the directory again to turn off write permissions again "chmod 755 files" (for security)
When upgrading, the admin script could delete the old script and create a new one there (assuming chmod had been done).
Anyone see any problems with that?
It seems so simple - I'm surprised no-one's come up with it before. If it works I think it will have a lot less to go wrong than the FTP workaround which was the best solution until now.
Making a backup of the database is purely a precaution, just in case you need to go back to the old version for some reason.
Safe mode is not really supported yet.
http://moodle.org/doc/?frame=install.html&sub=requirements
The problem with safe mode is impossible to resolve without help from your administrator or hacking Moodle to use FTP. Hacks are discussed near the end of this thread:
http://moodle.org/mod/forum/discuss.php?d=974
Unfortunately they didn't make it into 1.0.9 due to lack of time, but hopefully the next release.
http://moodle.org/doc/?frame=install.html&sub=requirements
The problem with safe mode is impossible to resolve without help from your administrator or hacking Moodle to use FTP. Hacks are discussed near the end of this thread:
http://moodle.org/mod/forum/discuss.php?d=974
Unfortunately they didn't make it into 1.0.9 due to lack of time, but hopefully the next release.
Fantastic!
George Fousekis has also started on Greek recently (but not posted here) - I'll ask him to contact you - perhaps you can share some of the remaining work.
Let me know if I can help (with Moodle, I've forgotten the Greek I learned as a child!)
George Fousekis has also started on Greek recently (but not posted here) - I'll ask him to contact you - perhaps you can share some of the remaining work.
Let me know if I can help (with Moodle, I've forgotten the Greek I learned as a child!)