From: Steve W. <sw...@pa...> - 2000-12-31 19:49:13
|
Hi David, happy new year!... > I've installed Apache 1.3.14, Php 4.04 and phpwiki 1.19 on Windows NT > 4.0sp6, and things aren't working so well. > > I have been able to get a default frontpage to come up, but when I set up > k:/apache/htdocs/phpwiki/mywiki/Pages using the content of the pgsrc dir, it > won't serve any of those pages. (Also changed lib/config.php to use the > 'file' db type and also modified the paths as needed.) > I modified the error reporting at the top of the index.php file and got the > following: > Warning: unserialize() failed at offset 0 of 337 bytes in > lib/db_filesystem.php on line 52 Ah... you're using the flat-file database approach, which is severely alpha in quality. I have never installed it myself. I won't have time today, and probably not tomorrow either, but definitely this week. > Warning: Undefined variable: hash in lib/stdlib.php on line 113 > > Warning: Undefined variable: hash in lib/stdlib.php on line 115 > > Warning: Undefined variable: hash in lib/stdlib.php on line 117 > > >From what I understand of php, the undefined variables are probably not a > problem, but the unserialize is something I know nothing about. PHP has a built-in function pair, serialize() and unserialize(). They take an array and convert it to/from a string. This is so the arrays can be written to a file and later restored. > > Also, on the default "FrontPage" page that does come up, clicking on any of > the links for editing etc. don't work at all - I get a blank page after a > longish delay (server timing out?). I think this might be due to some > setting that's not correct in the apache config file, but i'm clueless about > what it might be. Do you get the "connection reset by peer" error in your Apache errors file? > BTW, admin/wikiadminforms.php comes up beautifully! Then, the "download > zips" stuff won't work. Not a surprise, since it doesn't require a database hit to render the page... not as I recall, anyway. > Any insight you might have would be appreciated. > > Sincerely, > > Dave LeBlanc I'm cc'ing this to phpwiki-talk in case Ari is out there, who wrote the flat file support. cheers sw -- http://wcsb.org/~swain/ | "In a calendar year, America's entire * * * * * * | recorded music industry has revenues * * * * * * | roughly equal to one month's sales by * * * * * * | IBM." --Philip Greenspun |
From: Arno H. <aho...@in...> - 2001-01-01 10:23:46
|
David, > I've installed Apache 1.3.14, Php 4.04 and phpwiki 1.19 on Windows NT 1.19 has some nasty bugs. Try the nightly tarball instead. > The biggest problem imho is that there is no seed database, zip file or > flat (serialized) file to get one started. ??? If no FrontPage exists, files from pgsrc/ are *automatically* inserte= d=20 into whatwever database you have chosen (dbm, mysql, flatfile, ...) If this didn't work for you, I'd appreciate if you could give as a more=20 detailed bug report. > run your code before delivery with warnings enabled. I do. Not too long ago, I cleaned up a whole bunch of those warnings. Maybe, I didn't check with a fresh install. > There are some suspicious ones which I think makes it fail silently > when warnings are off. Example? > When loading the pages into mysql using the "edit this page" page's Sav= e > button, mysql reported some syntax errors (loudly <g>) yet, when I went > back and reloaded the base page and clicked on the link pointing to the > page i'd just entered, it was there! This behavior stopped after about > the 4th page loading. I guess this has to do with some SQL queries turning up an empty result a= t=20 the beginning. Actually, this can only happen if you start with *no* page= s=20 in your db, whereas if the setup process works you have at least a dozen=20 pages from pgsrc/ in your database. > It would be really nice, given the availability of the page sources, if > there was some sort of initial "load database/zip/flatfile" utility. Apart from the automatic load process (if no FrontPage exists), there's a= =20 "load serialized pages" on the admin page. Or am I misunderstanding=20 something here? > P.S. I tried locking a page (formatting rules), but phpwiki didn't seem > to honor that Could you describe exactly what you are doing and what the results are? Locking works for me. > I don't see any bits in the wiki schema for page access control > do you do it some other way? Currently we distinguish only between two users: admin and everyone else. Admin may edit locked pages, mortals may not (stored in 'flags',=20 FLAG_PAGE_LOCKED is set). Reading is allowed for everyone. A more=20 sophisticated user managament is currently not high priority. /Arno |
From: Arno H. <aho...@in...> - 2001-01-01 22:50:36
|
> > If no FrontPage exists, files from pgsrc/ are *automatically* inserte= d > When I changed the db type to "mysql", it brought up a page that now ha= d > the "5 best links...." stuff at the bottom of the page, but it made no > attempt to load pgsrc into the db. (I concentrate on mysql here, filedb will be checked later) Just to get this right: you created all necessary tables as defined in th= e=20 schema script. Then you loaded the wiki URL and nothing happend? (apart=20 from a blank page?) Could you please verify the following: - does the page "FrontPage" exist in your wiki? (assuming English language wiki) - if not, is the function LoadZipOrDir() (file setupwiki.php) called? (insert a print into that function and you will see) - do you get errors when LoadZipOrDir() is executed? e.g. that the specified directory for pgsrc is not found? (change error reporting in config.php to error_reporting(E_ALL)) > Can you point me to the sources that do this autoloading please? LoadZipOrDir() in setupwiki.php does the initial loading. It is called from display.php when no FrontPage exists. You can execute t= he function directly as well, if you include stdlib.php & config.php first a= nd open a database like done in index.php. > A lot of warnings about undefineds: "id" and "hash" (this might be wron= g, > i'm doing it from memory - see the other email I sent Steve). was this in the filedb or mysql implementation? afaik I didn't clean up filedb. > It was complaing about a syntax error in the SQL statement. Synatx error would mean that the SQL statement is not executed.=20 I assume you don't mean that, do you? > I notice that the refs field in the wiki table ends up getting > set to "N;" which looks a bit odd. It's the way it should be: serialize() sets undefined variables to "N;"=20 whereas an empty array looks like "a:0:{}". Ok, one could argue we'd rath= er=20 have an empty array instead of an undefined variable. I'm going to look=20 into this. > Well, I didn't know it was supposed to autoload - sorry :). It would be > nice to expose the "load from text" that the autoload facility uses to > install from pgsrc. Shouldn't be too hard to add. Maybe we include this before 1.2. > I hope nobody mistook my wining for lack of appreciation! No - in that case I'd just ignore you :o) I'm happy about bug reports. Keep us informed. /Arno p.s. if possible please 'cc your replies to phpwiki-talk as well. That wa= y=20 we keep in sync with the other developers. If you intend to send more=20 emails I'd suggest you join that mailing list. It's low traffic. |