From: Dan F. <dfr...@cs...> - 2005-02-18 21:09:26
|
I agree with David Howland that the right thing to do is to not even run (or produce only a page showing a warning, but no edit buttons, etc.) until the setting is proper. I'd start the setting with a blank or with "./files" or something. Of course, since I'm not willing to dive into the code to change it at this point, my voice is not as authoritative. :) However, I still figure it helps the project as a whole to apply pressure for the right solution. Dan Joel Uckelman wrote: >Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB >In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24337 > >Modified Files: > dba.php file.php >Log Message: >Re-enabled /tmp warnings to save those who choose not to read the > instructions. > > >Index: dba.php >=================================================================== >RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/dba.php,v >retrieving revision 1.4 >retrieving revision 1.5 >diff -u -2 -b -p -d -r1.4 -r1.5 >--- dba.php 21 Nov 2004 11:59:25 -0000 1.4 >+++ dba.php 18 Feb 2005 20:41:28 -0000 1.5 >@@ -13,14 +13,6 @@ class WikiDB_dba extends WikiDB > > if (empty($dbparams['directory']) >- || preg_match('@^/tmp\b@', $dbparams['directory'])) { >- $this->_warnings >- = sprintf(_("DBA files are in the %s directory. Please read the INSTALL file and move the DB file to a permanent location or risk losing all the pages!"),'/tmp'); >- } >- else >- $this->_warnings = false; >- } >- >- function genericWarnings () { >- return $this->_warnings; >+ || preg_match('@^/tmp\b@', $dbparams['directory'])) >+ trigger_error(_("DBA files are in the /tmp directory. Please read the INSTALL file and move the database to a permanent location or risk losing all the pages!"), E_USER_WARNING); > } > }; > >Index: file.php >=================================================================== >RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/file.php,v >retrieving revision 1.4 >retrieving revision 1.5 >diff -u -2 -b -p -d -r1.4 -r1.5 >--- file.php 4 Jan 2003 03:41:46 -0000 1.4 >+++ file.php 18 Feb 2005 20:41:28 -0000 1.5 >@@ -42,4 +42,8 @@ class WikiDB_file extends WikiDB > $backend = new WikiDB_backend_file( $dbparams ); > $this->WikiDB($backend, $dbparams); >+ >+ if (empty($dbparams['directory']) >+ || preg_match('@^/tmp\b@', $dbparams['directory'])) >+ trigger_error(_("Page files are in the /tmp directory. Please read the INSTALL file and move the database to a permanent location or risk losing all the pages!"), E_USER_WARNING); > } > } >@@ -47,4 +51,8 @@ class WikiDB_file extends WikiDB > > // $Log$ >+// Revision 1.5 2005/02/18 20:41:28 uckelman >+// Re-enabled /tmp warnings to save those who choose not to read the >+// instructions. >+// > // Revision 1.4 2003/01/04 03:41:46 wainstead > // Added copyleft flowerboxes > > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >phpwiki-checkins mailing list >php...@li... >https://lists.sourceforge.net/lists/listinfo/phpwiki-checkins > > |
From: Joel U. <uck...@no...> - 2005-02-18 21:26:05
|
Thus spake Dan Frankowski: > I agree with David Howland that the right thing to do is to not even run > (or produce only a page showing a warning, but no edit buttons, etc.) > until the setting is proper. I'd start the setting with a blank or with > "./files" or something. ./files won't work because the web server will generally not have write access there. Adopting that as a solution would leave people wondering why they can't get their wikis to load. > Of course, since I'm not willing to dive into the code to change it at > this point, my voice is not as authoritative. :) However, I still figure > it helps the project as a whole to apply pressure for the right solution. > > Dan My understanding from looking at the configurator code is that soon this will be a moot point, since the configurator will prompt for a database location. (Reini is working on that, I think?) What I committed results in a warning being displayed in a red-bordered box (for DBA, at least---I haven't been able to figure out why everything is displayed as a notice for flat file---anyone know the answer?), which is how it used to be, and how I thought it still was until just yesterday. |
From: Reini U. <ru...@x-...> - 2005-02-19 19:44:02
|
Joel Uckelman schrieb: > Thus spake Dan Frankowski: >>I agree with David Howland that the right thing to do is to not even run >>(or produce only a page showing a warning, but no edit buttons, etc.) >>until the setting is proper. I'd start the setting with a blank or with >>"./files" or something. > > ./files won't work because the web server will generally not have write > access there. Adopting that as a solution would leave people wondering > why they can't get their wikis to load. > >>Of course, since I'm not willing to dive into the code to change it at >>this point, my voice is not as authoritative. :) However, I still figure >>it helps the project as a whole to apply pressure for the right solution. > > My understanding from looking at the configurator code is that soon this > will be a moot point, since the configurator will prompt for a database > location. (Reini is working on that, I think?) I'm working on it, but I would not rely on it. It's very experimental right now. The only requitred settings which prevent from config.ini saving is a missing ADMIN_USER + ADMIN_PASSWD. Proper DATABASE_* settings are not required in the current version. This is TBD. (to be done) Anyway, we have to fix it in the file backend, similar as to the dba backend. Joel already did that, thanks! The developers opinion in this was/is: Storing in /tmp should be no error, just a warning. The bug was that the warning is only in "dba" not in "file". > What I committed results in a warning being displayed in a red-bordered box > (for DBA, at least---I haven't been able to figure out why everything is > displayed as a notice for flat file---anyone know the answer?), which is how > it used to be, and how I thought it still was until just yesterday. It's a red warning by some javascript validators, but a lot of javascript validation is still missing from configurator.php, for example disable the submit button on any valifdation error. And the 2nd validation check after the submit POST is also missing. PS: My machine is working again almost fine. Reformatted C: I still have to chown all the old SID's to my new SID (my custom find getfacl - sed - setfacl script is working for 30 hrs right now) -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban http://phpwiki.org |