(moved from SupportForum)

Tim: New Question

I downloaded and installed EasyWiki on my local Windows box. I saw a reference on the FeatureList page to Save As-filename within HTTP, but haven't been able to find anything else about it. I am interested in using my EasyWiki as a place to save Web pages, so I would save web pages (with Firefox) into a directory, and they would become searchable Wiki pages. Is that possible, and if so could you point me towards the relevant documentation? I have already set define("EWIKI_ALLOW_HTML", 1);, but I am wondering how / where I would save the pages. Thanks again in advance for the help.

Andy: Another feature I don't use, but I think you're looking at the wrong side of Save As, try looking at the options for StaticPages and admin/page_searchcache.php, those two features should combine to meet your needs.

milky: The 'spages' extension is what you're searching for. You have a spages/ directory, where a few external plugins reside. If you put something with a filename extension of .txt or .wiki (or without) into it, it will be treaten as WikiPage; if you put some .html file into it, it will be used as the content for a same-named WikiPage. However, huge drawback: this may not scale all too well, if you have hundreds of files in there then ewiki may get slow (nobody knows exactly), because this isn't directly integrated with tha database. All files in spages/ are really virtual pages, that is, they can't be searched in. It may be possible to extend the PowerSearch a bit (needs some time), but then searching gets considerably slower.

Tim Thank you gentlemen for the suggestions and the help. I really appreciate it. I've made some progess with my local wiki / database of saved web pages, but have run into a couple of problem and one roadblock. I installed the spages and *CacheSearch plugin. Now my index page shows all the files in my local directory, inluding all the graphic files. But when I go to the pages themselves, the graphics don't show up. Is there any way to tell it not to list the graphics files, but to see that they get included when I view the html or php files?

With the cache search plugin, I quickly found that I needed to go the php.ini and raise max_execution_time from 30, otherwise building the cache just timed out. Then buiding the cache started dying with the error

Parse error: parse error, 
unexpected T_STRING in C:\My Web Sites\\blahblah\index.html on line 1"

I checked line 1 on the files it was dying on, and it was

<?xml version="1.0" encoding="iso-8859-1"?>

Is there any change I can make so that it will ignore this line?

Lastly, I am using the flat file based database system - would I be better off moving to another db?

Many thanks in advance, Tim

milky: No problem, this page is about user support, you know ;)

The 'spages' plugin wasn't made for serving binary files, that's why it does not return those image files correctly. But then we could certainly hack in something in to make that work, it's possible at least. (I hope.)

The PHP parsing error is due to the '<?' in '<?xml' which the PHP interpreter thinks to be the starting marker for PHP code, which it then tries to compile and execute. This of course fails, because it is a plain XML parser instruction what follows. You can turn this off in the php.ini with short_open_tags set to off (then PHP only scans for '<?php' and not the short '<?'). Or you could fix the spages plugin itself, because it treads .html files like .php scripts.

OTH, I think we could write a more sophisticated plugin for your purposes. I'm not sure how the original works, but we've taken that spages/ idea from "*GeekLog" (a free OSS blog software) - maybe they were better prepared to do such things. I just look that up...

The flat file system has some drawbacks, and it may often be a lot slower than a relational database (MySQL works best currently). But then until today, we've tried to keep ewiki database independent, that is, all features should work with all database backends. So unless you feel it's getting too slow for you, and when you're more comfortable with flat files (which aren't that bad, but look for the db/fast_files backend also) then I'd say just keep it. You can convert at any later time (using the ewikictl cmdline utility at least).

milky(update): For the real-static-pages plugin, we'd need to have the "/etc/mime.types" file available - do you have that installed on your Windows box or do you see it included with your PHP interpreter for example? Otherwise you would also need the mime_magic extension (if not already supported by your PHP interpreter).

milky(*LaterThatNight): check out the CVS version of the spages plugin, there is now support for image files at least. You need ModRewriteUrls or a *PathInfo setup, else the <img src=...> references in the .html files won't work.

Tim Wow, great support and fast work, thanks gents. To update you on my efforts (before reading what you wrote), in spite of raising max_execution_time to 1500 seconds, I never got it to finish creating an index (on a 2Gig Pentium running winXP with 512M memory). I took a look at my saved web pages folder and realized why -- I had over a 100 Meg in it, with over 3,000 files, including a lot of graphics. A little bit much for a test bed. Then I couldn't get my index page to load. I went in and tried deleting some of the data files, but no luck - the home page just hung. So I am going reinstall everything tonight or tomorrow and try again, with subset of my saved pages directory and with the new changes you have made -- I'll have to read up on *MimeMagic and ModRewriteUrls or *PathInfo to figure out what you are talking about.

When I was using IE, I used Surfsaver and Mybase to save the results of my web research. Now I am using Firefox as a browser, and saving pages with it or using the spiderzilla extension or HTTP Track, but I don't have a way to quickly search through the saved pages. I am happy to continue trying to make this work if you think that I have a decent chance at a reasonable solution on the other end. Also, your mention of a plugin to do exactly this made my mouth water -- I'd be delighted to be an alpha tester.

On a related topic, if you think that MySQL would make it an order of magnitude or so faster, then I should probably use that. I was using the flatfile method so that it would be easy to syncronize the data between my desktop and laptop. But as you point out, it doesn't scale well.

Thanks again for the great support!

bottom corner