Fazal Majid did a really interesting hack where, frustrated by trying to get the Weave Server running, he built his own minimal server. It’s not surprising that he found installation difficult; it’s a complex system, and the latest migration was a real challenge (ironically, we made it harder this time so that it would be easier in the future).
His effort wasn’t enough to be particularly usable outside his own needs – it lacks auth, security, data validation, storage, and a whole host of other things – but it got me to thinking about what our users want locally. We’ve been very careful to open up everything to the user so that they have the ability to do the sort of things we’re doing with the large production cluster. However, some of those decisions, driven by multi-box large-scale needs, will look really weird to someone who just wants to run a weave server for himself and half a dozen friends. It’s overkill.
Thus, I started hacking, and have come up with a super-easy to install minimal weave server that should work fine for a small installation. It’s a full implementation of the storage API, including auth, but setting it up requires just one line in your apache config. There are no options, or even a config file – it simply sets up a SQLite DB in the directory and uses it. Users are added and deleted by a script in the directory.
It’s still a prototype, and I’d love feedback on whether it really was as easy to install and get going with your client as it should be. For now, the tarball is here. Let me know how it works for you.
You’ll need a relatively recent php with sqlite, mbstring and json support, and apache, preferably running ssl. Give it a shot and let me know how it worked for you in the comments.
September 12, 2009 at 1:55 am |
Will ‘–with-pdo-sqlite’ in phpinfo() work? Thanks.
September 14, 2009 at 7:04 pm |
If it’s compiled in, then yes, I believe so.
September 12, 2009 at 12:44 pm |
It is certainly useful for the large number of people who would rather use PHP than Python. Shouldn’t the SQLite DB be protected, either in the Apache config, or by putting it in a directory outside the document_root hierarchy?
One issue I was dealing with is that my server config is nginx + PHP-FastCGI, where implementing URLs that are routed through index.php is trickier than with a straight Apache + mod_php configuration.
September 14, 2009 at 7:13 pm |
>Shouldn’t the SQLite DB be protected
Unless they have a particularly weird Apache layout, it should be. The alias doesn’t require the folder to be in the document root hierarchy, and if it’s just in /weave apache will funnel all requests to the index.php file regardless of what file is requested
I suppose if they put it somewhere different, but still inside the document root file, and exposed all the document root as a tree it might be addressable and you’d want some sort of configuration preventing access. I can’t host it somewhere else in the filesystem because there’s no guarantee that a particular path would be around for me to locate it at other than ‘.’.
September 15, 2009 at 9:42 am |
I had some problems setting it up on Windows (using microapache, Apache 2.x based w/ PHP 5.2).
Both ORIG_PATH_INFO and PATH_INFO were empty strings -> “Function not found” -> I have used REQUEST_URI instead:
—————– index.php [109-118] —————–
$path = ‘/’;
if (!empty($_SERVER['PATH_INFO'])) {
$path = $_SERVER['PATH_INFO'];
}
else if (!empty($_SERVER['ORIG_PATH_INFO'])) {
$path = $_SERVER['ORIG_PATH_INFO'];
}
else if (!empty($_SERVER['REQUEST_URI'])) {
#substr necessary to trim the leading “/weave”
$path = substr($_SERVER['REQUEST_URI'], 6);
}
—————————————————
Moreover, the Alias command did not work as expected:
Alias /weave ../WebRoot/weave_minimal/index.php
correctly redirected the “http://server/weave” request alone, while trying to get, for example, “http://server/weave/0.5/blah/info/collection” gave a 404.
Resolved using
AliasMatch ^/weave.* ../WebRoot/weave_minimal/index.php
instead.
At least now I receive the auth request correctly, will try later the rest.
I’m not sure if they were Windows related rather than microapache related, anyways this was waaaaaay more easier to setup than following the wiki, thanks for your efforts
September 15, 2009 at 9:19 pm |
Minimal server up and running, but sync with 0.6 fails at
/weave/0.5/user/storage/clients/?full=1&sort=index
404 “record not found”.
0.7pre2 syncs, but with lot of errors in the activity log…
I think I’ll try the non-minimal version of the server to see if it can hel identifying the problems.
September 15, 2009 at 9:26 pm |
Is your username ‘user’? That would be the only way the URL you have here makes sense.
It’s trying to find ‘user’s clients collection, so not all that surprising you don’t get anything.
It’s possible you have an old about:config value messed up. I might try resetting all of those, then changing the serverURL one
It could also be that microapache on Windows has it’s own set of quirks, but I don’t really have a lot of insight there.
September 15, 2009 at 10:10 pm |
I put “user” there just to generalize the url, but probably wasn’t a good idea
I tried with different users on different OSes (MAC/WinXP) even on a clean install of firefox 3.5.3 (new install, added 0.6 client, tried to sync with a new user), I can’t sync at all.
microapache AFAIK should be nothing more than a complete Apache build stripped of every extra (plugins and modules), I just added the modules needed for weave (and I’m using it to serve RoundCube too without problems, and it is a rather complex app, too).
I’ll try another web server tomorrow (probably XAMPP and/or WAMP), but for what I could understand (I put some lines of logging code here and there) it is working correctly, it’s the DB that does not contain a collection named ‘storage’, and the 0.6 client does not try to create it during the first sync (I’m not sure that it should, tho).
Complete log here
http://uploading.com/files/a4b3adae/Weave%2BSync.log/
September 15, 2009 at 10:35 pm |
Ah, this is interesting. The problem is that http://emulator/weave/0.5/testuser/storage/clients/?full=1&sort=index should never return “record not found”, which means there’s something wacky about microapache processing urls. Try the following:
Right near the end of line 117 is $path.’//’
Change that to $path.’///’ – I bet it fixes it. Stupid php.
September 16, 2009 at 7:46 am
Nice try, but no luck, the trailing slash does not change anything
Anyways… gotcha
Look at my 1st comment: I get the path from $_SERVER['REQUEST_URI']. I does not work as expected, because I end up having a path containing the query string, too (and I couldn’t compare it with ORIG_PATH_INFO and PATH_INFO).
Replacing REQUEST_URI with SCRIPT_NAME fixes everything.
Don’t blame php or microapache, blame me
And thanks for the support!
October 1, 2009 at 12:34 pm |
Hello,
Thanks for the minimized version. It works nicely, but I’m having problems determining why the user authorization fails. (0.7 client) Is there a way to get some extra debugging out of the script? (Yeah, I’m not a php programmer, so maybe I’m missing something obvious)
The user used is the same as createuser reports having created correctly.
October 1, 2009 at 5:18 pm |
What happens if you try to access the site in your browser? Try
https://%5Bserver%5D/0.5/%5Busername%5D/info/collections
and see if it lets you in or rejects your password. Odds are that there’s a password typo somewhere, though it could be client or server.
October 8, 2009 at 7:01 pm |
Much easier to set up and configure than the full server, the biggest problems I faced was getting all the php bits installed since I’ve never used php before (and had intentionally disabled it on my webserver, such is my loathing of it…)
So, some thoughts:
The README could do with explaining just how you ‘run’ the create_user script – most unix people would expect ./create_user to ‘just work’, rather than needing to invoke /usr/bin/php create_user.
Under debian at least you also need the php5-cli package installed to actually have a /usr/bin/php to run too.
There’s possibly a typo in the URL to fetch the first time to create the db too, I think “collection” should be “collections”?
It doesn’t effect the creation of the db, but it produces a 400 error code which is confusing if you’re trying to debug whether the server is running correctly, if the example was “collections” then you’d get a 200 code and “[]” as the content I believe, which is a bit more of a clue that you’re on the right path.
Might also be worth a mention in the README that if you’re using a self-signed certificate, you’ll need to visit the site in the browser window to add an exception for the certificate, otherwise the add-on will give a less-than-helpful error message. I think that’s mentioned in the wiki somewhere, but I’d forgotton by the time I finally got everything else working, so having it as a step to follow in the README would be good IMO.
Thanks for working on such a useful addon though, I’ve long run a local IMAP server at home to let me read my mail on different machines and clients, and have absolutely longed for an “IMAP for bookmarks” that let me have a local server, this looks like my wishes have finally come true.
January 15, 2010 at 2:02 pm |
after
chown www-data:www-data /path to/weave_minimal
it could create weave_db on debian.
thanks a lot
November 1, 2009 at 11:27 am |
Hi! Thanks for this nice and easy to install server!
I wrote a script that automates the installation process, because I always forget stuff. You can find it here: https://launchpad.net/~felixhummel/+junk/weave_minimal_install_script
Cheers
Felix
March 20, 2010 at 2:52 pm |
Thanks Felix! You’re script saved me a lot of time setting this up on Ubuntu.
June 19, 2010 at 9:27 pm |
Thanks a ton for creating and posting this Felix, the documentation in the readme and this page was very lacking, going through your script I was able to figure out how to get it installed and running successfully.
Thanks again.
October 17, 2010 at 10:10 pm |
You used ‘finger’ in that script. It’s not installed by default on Debian GNU/Linux.
Also, you used a couple of hardcoded file names on /tmp.
If you’re assuming Ubuntu or Debian, see mktemp(1).
November 30, 2010 at 12:40 am |
Launchpad changed its repository URLs. Here’s a new link:
https://code.launchpad.net/~felixhummel/+junk/weave_minimal_install_script
November 17, 2009 at 10:54 pm |
Great work!
maybe remove your weave_db file from the tgz to make it work ?
thanx
November 24, 2009 at 5:47 pm |
Hah. Forgot to delete the db. Fortunately it only contains bogus data, but thanks for the heads-up.
It’s safe to remove, and I’ve gotten it out of the tgz.
November 19, 2009 at 2:53 pm |
Thank you for making a minimal server! I installed the full server previously and am really excited about switching to the minimal. I have run into some problems with this and am unsure what is happening. I followed the instructions and have created a user. I’m pretty sure the user has been created as the create user script complains if I try and create it again. I can’t seem to get my computer running weave to connect (Weave version 1.0b1). I’m getting an error about the username and password not being correct. I even went as far as dumming down the password to 1234 and still no luck. Do you have any suggestions or a way to generate more logging?
Here are some 404 errors I’m seeing in Apache’s access log:
“GET /weave1.0/stevenjv/info/collections HTTP/1.1″ 404 308 “-” “Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5″
“GET /weaveuser/1/stevenjv/node/weave HTTP/1.1″ 404 302 “-” “Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5″
Again, thank you for putting your time and effort into this project.
-JRansomed
November 24, 2009 at 5:35 pm |
Sorry, have been out for a few days.
Looks to me like you need to add a / to your urls in the client. it should be /weave/1.0, not /weave1.0
November 24, 2009 at 8:19 pm
No worries. Certainly no need to apologize.
You are correct. I thought I had tried https://server/weave/ in my client config at some point and it appears I had not. I had https://server/weave. Adding the trailing / fixed the client connection.
Thank you for developing this minimal server. It works great!!! So much easier than setting up the full server. This will make many many people happy. Job well done.
November 26, 2009 at 6:20 am |
Hi Toby,
I just switched over from the full-blown weave server. It seems like the function to change user passwords is not implemented in the minimal server, is that correct?
If so, are there plans to introduce this feature to the minimal server?
Best regards
November 27, 2009 at 5:17 pm |
Yes, it’s not implemented. It’s a question of tradeoff – it complicates things somewhat in that you need to support a new path, meaning more configuration, etc.
I suspect that the best answer is to add a change-password function to the user creation script. I’ll see what I can do there.
November 27, 2009 at 5:33 pm
Version of create_user has been pushed with the ability to change passwords. Just drop in replacement create_user and weave_storage.php files from the tarball.
November 28, 2009 at 7:20 am
Thanks for your fast reaction. The password changing feature is an important addition to the create_user script.
It does however not solve one issue: the user is not able to set a password that the admin does not know of (unless the user is given shell access, which admins might consider inappropriate). I understand the trade off against simplicity, which is what the minimal server aims for, but the added security could make it worthwhile, especially if the additional setup steps remain optional.
November 27, 2009 at 12:19 am |
Thanks a lot!
This server works great, very nice for a home lan.
merci,
xandl
November 27, 2009 at 7:31 pm |
Thanks for the great job!
I’m trying to install the minimal server here, but I need help with this error messages Apache is throwing on me:
[Fri Nov 27 17:00:21 2009] [error] [client 127.0.0.1] PHP Notice: Undefined offset: 4 in /srv/http/weave/index.php on line 117
[Fri Nov 27 17:00:21 2009] [error] [client 127.0.0.1] PHP Notice: Undefined offset: 3 in /srv/http/weave/index.php on line 117
I am able to open a test php page, but the weave url gives me 404 errors.
November 27, 2009 at 7:47 pm |
Hmm. Do you have the latest version? line 117 is a }
I’m guessing that you’re not picking up the path properly. The only way to get a 404 is to not have the /1.0/ in the URL, so either the URL is wrong, or apache isn’t putting the path into PATH_INFO or ORIG_PATH_INFO. You might try adding error_log($path); right before list($version,… which should be right nearby line 117.
Do you get a 404 from https://%5Bserver%5D/1.0/%5Busername%5D/info/collections ?
December 1, 2009 at 10:20 pm |
It was, in fact, an apache/php misconfiguration. Sorry to bother
December 3, 2009 at 12:13 am |
Working neatly here. Thanks to Felix for posting a script to review where I was going wrong. Any chance an official project page can be set up on Google Code or Launchpad?
December 3, 2009 at 12:21 am |
All the code is open source, so you’re welcome to mess with it to your heart’s content. I’m still trying to figure out how best to get the minimal server into our hg repositories in a way that makes logical sense (the full server and documentation for it is available as documented in various other posts on the blog. Contributions are welcome!)
December 4, 2009 at 5:40 am |
i can report that installing latest hg pull weave server according to 1.0 instructions @ https://wiki.mozilla.org/Labs/Weave/Sync/1.0/Setup has gone considerably smoother for me than any other previous releases. i actually have a working weave server now.
December 13, 2009 at 2:22 pm |
Thanks for this!
I have tried previously setting up the ‘full’ Weave server and failed , this was much easier.
Got 2 clients syncing to our internal https server without any real problems.
December 13, 2009 at 2:27 pm |
[...] Got a minimal Weave server running on our HTTPS intranet using Toby Elliott’s Weave Minimal Server blogpost. [...]
December 19, 2009 at 7:53 pm |
Thanks for this. It’s perfect for me, and dead simple to install.
I’m running the server on a dedicated virtual host with no /weave in the path (in the document root). This means that the Alias line suggested in the readme doesn’t work. What does is:
RewriteBase /
RewriteRule ^index.php – [L]
RewriteRule ^(.*) /index.php/$1
It might be worth putting a note about this in the readme.
Also, I appear to need:
php_admin_flag zend.ze1_compatibility_mode Off
to get PDO to work properly.
January 2, 2010 at 8:38 pm |
This is an good Idea but it will not work!
I always get an Error 505 when i open the URL – I’ll try the orginal one
January 4, 2010 at 5:35 pm |
505? Wow. The original one isn’t going to help you there – that’s your server refusing to process the HTTP version coming from the client. Do you have an unusual Apache configuration?
January 13, 2010 at 5:31 pm |
I’m trying to set up this on a shared hosting site that allows no aliases and runs PHP via CGI. I think I got the right rewrite rule but all I get now is an empty 404 error without any message.
January 29, 2010 at 4:47 pm |
[...] worden und wird demnächst intensiver getestet. Das Plugin habe ich schonmal installiert und ein Minimalserver ist auch schon [...]
January 29, 2010 at 5:03 pm |
Had a small problem that took me a bit to figure out… When I went to the “1.0/username/info/collections” url, i was asked it I wanted to open or download the file “collections” I opened it in a text editor, and it was an error:
Uncaught exception ‘PDOException’ with message ‘could not find driver’ …
my phpinfo() says I have PDO sqlite2 (not sqlite) so I changed the line the error pointed at (weave_storage.php:60) to:
$this->_dbh = new PDO(‘sqlite2:’ . $db_name);
and poof it works!
January 29, 2010 at 9:37 pm |
I had to browbeat my Ubuntu server into installing php5-sqlite, but once I got THAT done, the thing works perfectly so far!
January 31, 2010 at 2:51 pm |
Hmz, same Problem. I’m a honk!
January 30, 2010 at 11:40 am |
After much frustration with mozillas weave server i wanted to implement one myself.
Thanks for sparing me the work. Yours works flawlessly.
January 30, 2010 at 10:06 pm |
My first thought was: Does it fit onto a OpenWRT/DD-WRT/Tomato-Router with e.g. 8 MB flash and 32 MB RAM while running all the other services a router has to provide? My router has an USB port with a high capacity USB stick.
Such a thing would be perfect for LAN. E. g. I want to have synchronized Bookmarks but no usage statistics and such. This could better be done on a powerful Desktop machine and when I decide to delete or move bookmarks I will use them more or less in the future.
And really I don’t trust anyone saying that my bookmarks and usage statistics are secure on the internet – there’s almost no more valuable data than this and attacks are likely.
February 1, 2010 at 5:53 pm |
It probably fits for a small group. The codebase is tiny, and the average user uses somewhere around 1MB worth of encrypted data.
January 31, 2010 at 9:22 am |
Hello and thank you for that minimal server as I was a bit frightened by the real one
However, it seems that I can’t make it work : I am using lighttpd as web server so that may be the cause.
I installed it, went to the url you recommanded, entered the bogus login informations, but then firefox tells me that it can’t find the file at https://aries/weave/index.php/1.0/blah/info/collection and then I can see that the sqlite base is not created.
January 31, 2010 at 10:45 am |
It works on lighttpd as well. I tried on Debian Etch and used the following alias rule:
$HTTP["host"] == “weave.mydomain.com” {
alias.url = (“/weave” => “/path/to/your/weave_minimal/index.php”)
}
Be sure to have your weave_minimal directory writeable by www-data (of course also for apache).
Yesterday I spent 2 hours trying to set up the overkill real weave-server. Today it took me 5 minutes to set up this one! Big thanks!
February 1, 2010 at 8:58 pm |
Thanks ! That is what I did and actually it was better than before, yet I have no weave_db file created :/
I have the auth screen, I enter the bogus info as said in the README. The browser then tells me that I have an application/json file to download. The content of the file is “Database unavailable”.
The rights are 777 on the folder in order to make sure this is not this kind of problem.
In the log file, I have the following errors in the log file :
192.168.0.4 weave.domain – [01/Feb/2010:21:54:39 +0100] “GET /weave/1.0/blah/info/collection HTTP/1.1″ 401 11 “-” “Links (2.2; Linux 2.6.29.6-desktop-3mnb i686; 157×58)”
192.168.0.4 weave.domain – [01/Feb/2010:21:54:39 +0100] “GET /weave/1.0/blah/info/collection HTTP/1.0″ 401 1 “-” “Links (2.2; Linux 2.6.29.6-desktop-3mnb i686; 157×58)”
192.168.0.4 weave.domain – [01/Feb/2010:21:54:46 +0100] “GET /weave/1.0/blah/info/collection HTTP/1.0″ 503 22 “-” “Links (2.2; Linux 2.6.29.6-desktop-3mnb i686; 157×58)”
If anyone has an idea …
November 4, 2010 at 12:15 pm
Yep, I update my php, and after I have same problem. Some errors on line 117, 503 in log, and no sync working …
November 19, 2010 at 1:29 pm
yes going from php 5.1 -> 5.3 has also showstopped minimal server for me. only visible error is the line 117 offset notice. proceeding to debug..
November 19, 2010 at 2:11 pm
ok mine was simple, i had emerged dev-lang/php with USE=sqlite instead of sqlite3. re-emerging with sqlite3 fixed it.
December 1, 2010 at 10:52 am
Confirm, USE +sqlite3 is solution
March 1, 2011 at 10:04 pm
Riiiiight – this did it for me, too!
Thank you!
January 31, 2010 at 2:18 pm |
falls man keinen Zugriff auf die Apache Config hat und mod_rewrite aktiv ist reicht eine .htaccess mit folgendem Inhalt:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !^.*index\.php$ [NC]
RewriteRule ^(.+)$ index.php/$1 [L]
February 1, 2010 at 3:46 pm |
A better instruction is necessary! I am pretty new to apache2 and mod php. How do i Find ot if my php version is sufficient, the suggested line does not work for my site. I get the field to insert the password but the db is not created. the user and permissions of the weave directory are set right.
78.xx.1xx.11 – blah [01/Feb/2010:16:33:50 +0100] “GET /weave/1.0/blah/info/collection HTTP/1.1″ 404 20 “-” “Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091216 Iceweasel/3.5.6 (like Firefox/3.5.6; Debian-3.5.6-1)”
is all i get. so how do i debug this script?
February 1, 2010 at 5:40 pm |
You aren’t at the debug stage – the log is showing a 404, which means it doesn’t like your Apache alias and you aren’t pointing to the file at all. Check that part and make sure that your file paths are all correct.
February 1, 2010 at 5:09 pm |
[...] eigenen Server aufzusetzen. Wenn man einen eigenen Server aufsetzten möchte wird empfohlen den minimalen Server zu verwenden. Der minimale Server bietet alle grundlegenden Funktionen und ist viel einfacher [...]
February 1, 2010 at 7:51 pm |
One question regarding security: If everything in the minimal_server is lost to a hacker, is it safe to assume that one still has nothing to worry about, provided your passwords are secure?
For example, I’m not an apache guru, but I’d like to set this up. If I do, and mess something up, (for example leaving my database world readable), do I have anything to worry about?
Thanks a lot!
February 1, 2010 at 8:01 pm |
Just as with the normal server, all your data is stored encrypted. You need the passphrase (which you set up in the client and never leaves the client) in order to decrypt it.
February 3, 2010 at 12:40 pm |
[...] es Mozilla mittlerweile auch macht empfehle ich aber den “kleinen Bruder”, den Weave Minimal Server. Die Installation hierbei ist in ein paar Minuten [...]
February 6, 2010 at 9:02 am |
[...] Weave Minimal Installation [...]
February 6, 2010 at 2:35 pm |
Hi,
I just installed weave_minimal on a mini-server running lighttpd/php. Userbase is max. 3-4 ppls concurrent thus the minimal version seems to be clearly the way to go, esp. as I dont wanna run mysql there (huge overkill).
Installation was smooth, as I had php/pdp-sqlite already in place for the rest of the webpage. Basic functionality works.
However I have a few questions:
1) Will this minimal version be maintained over coming releases of weave e.g. 1.1 through 1.5?
2) Is there any docu for it? As of what features work and which not?
3) Any more development planned? I think this version is all most people need.
Oh, and I noticed a few small things not working. Not sure if it is simply unimplemented features. One is the password change, that gives always an error – only works with the included script.
February 8, 2010 at 5:34 pm |
1) Yes, certainly
2) It’s a full implementation of the sync API (https://wiki.mozilla.org/Labs/Weave/Sync/1.0/API), and all features should work or it’s a bug. It does not implement the registration API (https://wiki.mozilla.org/Labs/Weave/User/1.0/API), which is why there’s the additional script to manage users (and why the password change doesn’t work)
3) We’ll keep it up to date, but further development would probably move it away from the ‘Minimal’ label
February 8, 2010 at 3:29 am |
Hi Toby,
Much obliged for the minimal-server code. I followed you over from the Ars Technica thread. Some suggestions for your README to help those web admins just a tad more:
1. Note that the weave dir, on the filesystem, has to be writable by the Apache process in order for the SQLite database to instantiate. Otherwise, the second auth screen never appears, which is an indicator that the dir ownership isn’t set up correctly.
2. The create_user script is run using php at the command-line, not invoked through the web. (This gave me pause for a few minutes.)
3. I know this is silly, but yes, you need to use Firefox when running through the initial scripts. Safari doesn’t work; it just tries to download the last string in the path
Looking forward to a slightly more streamlined release, if you have time. Again, much obliged!
February 8, 2010 at 5:35 pm |
Thanks for the notes. I’ll get them incorporated.
February 8, 2010 at 8:34 am |
[...] χρήσιμα links: – Weave Minimal Server – Weave Developer Resources – Search and display all sync data, with export to text, JSON, or XML. [...]
February 9, 2010 at 9:40 pm |
@jan and maybe others:
I had problems creating the DB
On Ubuntu I installed sqlite and php-sqlite, restarted apache and DB created
Not sure which worked or if you need both
apt-get install sqlite php5-sqlite
All the best
Onion
February 9, 2010 at 9:44 pm |
And then php5-cli to be able to run the create_user
php create_user
February 9, 2010 at 9:48 pm
You should probably note what version of Ubuntu you’re using, as well. (This will also help those using Debian.)
February 10, 2010 at 5:01 pm
Its ubuntu, desktop, 9.10
February 12, 2010 at 6:10 am |
[...] through my own server was not an easy job. But with weave I was able to setup the weave server (Weave Minimal Server) on my box in less than 15 minutes (yeah it was that easy). Now I can sync even my firefox [...]
February 12, 2010 at 10:54 pm |
Hi!
I am trying this on a OpenBSD Box. Unfortunately I cannot log-in successfully. The verbose log shows the following:
2010-02-12 23:08:46 Service.Main INFO Logging in user nonpolar
2010-02-12 23:08:46 Net.Resource DEBUG GET fail 401 https://my.server.here/weave/1.0/nonpolar/info/collections
2010-02-12 23:08:46 Service.Main DEBUG Finding cluster for user nonpolar
2010-02-12 23:08:46 Net.Resource DEBUG GET fail 404 https://my.server.here/weave/user/1/nonpolar/node/weave
2010-02-12 23:08:46 Service.Main DEBUG Using serverURL as data cluster (multi-cluster support disabled)
2010-02-12 23:08:46 Service.Main DEBUG cluster value = https://my.server.here/weave/
2010-02-12 23:08:46 Service.Main DEBUG Exception: Login failed: error.login.reason.password No traceback available
2010-02-12 23:09:03 Service.Main DEBUG Caching URLs under storage user base: https://my.server.here/weave/1.0/nonpolar/
The Apache error log states that the access to /htdocs/user etc. is forbidden. I am wondering why this path is accessed?
Regards,
nonpolar
February 12, 2010 at 10:58 pm |
The 404 is correct – if the client gets a 404 there, then it defaults to the current url.
The 401 in the previous line is the problem – the client is unable to authenticate with the server. Did you create an account?
February 13, 2010 at 5:20 am
Toby, I’m having the same issue:
GET fail 401 http://weave.example.com/1.0/myusername/info/collections
But when I go to the address in Firefox, I am prompted to login over and over and over again. When I view the database in the SQlite Manager Firefox extension, it looks like my “create_user” script worked and added myusername and md5ed password to the database. Any ideas? I’m using mod_rewrite:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !^.*index\.php$ [NC]
RewriteRule ^(.+)$ index.php\/$1 [L]
since I don’t have permissions to change my Apache config.
February 12, 2010 at 11:05 pm |
Yes I created an account. Hmmm. Maybe this is a configuration issue. OpenBSD Apache is running chrooted. Could be a problem with the Alias.
Is there a possibility to point to the index.php script using a directory directive instead of an alias?
February 12, 2010 at 11:07 pm |
I haven’t found a directory method that doesn’t cause all sorts of security problems.
February 13, 2010 at 5:44 am |
Basic question: does minimal weave require WebDAV in order to function? I have been trying to get it working but I can’t even authenticate with the weave extension or just plain Firefox
February 15, 2010 at 10:22 pm |
No. In fact, it’s likely that having DAV enabled will cause problems for Weave.
February 17, 2010 at 7:23 pm |
[...] Weave nun auch als Server verfügbar. Wer es gerne einfach hat, installiert sich einfach den Weave Minimal-Server. You’ll need a relatively recent php with sqlite, mbstring and json support, and apache, [...]
February 23, 2010 at 4:57 pm |
Can this be done without the Apache alias? I know a lot of folks would like to run this off of their Dreamhost accounts. If you just “ln -s weave_minimal weave” or even “mv weave_minimal weave” you still get 404′s for http://mysite.com/weave/1.0/blah/info/collection. I’m not a web developer so I’m not sure what the subtleties of the alias command are in Apache. Is there a hack that will have the same effect?
Thanks!
February 23, 2010 at 11:38 pm |
Ugh. I figured it out finally. Weave minimal_server now runs on a Dreamhost account. I’m not a web programmer so I my solution may be poor. In fact it is. I’m running it using http. Call me a rebel or a fool. I’ve set my preferences up so that I sync bookmarks and preferences. They aren’t a big security issue. I wouldn’t recommend doing this if you are syncing passwords. If you are doing this don’t re-use an important password for the weave server either.
For those who want to use Dreamhost, here’s how it can be done for the minimal server 1.0.
ln -s weave_minimal weave
cd weave
set .htaccess to have the following lines:
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) – [E=REMOTE_USER:%1]
RewriteCond %{REQUEST_FILENAME} !^.*index\.php$ [NC]
RewriteRule ^(.+)$ index.php?`\/$1 [L]
Edit index.php:
after line 85:
else if (array_key_exists(‘REDIRECT_REMOTE_USER’, $_SERVER))
$auth_str = $_SERVER['REDIRECT_REMOTE_USER'];
alter line 117:
list($base, $version, $username, $function, $collection, $id) = explode(‘/’, $path.’//’);
Two issues are handled here: Dreamhost doesn’t run mod_php and Toby’s FastCGI hacks didn’t work there either; Dreamhost users can’t change the Apache config to use an alias. The altered index.php line and the ln command handle the fact that I can’t add an Apache alias line to the config. You could forgo those two bits and run weave straight out of your http://myweave.com/ directory, but I wanted to be able to install other weave servers later and cleanly switch between them.
I’m using FastCGI, PHP5 and have nothing else on the domain. The rest of the instructions are as Toby says.
Thanks for the airing of problems here, they helped a bit in figuring this out.
February 24, 2010 at 1:35 am |
Hmm, by runs I guess I mean the clients successfully connect. I’ve had several machines connect and upload their data. None seem to download any merged results. The database just gets bigger. Back to debugging.
February 24, 2010 at 11:11 pm |
Hi -
Finally gotten minimal weave to setup within 20 minutes of fiddling.
A few notes I would like to point out that others have already done that would make someone who setup minimal weave for the first time.
1. The directory where you install minimal weave should have write permission to the user running the apache process. For Ubuntu, it’s www-data. So you would “sudo chown www-data.www-data /var/www/minimal_weave”.
2. “alias /weave /index.php” in apache config file which pointed out in the README. Notice the file “index.php” to the alias.This is contrary to what most web admins have been configuring on their apache where “alias /directory /var/www/domain” points to a directory. This is very important because if you don’t have the alias path point to the index.php file, you will get a 404 error.
3. There are requirements that you would need to make this work. Minimal weave uses SQLite database. You will need to apt-get install php5-sqlite to meet the software requirement. php5-cli is also required.
4. The path https://server/weave/1.0/blah/info/collections looks flunky. The 1.0/blah/info/collections is not an actual path on your server. It’s an internal minimal weave data path in the database or file. As long as you have https://server/weave/ in your URL, you should get an error message beside 404 because https://server/weave/ is the index.php file.
5. To create new user you would use the create_user script. Just type “php create_user” in shell. It will prompt you whether you want to create, delete, or change password.
6. When configuring your Firefox weave add-on on the client, for server url, you need to enter https://server/weave/ (Don’t forget the trailing slash!).
Weave is pretty cool once you have it setup.
March 5, 2010 at 2:42 am |
Hi,
just wanted to say thanks for this nice piece of software.
Burnstreet
March 6, 2010 at 11:47 am |
Hi, and thanks for making this software.
I have some issues syncing though (Debian + Apache).
In firefox, I seem to be able to log in correctly.
However, when I hit “Sync Now” (e.g. in the Weave menu in the lower right corner), I can see the following from the “Activity Log” (replaced the real hostname and user with SERVERURL and USER, and I run apache at port 942):
2010-03-06 12:34:07 Service.Main INFO Logs reinitialized for service reset
2010-03-06 12:34:07 Engine.Clients DEBUG Resetting clients last sync time
2010-03-06 12:34:07 Store.Clients.Store DEBUG Wiping local clients store
2010-03-06 12:34:07 Store.Clients.Store DEBUG Setting client !_!f8_fyng: {“name”:”eystein’s Firefox on chief”,”type”:”desktop”}
2010-03-06 12:34:07 Engine.Bookmarks DEBUG Resetting bookmarks last sync time
2010-03-06 12:34:07 Engine.Forms DEBUG Resetting forms last sync time
2010-03-06 12:34:07 Engine.History DEBUG Resetting history last sync time
2010-03-06 12:34:07 Engine.Passwords DEBUG Resetting passwords last sync time
2010-03-06 12:34:07 Engine.Prefs DEBUG Resetting prefs last sync time
2010-03-06 12:34:07 Engine.Tabs DEBUG Resetting tabs last sync time
2010-03-06 12:34:07 Service.Main DEBUG Uploading new metadata record from freshStart
2010-03-06 12:34:07 Service.Main DEBUG Setting meta payload storage version to 1.0.1
2010-03-06 12:34:07 Net.Resource DEBUG PUT Length: 84
2010-03-06 12:34:07 Net.Resource DEBUG PUT fail 400 https://SERVERURL:942/weave/1.0/USERNAME/storage/meta/global
2010-03-06 12:34:07 Service.Main CONFIG Starting backoff, next sync at:Sat Mar 06 2010 14:04:58 GMT+0100 (CET)
2010-03-06 12:34:07 Service.Main DEBUG Exception:
400 Bad Request
Bad Request
Your browser sent a request that this server could not understand.
Apache/2.2.9 (Debian) DAV/2 PHP/5.2.6-1+lenny6 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g Server at SERVERURL Port 942
No traceback available
Help on this one please?
March 8, 2010 at 5:25 pm |
Try turning off WebDAV. I suspect that’s intercepting the PUT
March 8, 2010 at 1:01 pm |
[...] es Mozilla mittlerweile auch macht empfehle ich aber den “kleinen Bruder”, den Weave Minimal Server. Die Installation hierbei ist in ein paar Minuten [...]
April 5, 2010 at 8:52 am |
I had one of this dirty cheap webhosting with php5, mysql, and ssl self signing. (Jomla, and phpBB3 or Typo3 works fin on it)
Could i get it work on it?
April 12, 2010 at 10:47 pm |
Thank you for this server. Just installed it and it works flawlessly (once I had installed the php5-sqlite ubuntu package
April 14, 2010 at 4:38 pm |
here is a small patch to make minimal server work with Postgres. I should probably work with Mysql, just change the DSN in weave_storage.php with your mysql data.
http://pastebin.com/Up7LZk9P
It is working great for me. Thanks Toby.
April 16, 2010 at 10:10 am |
I just updated this postgres patch. There was a small error.
http://pastebin.com/6fBTYY6Q
April 16, 2010 at 10:12 am |
Here is a new version of this patch. There was a small error with transactions.
http://pastebin.com/6fBTYY6Q
April 22, 2010 at 6:01 pm |
is the minimal server code compatible with weave sync 1.2 client?
April 22, 2010 at 6:03 pm |
Should be, yes.
Toby
April 22, 2010 at 6:04 pm |
I’m using it. Have been since 1.2 auto-updated. Works fine for me.
April 28, 2010 at 10:02 am |
Here’s a possible fix to make this work with the standard URI mechanism in $_SERVER (including lighttpd, apache, etc.):
— index.php 2009-11-11 11:11:29.000000000 -0800
+++ index.php.fixed 2010-04-28 03:00:02.000000000 -0700
@@ -112,6 +112,10 @@
}
else if (!empty($_SERVER['ORIG_PATH_INFO'])) {
$path = $_SERVER['ORIG_PATH_INFO'];
+ } else {
+ // Aaron’s fix
+ // Path is in $_SERVER['REQUEST_URI']
+ $path = substr($_SERVER['REQUEST_URI'], strlen($_SERVER['PHP_SELF']));
}
$path = substr($path, 1); #chop the lead slash
list($version, $username, $function, $collection, $id) = explode(‘/’, $path.’//’);
May 4, 2010 at 3:18 pm |
Hi,
just tried to set it up under Windows 7 + XAMPP.
But i always get an “invalid user or password” error in client (v1.2.3)
Here’s what I did:
1. copied all content of tgz file to xampp/htdocs/weave_minimal directory
2. set up alias in httpd.conf
3. called https://localhost/weave/1.0/blah/info/collection to create DB
4. ran: php create_user -> c,user:user,pass:pass
5. set up client – tried http and https (https://localhost/weave)
any suggestions how to figure out the prob?
ty
Helge
May 4, 2010 at 6:27 pm |
Hmm, it’s Windows, so I’m of minimal help. Anything in the error logs?
May 5, 2010 at 12:58 pm |
well here’s what i got – cleared log and redid…
ssl_requestlog:
[05/May/2010:14:50:06 +0200] ::1 TLSv1 DHE-RSA-AES256-SHA “GET /weave/1.0/blah/info/collection HTTP/1.1″ 1
[05/May/2010:14:50:11 +0200] ::1 TLSv1 DHE-RSA-AES256-SHA “GET /weave/1.0/blah/info/collection HTTP/1.1″ 23
[05/May/2010:14:51:41 +0200] ::1 TLSv1 DHE-RSA-AES256-SHA “GET /weave1.0/fcpp/info/collections HTTP/1.1″ 1284
[05/May/2010:14:51:41 +0200] ::1 TLSv1 DHE-RSA-AES256-SHA “GET /weaveuser/1.0/fcpp/node/weave HTTP/1.1″ 1284
access.log:
::1 – - [05/May/2010:14:50:06 +0200] “GET /weave/1.0/blah/info/collection HTTP/1.1″ 401 1 “-” “Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)”
::1 – blah [05/May/2010:14:50:11 +0200] “GET /weave/1.0/blah/info/collection HTTP/1.1″ 401 23 “-” “Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)”
::1 – - [05/May/2010:14:51:41 +0200] “GET /weave1.0/fcpp/info/collections HTTP/1.1″ 404 1284 “-” “Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)”
::1 – - [05/May/2010:14:51:41 +0200] “GET /weaveuser/1.0/fcpp/node/weave HTTP/1.1″ 404 1284 “-” “Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)”
error.log:
[Wed May 05 14:49:21 2010] [notice] Digest: generating secret for digest authentication …
[Wed May 05 14:49:21 2010] [notice] Digest: done
[Wed May 05 14:49:22 2010] [notice] Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0 configured — resuming normal operations
[Wed May 05 14:49:22 2010] [notice] Server built: Jul 22 2009 11:35:54
[Wed May 05 14:49:22 2010] [notice] Parent: Created child process 11048
[Wed May 05 14:49:23 2010] [notice] Digest: generating secret for digest authentication …
[Wed May 05 14:49:23 2010] [notice] Digest: done
[Wed May 05 14:49:24 2010] [notice] Child 11048: Child process is running
[Wed May 05 14:49:24 2010] [notice] Child 11048: Acquired the start mutex.
[Wed May 05 14:49:24 2010] [notice] Child 11048: Starting 150 worker threads.
[Wed May 05 14:49:24 2010] [notice] Child 11048: Starting thread to listen on port 443.
[Wed May 05 14:49:24 2010] [notice] Child 11048: Starting thread to listen on port 443.
[Wed May 05 14:49:24 2010] [notice] Child 11048: Starting thread to listen on port 80.
[Wed May 05 14:49:24 2010] [notice] Child 11048: Starting thread to listen on port 80.
[Wed May 05 14:51:41 2010] [error] [client ::1] File does not exist: D:/xampp/htdocs/weave1.0
[Wed May 05 14:51:41 2010] [error] [client ::1] File does not exist: D:/xampp/htdocs/weaveuser
well anyway – i foun something strange:
I also deleted the weave_db before i redid.
but when I wanted to create the user I got an error about the name not beeing unique.
I could delete the old user and then create the new
Shouldn’t deleting the weave_db clear out all users?
perhaps it writes the db to a wrong place on my HD?
May 7, 2010 at 6:32 pm |
isn’t there a slash missing?
[05/May/2010:14:51:41 +0200] ::1 TLSv1 DHE-RSA-AES256-SHA “GET /weave1.0/fcpp/info/collections HTTP/1.1″ 1284
[05/May/2010:14:51:41 +0200] ::1 TLSv1 DHE-RSA-AES256-SHA “GET /weaveuser/1.0/fcpp/node/weave HTTP/1.1″ 1284
[Wed May 05 14:51:41 2010] [error] [client ::1] File does not exist: D:/xampp/htdocs/weave1.0
[Wed May 05 14:51:41 2010] [error] [client ::1] File does not exist: D:/xampp/htdocs/weaveuser
when i remeber the full server there were alias-”folders” 1.0 and user
but above it tries to connect to htdocs/weaveuser instead of htdocs/weave/user and htdocs/weave1.0 istead of weave/1.0,…
if that could be the reason – how can i fix it?
May 8, 2010 at 3:29 pm |
Hi,
Thank you, exactly what I was looking for. Got it up and working within 5 minutes
Niki
May 19, 2010 at 7:30 pm |
Hi,
I feel so stupid.
Am I the only one that gets a 403 instead of a login prompt under apache 2.2 on a xp box?
Apache says
[Wed May 19 21:19:23 2010] [error] [client ] client denied by server configuration: E:/xampp/weave_minimal/index.php (which is the correct path)
I followed the README instructions several times but I can’t find my fault. The above shown directory is fully accessible for everyone (but it’s not in my htdocs…I figure it doesn’t have to)..
Any help is greatly appreciated
Regards
Umbi
May 19, 2010 at 7:51 pm |
Ok, update
I get the auth windows but it does not create the weave_db file
When I run the create_user script anyway the weave_db file is created.
But when I try to connect with the weave client (FF addon weave_sync 1.2.3) I keep getting
DEBUG GET fail 503 https://weave/1.0/umberto/storage/meta/global
for every contact to the server…
Any help is still greatly appreciated
Regards
Umbi
May 26, 2010 at 2:46 pm |
Great Script
GOt it up and running. One question – is it not possible for users to change their password? I geat an error when trying this from within the client.
BR
Juergenmw
June 1, 2010 at 5:20 pm |
Yes, the minimal client does not support any of the weave-auth functions (creating accounts, changing emails, passwords, etc). There’s a script along with the server that will let you create, delete and change passwords.
May 31, 2010 at 11:08 am |
[...] die sich nicht die Mühe machen wollen und die keine Lust auf Verzweiflung haben, gibt es den Weave Minimal Server. Aber nochmal, ein eigenener Weave-Server ist IMHO nur eine Sache für die Leute, die einen [...]
June 2, 2010 at 2:30 pm |
I Tried to install it on an Ubuntu 8.04 Server. I can create the database, but Firefox Sync 1.0 says: “Please enter a valid server URL” when i try to configure the Addon. Any Ideas?
June 9, 2010 at 1:11 am |
Hey x2on.
I had the same problem. When setting up the new sync account choose:” I already set up a computer” This way you won’t get the message “Enter a valid server URL” and can sync right away.
June 3, 2010 at 11:23 am |
[...] Theoretisch bräuchten wir dazu den Mozilla Weave Server aber jeder der sich dem Ding einmal angenähert hat, der weiß, dass es nicht ganz einfach ist, dass Teil zum laufen zu bekommen. Eine Alternative dazu ist eine abgewandelte minimale Form davon, mit der wie hier arbeiten werden, nämlich der Weave Minimal Server. [...]
June 8, 2010 at 10:03 pm |
Hi, I have problems to extract the “.tgz”. – Could you upload / send me a “.zip” file? Thanks ahead.
June 9, 2010 at 1:18 am |
Here you go
http://rapidshare.com/files/396881124/weave_minimal.zip.html
June 9, 2010 at 9:49 pm |
great!
June 11, 2010 at 2:45 am |
Worked very well for me,
thanks for this pice of software
June 11, 2010 at 5:59 pm |
[...] Weave is a big complex thing, so one Mozilla guy – Toby Elliott – has even created a minimal Weave server implementation which is a tiny little thing you can run on just about any web server which provides enough [...]
June 12, 2010 at 4:13 pm |
Hi tobyelliot,
after running weave minimal server on my own machine.
There i startet with a very first version (of minimal server and of mozilla weave).
I always upgradet both versions, and everything workted fine.
Now I wanted to add a new user to this Host / DB.
There the Problem began,
I klicked “never used firefox sync” then
entered “custom server” and the url (something like https://www.domain.de/weave/)
After some secounds the Plugin shows the message, “please enter a valid server-url”
if i click “i’ve already used firefox sync” and enter the exact same url,
everything is just fine.
Is this a problem of my config / the plugin / or minimal server ?
Asking for help
Balu
September 8, 2010 at 2:18 pm |
fixed the problem,
was some file-right strugle
(error_log didn’t worke in my installation so i havent seen error output)
took long time to find this
June 14, 2010 at 10:37 pm |
Hi again,
I’m trying to migrate my weave minimal server installation to another host.
Simply changing sync urls in about:config didn’t work.
I then noticed that there where many ‘servername’ references in the db, so I tried with a massive sqlite update (search&replace oldservername -> newservername).
I keep getting
GET fail 301 http://OLDSERVERNAME/weave/1.0/USERNAME/storage/keys/privkey
Could not get private key
Couldn’t download keys from server, aborting sync
PubKey HTTP status: 200
PrivKey HTTP status: 301
Did I forgot to overwrite some setting somewhere?
Thanks in advance
June 14, 2010 at 11:18 pm |
By the way, that’s the only url in the logs that refers to the old server, the others are all 200 OK, i.e.:
GET success 200 http://NEWSERVERNAME/weave/1.0/USERNAME/info/collections
GET success 200 http://NEWSERVERNAME/weave/1.0/USERNAME/storage/keys/pubkey
It seems to connect and login correctly, but does not sync anything because it can’t download the private key.
June 17, 2010 at 6:52 am |
Thanks for this minimal server, it works
fotr all users who use mod_fcgid with suexec:
you need to configure mod_fcgid to pass the Header “Authorization” from browser to php:
Simply add a second line after or before your “Alias weave/ ….” to your VHOSt configuration file:
Passheader Authorization
Cheers,
Torben
June 17, 2010 at 11:31 am |
Hello tobyelliot
I want to thank you for this easy to install minimal weave server.
I am using it on Mac OS X Server 10.6.4. I even used Apples Server Admin GUI to add the alias. So I not even had to use a text editor to change the Apache config
That’s really easy!
Like someone before already said, it would be nice to mention in the README that the create_user script uses php and has to be run at the command-line as /usr/bin/php create_user.
And some words to the access rights and file and folder permissions will make the minimal weave server experience even more smother than it already is
Thanks
Tom
June 19, 2010 at 10:50 am |
[...] minimal server download minimal server blog sync server api [...]
June 27, 2010 at 12:37 am |
Hello.
I just reinstalled weave_minimal on my new server.
Everything went fine.
But when i entered my ServerData into FirefocSync 1.3.1 I wasn’t asked for a secret passphrase.
When I looked into the saved passwords entry for sync/weave, only foo was entered. After deleting the passphrase-entry, firefox still synched fine.
Did they cancel the user-data encryption or is this a bug in weave minimal server?
Your’s sincerely
Sebastian
June 27, 2010 at 12:45 am |
I just found the solution myself. You can change the secret passphrase afterwards, via the firefox-sync advanced settings.
Greetings
June 28, 2010 at 8:04 pm |
Thanks for this piece of software, works great so far – but migrating the db from one host to another is a thing that should be really improved, or better said: be supported in future releases. Creating a new database when hostname changes is annoying.
Greetings
July 4, 2010 at 8:38 pm |
This awesome dude from Denmark found a solution to use weave minimal server on NGINX: http://superhack.dk/2010/3/2/got-mozilla-weave-working-with-nginx
Took me hours of try-on-error and googling to stumble upon this genius blog entry.
July 5, 2010 at 5:52 am |
worked great, thanks!
July 17, 2010 at 11:05 am |
Thank you for your effort to create a weave minimal server.
July 28, 2010 at 7:45 am |
When i try to create a user i get the following error
create_user:SQLSTATE[HY000]: General error: 8 attempt to write a readonly database
Shoud i have to change the permissions of weave_db ?
Now the permissions are: 644
July 28, 2010 at 2:17 pm |
Solved.
I didn’t use sudo to create user
July 28, 2010 at 4:30 pm
Hmm, usually it doesn’t require it, but it’s possible that the permissions things are running under may be a little different in your setup. Glad you found a workaround, though.
August 21, 2010 at 11:18 am |
Hi, and thanks for all your efforts on the minimal server!
I’d like to learn whether the recommended way to get it is by checking out from hg, or grabbing the tarball. I see constant changes to the hg repository; are these minor bug fixes, and is the hg version considered stable?
August 23, 2010 at 4:47 pm |
The tarball is the last version that’s been fully tested. Every once in a while we may incorporate fixes from the main branch, but those are at-your-own-risk until we roll a new version.
August 24, 2010 at 8:04 pm |
[...] ► http://www.data-travelers.de/2010/06…nc-server.html ► http://tobyelliott.wordpress.com/200…inimal-server/ Mit Weave Sync liessen sich auch Erweiterungen wie zB Xmarks ersetzen. App-Tabs sind eine [...]
August 26, 2010 at 11:40 pm |
I have modified the storage backend code to work with ADOdb. For now it’s only tested with MySQL. Please read the included instructions.
I hope you like it and as usually all comments and suggestions are very welcomed.
Download: http://www.downit.de/854168
Bye
Rene
September 8, 2010 at 2:15 pm |
OH
looks realy nice,
i would like if the “weave_storage_adodb.php” would move into the normal weave minimal server.
works greate for me
August 28, 2010 at 9:59 am |
greetings
in FF4 Beta 4 it’s not possible for me to configure the server on the client.
When i enter https://$FQDN/weave/ in the Server textbox, it complains about a invalid server url.
Changing the Url in the about.config will be reverted as soon as i enter the sync dialog back to the default mozilla url.
any ideas?
August 28, 2010 at 10:10 am |
update: and i always get an 404 when accessing the url with my browser
September 10, 2010 at 4:32 am |
I’m having the same problem, I’ve file a bug at https://bugzilla.mozilla.org/show_bug.cgi?id=595072 .
August 30, 2010 at 8:27 am |
[...] Pero problema es que (como no podía ser de otro modo con Mozilla) el servidor es una tortura instalarlo. Por eso un usuario ha creado una versión mínima que reemplaza MySQL por SQLite y requiere poco más que descomprimir un archivo y añadir una configuración al servidor web (ya sea Apache, Nginx o Lighttpd). El código fuente con las explicaciones puede descargarse desde la página del autor. [...]
September 8, 2010 at 4:45 pm |
Please update this guide to get work with FF4 and make more clear on official Sync website that users can to set up own servers. I reach this page after a lot of searching.
September 20, 2010 at 2:37 pm |
Firefox Home (1.0.2) for iPhone now supports the use of private Sync Servers.
If I try to connect to my Weave Minimal Server I get a “User not found” Error message.
The log shows something like this:
GET /weave/user/1.0/name/node/weave HTTP/1.1″ 404 20
In contrast the access from an FF Sync Client looks i.e. like this: GET /weave/1.0/name/info/collections, where “name” is the users login name.
So it seems, the FF Home Client uses /weave/user/1.0/ and the FF Sync Client uses /weave/1.0/ as access URL.
Any ideas to get the Fireox Home App working together with Waeve Minimal Server?
September 20, 2010 at 4:43 pm |
The 404 is the correct response there. It should then treat the current server as the sync server and use the /weave/1.0 url. If that’s not working, it’s possible that there’s a problem with the FF Home client, or possibly there’s some other issue, but the server behaviors you describe above are correct.
September 21, 2010 at 9:50 am |
I have the exact same issue here.
Let me know, if you found a solution for this.
And it is not only an issue with the minimal server… I tried this (http://blog.strubbl.de/weave-sync-und-reg-server-setup-unter-debian-lenny/) setup… didn’t work either
Regards,
Thomas
September 21, 2010 at 6:03 pm
Oups,
I should have pressed reply here… Anyway, find my comment below.
By the way: Nice setup tutorial you found there Thomas! Maybe I’ll re-setup my server some time with a more current version using this guide. Looks like it will be fully compatible with the registration interface…
October 12, 2010 at 9:11 pm |
I filed an issue in the Mozilla support forum
https://support.mozilla.com/en-US/questions/758124#answer-109938
we could track the specific FFHome issue there.
September 21, 2010 at 5:57 pm |
Hey Guys,
I’m facing the same problem here. I also have the full weave (not minimal) up and running fine with firefox, the only problem is that the iPhone client “Firefox Home” isn’t syncing with it. The problem with my server is the exact same as described by Tom.
Let me know if you find a solution…
Best
Rainer
September 28, 2010 at 9:10 pm |
[...] kein großes Unternehmen bin und den full-featured großen Server nicht brauche, hab ich weave-minimal installiert. Sebastian Kuhne hat eine kleine Anleitung zur Installation in seinem [...]
September 29, 2010 at 7:23 pm |
[...] selbst, wenn man einen eigenen Weave Server für kleinere Installationen aufsetzen will, den Minimal Server zu verwenden, zu dessen Betrieb nur ein Webserver mit PHP-Unterstützung und SQLite benötigt wird. [...]
September 30, 2010 at 5:58 am |
Hey, I just setup the minimal weave server with a single user in the database but I cannot make the Firefox Sync 1.4.4 plugin work on my Firefox 3.6 installation. The problem is a 404 when entering the server URL (http://x.x.x.x/weave/) as it tries to fetch “/weave/user/1.0/a” to which the server returns “Function not found” (index.php:120). Is it not working any more? Also when entering my username in the plugin wizard it says that it is already in use (seems like it checks the Mozilla servers)…
Thanks in advance.
September 30, 2010 at 4:53 pm |
The 404 is the correct behavior – the server doesn’t implement the registration functions.
Don’t tell it you need a new account – you have one existing on the server, and shouldn’t need to go through account creation.
September 30, 2010 at 5:59 pm
D’oh thanks, that was the problem! Working well now.
September 30, 2010 at 1:01 pm |
I have installed it and succesfully connected however as soon as I try to sync I get an error.
Things that struck me as interesting on the apache logs:
GET /weave/1.0/xeross/storage/keys/pubkey HTTP/1.1 404
GET /weave/user/1.0/xeross/node/weave HTTP/1.1 404
What is going wrong here ?
Thanks, Xeross
October 6, 2010 at 6:29 am |
I’m having the same problem here. It says it’s connected in the preferences, but when I click the sync icon at the bottom of the Firefox screen, it says there was an unknown error and that it will retry, but the retry button is gone. I also noticed that while GET /weave/1.0/user/info/collections works, the javascript it returns is just a pair of brackets.
I’m using Firefox 3.6.10, Firefox Sync 1.4.4, and the weave-minimal server from here.
October 6, 2010 at 4:00 pm
This sounds like a potential client problem – the response would be correct if you had no data on the server.
Check about:sync-log for more detail about why the client isn’t happy.
October 11, 2010 at 3:56 am
Yes indeed it does appear to be a client problem. Firefox 4.0b6 syncs fine. Additionally, about:sync-log tells me that the crypto library isn’t available for my platform (Fedora 13, Firefox 3.6.10-1, i386/i686, kernel 2.6.34.7, gcc 4.4.4). Crap. I was hoping this was something I could fix on my end.
2010-10-08 09:54:50 Service.Main INFO Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100920 Fedora/3.6.10-1.fc13 Firefox/3.6.10
2010-10-08 09:54:50 Service.Util WARN Component @labs.mozilla.com/Weave/Crypto;1 doesn’t exist on this platform.
2010-10-08 09:54:50 Service.Util WARN Component @labs.mozilla.com/Weave/Crypto;2 doesn’t exist on this platform.
2010-10-08 09:54:50 Service.Main DEBUG Crypto check failed: TypeError: Svc.Crypto is undefined
2010-10-08 09:54:50 Service.Main INFO Could not load the Weave crypto component. Disabling Weave, since it will not work correctly.
2010-10-08 09:54:50 Service.Main INFO Weave Sync disabled
October 2, 2010 at 12:45 am |
[...] http://tobyelliott.wordpress.com/2009/09/11/weave-minimal-server/ is where you can get the minimal server. [...]
October 6, 2010 at 5:14 pm |
Here you go:
2010-10-06 19:13:12 Service.Main INFO Logging in user xeross
2010-10-06 19:13:13 Net.Resource DEBUG GET success 200 https://weave.x3tech.com/weave/1.0/xeross/info/collections
2010-10-06 19:13:13 Net.Resource DEBUG GET fail 404 https://weave.x3tech.com/weave/1.0/xeross/storage/keys/pubkey
2010-10-06 19:13:14 Service.Main DEBUG Idle timer created for sync, will sync after 5 seconds of inactivity.
2010-10-06 19:13:14 Service.Main DEBUG Exception: Can’t sync: Weave is disabled No traceback available
October 6, 2010 at 5:17 pm |
That all looks correct. You have no data in that location, so it 404s.
I would suggest posting the more complete log to mozilla-labs-weave@googlegroups.com, where they handle client issues.
October 6, 2010 at 8:51 pm |
[...] the dedicated server part, downloading the weave minimal server from here and following the included instructions was enough to get it running with apache within [...]
October 8, 2010 at 5:18 pm |
[...] домашней сети настоятельно рекомендуют использовать weave-minimal-server (Weave – старое название [...]
October 9, 2010 at 12:45 am |
Been running it since April on Linux (Debian) for two notebooks (1 Linux, 1 Windows). Been working all this time. Thanks!
October 11, 2010 at 5:25 pm |
I followed the instructions and after some tweaking was able to get it to work, at least part way. The preference panel says it’s connected, but I get an “Error While Syncing” message and about:sync-log gives me:
PUT Length: 76
PUT fail 500 https://myserver.com/weave/1.0/myaccount/storage/meta/global
Starting backoff, next sync at:Mon Oct 11 2010 18:30:49 GMT-0400 (EST)
October 11, 2010 at 5:27 pm |
Check your apache error log. If the server returns a 500, it should write in the actual problem there.
October 11, 2010 at 5:31 pm
Yep, it does…
“PHP Fatal error: Call to undefined function mb_strlen() in /usr/local/apache2/htdocs/weave/weave_basic_object.php on line 162″
October 11, 2010 at 5:34 pm
You need the mbstring package for php.
October 11, 2010 at 5:47 pm
Awesome…that worked, thank you!
November 3, 2010 at 10:37 am |
Hi tobyelliot,
I’m running minimal server and works fine with Firefox sync 1.4.4. A few days ago I updated to Firefox Sync 1.5 and does not work.
Can You confirm?
Please take a look here:
http://support.mozilla.com/en-US/questions/758124
Do you have a fix for this?
Thanks
November 3, 2010 at 4:25 pm |
The support question you link to is for Firefox Home, not Firefox sync. Which one are you having an issue with?
November 3, 2010 at 11:06 pm
Hi toby,
I think issue is Weave Server. It not Sync if I’ll Use firefox Sync 1.5 against Weave Minimal, I got and error and wont sync.
If i run Firefox sync 1.4.4 against Weave Minimal, it works
November 4, 2010 at 7:39 am |
Sorry, I replied to the wrong message. You can read my reply here http://tobyelliott.wordpress.com/2009/09/11/weave-minimal-server/#comment-608
November 4, 2010 at 7:36 am |
No problem here syncing weave minimal against ffsync 1.5.*. You could try doing a full sync with 1.4.4, then upgrade to 1.5 and do a full resync replacing all the server data with your pc data (backup first
).
November 8, 2010 at 10:08 am |
[...] Server (heisst jetzt aber Firefox Sync) aufsetzen. Ausreichend fuer die Synchronisierung ist ein Fork, der nur minimale Funktionen zur Verfuegung stellt. Das ist einfach nur ein Skript in PHP, welches [...]
November 8, 2010 at 12:06 pm |
[...] puedes montar un servidor propio como Firefox Sync Server con PHP y MySQL o un Weave Minimal Server con PHP y [...]
November 10, 2010 at 2:00 am |
I installed Weave minimal server on my LAN (the PATH_INFO bit didn’t work for me so I added SCRIPT_URI to the choices) and Sync1.5 on two boxes (one Debian and one WinXP), but when I try to sync (in both cases), I get
PUT fail 405 http://MyURL/weave/1.0/MyUserName/storage/meta/global
Apparently, Apache isn’t accepting the PUT. The GETs seem to be working (at least, they’re getting 200 codes), and the sync fails before getting to the POST.
Any help would be appreciated.
November 10, 2010 at 5:15 pm |
Hmm, the app never returns a 405, so it’s something about your webserver config that’s having issues here. Using SCRIPT_URI may also have strange consequences – make sure that the values for collection, etc are correct after the split.
November 20, 2010 at 8:52 pm |
[...] ist.Wie es Mozilla mittlerweile auch macht empfehle ich aber den “kleinen Bruder”, den Weave Minimal Server. Die Installation hierbei ist in ein paar Minuten abgeschlossen:Projekt-URL: [...]
November 21, 2010 at 4:16 pm |
Firefox Home 1.0.4 will work using this https://support.mozilla.com/it/questions/758124#answer-118460 hack to the weave minimal server index.php.
November 21, 2010 at 5:10 pm |
Bingo!
FF Home now woks with weave minimal.
Thank you j.ed. and psychowood.
December 19, 2010 at 3:46 pm |
Hello,
I can’t download the tgz archive I got a 404 not found error with the link http://people.mozilla.org/~telliott/weave_minimal.tgz.
Any mirror/new link?
December 20, 2010 at 5:15 pm |
We had a brief outage on people.mozilla.org. Should be back now.
December 28, 2010 at 10:03 am |
Hi!
Got some Questions:
“Add the following line to your apache config:
Alias /weave //index.php” Wehre can i find the apache config file?
“Restart your apache server. Point your browser at https://localhost/weave/1.0/blah/info/collection. ”
why 1.0? where to enter the password?
December 28, 2010 at 9:48 pm |
Hi again!
I was wondering if there exists a guide for an installation/configuration of your weave_minimal under windows
January 22, 2011 at 8:41 pm |
[Sat Jan 22 21:40:22 2011] [error] [client 127.256.256.256] store_object: SQLSTATE[HY000]: General error: 14 unable to open database file
can somebody tell me what is wrong ?!?!
It stops at entering the “Sync key”
skvm001:/var/www/sync# ls -allh weave_db
-rwxrwxrwx 1 www-data www-data 8.0K 2011-01-22 21:03 weave_db
skvm001:/var/www/sync#
January 24, 2011 at 8:52 pm |
Does it work if you use the script to create users?
January 24, 2011 at 9:52 am |
Anyone knows if there is some sort of web interface available to access weave-minimal (bookmarks, etc.)?
Unfortunately the Firefox Home iPhone app still doesn’t work with weave-minimal on self-signed HTTPS.
January 24, 2011 at 8:51 pm |
There is no web interface, since the data is encrypted, and would thus need your private key.
January 24, 2011 at 9:15 pm
But users could enter their key (via https)?
January 24, 2011 at 9:20 pm
Yes, if they know their key, which is a large random string.
It’s something that’s on the roadmap, but it hasn’t been built yet.
January 24, 2011 at 1:47 pm |
[...] history, passwords, etc to a server, of course data will be stored encrypted. There is a nice blog post which provides a link to a tiny weave minimal server implementation. After installation you just [...]
February 8, 2011 at 12:39 am |
I’ve been happily using weave-minimal for around a year. However at some stage during the 4.0beta cycle, something has gone wrong and now I have one Fedora 4.0b10 and one Win7 3.6.13 browser where weave won’t sync! Weird thing is it still seems to be working on a different Fedora 4.0b10 install! (ie I have 3 computers with weave using the same account on a weave-minimal server, with three different “description” values)
The error says
Sync encountered an error while syncing: Unknown error
…not very helpful. The Apache logs show the browsers downloading stuff – but something goes wrong. All the sync keys are the same, along with the username:password of course. The horrible thing is that the 2 broken installs now only have ~30 of the ~300 website passwords I’ve created over the years.
I could delete .mozilla and copy the working one over – but I’d need to change the description field to ensure I don’t trash my working one. Any suggestions how to do that properly? Offline is probably a requirement?
Thanks
February 17, 2011 at 10:12 pm |
This sounds more like a client problem. Check the sync logs to see if there’s a more detailed error and I would suggest posting on mozilla-labs-weave@googlegroups.com for further debugging help
February 13, 2011 at 7:24 pm |
I am going crazy to set this up under Fedora 14.
I installed: apache, php, php-cli, php-pdo, json, sqlite (php stuff comes from remi resp because Fedora has no php-sqlite package) and set SELinux to permissive mod.
I point to the page where I am supposed to enter blah and garbage. The problem is, the weave_db will not be created, only if I run php create_user. I guess here lies the problem, but I do not know how to resolv it. I even set 777 permissions to the weave dir.
Any hints? I would be *really* gratefull.
February 18, 2011 at 2:59 pm |
Got it!
Here is a quick tutorial for Fedora (14)
http://forums.fedoraforum.org/showpost.php?p=1444972&postcount=2
February 19, 2011 at 8:56 pm |
Hi There,
I tried to set up the minimal server exactly as mentioned and read all of the comments posted here so far. But it simply doesn’t work for me.
What I have tried is to add the Alias to my site. When I try to open the address https://www.domain.de/weave , I always get the info “The files at https://www.domain.de/weave couldn’t be found.” from firefox.
When I try to open the mentioned https://www.domain.de/weave/1.0/blah/info/collection, I get a different error from the webserver:
“Not Found
The requested URL /weave/1.0/blah/info/collection was not found on this server.”
I set the whole weave directory to 777 to make sure the db can be generated, but it isn’t.
I tried to generate it by issuing “php -f create_user”, too, but neither is anything created, nor is any error given by that.
Could anybody help me please?
February 22, 2011 at 4:57 pm |
If you are getting the generic not found message from the server, it suggests that the alias is not configured correctly, as you aren’t getting to the code.
March 1, 2011 at 8:52 pm
Sorry for my late answer. I have tried, and tried, and tried now several times without success. I am quite familiar with linux, apache an all this stuff since I’m working as a system administrator for a web marketing factory. So I think I’m capable of creating a working alias.
When I open the page http://www.mydomain.de/weave/1.0/blah/info/collection in Chromium and Firefox, I get a login form. When I enter “blah” as user and “garbage” as pass, I get a page containing “”Database unavailable”". No new file is created within the weave folder.
When I issue “php -f create_user blah” on the shell, NOthing is printed, no new file is created and nothing is written to the PHP error log.
My PHP (5.3.5) is capable of json, mbstring and SQLite (controlled in phpinfo();).
I really do not know what I’m doing wrong here.
March 1, 2011 at 9:16 pm
Waaaah !!! I could kick myself into my a… – I thought I had read everything in here – I’m trying with USE=”sqlite3″ currently … ;D
March 1, 2011 at 10:04 pm
…… OK folks – this fixed it!
Thank you for all your help!
February 28, 2011 at 7:08 pm |
[...] Ich hab nun endlich mal eine gute Möglichkeit gefunden Bookmarks ect aus Firefox zu syncen. Und zwar mit dem Firefox Sync Addon (angeblich ab FF4.0 integriert) Auf dem eigenen Server braucht nur ein kleines PHP Script mit einer Sqlite Datenbank laufen. Es handelt sich dabei um eine abgespeckte Version des Mozilla Weave Servers (WeaveMinimalServer). [...]
March 2, 2011 at 12:42 am |
[...] ich hier das “Minimal Weave Server” – tar.gz – Archiv von der Originalseite zum Download anbiete, soll kein “mit fremden Federn schmücken” sein! Ich weise hier [...]
March 16, 2011 at 3:37 pm |
Thanks a lot Marc, a was complaining here: http://tobyelliott.wordpress.com/2009/11/11/61/ about weave minimal server not working on PHP-5.3.5, but it seems all i needed was USE=sqlite3. I’ve been strugling with this for some time now, so your comment is really appreciated.
March 17, 2011 at 10:06 pm |
I can’t make it work.
I added : “Alias /weave /var/www/https/weave/index.php”.
I went to : https://mydomain.tld/weave/1.0/blah/info/collection
It asks for login/password, I entered “blah” and garbage.
Then it said “Firefox can’t find the file at https://rom1v.com/weave/1.0/blah/info/collection” and no database is created…
March 17, 2011 at 10:24 pm |
(please replace rom1v.com by mydomain.tld in my previous comment, and remove this one ^^)
(thank you)
March 24, 2011 at 2:47 pm |
Make sure you’ve got sqlite and the php bindings, then restart apache. It worked for me when I had that error.
April 1, 2011 at 1:34 pm
Thank you, I managed to create the database and to add the user.
But when I try to configure sync in Firefox, it says the server url is invalide (while it’s ok : https:///weave).
April 1, 2011 at 1:38 pm
The adress was truncated : https://myserver/weave.
April 1, 2011 at 3:57 pm
Try putting a / at the end
April 1, 2011 at 4:05 pm
Same problem, Firefox doesn’t want this address : https://mydomain.tld/weave/
April 1, 2011 at 4:08 pm
That almost always means an apache configuration problem. Try navigating to https://mydomain.tld/weave/1.0/username/info/collections in a browser. If it doesn’t ask for authorization, there’s an issue with apache
April 1, 2011 at 4:11 pm
Firefox asks for authorization on this address : https://mydomain.tld/weave/1.0/username/info/collections
April 1, 2011 at 4:14 pm
Hmm, OK. Are you going through the “I already have an account” process? Make sure you do that (and select “I don’t have the device with me”)
April 1, 2011 at 4:26 pm
Ah ok ! This GUI is totally anti-intuitive (why talking about “device”?).
So I clicked on “I don’t have the device with me”.
Then I have another form.
Account : my e-mail
Password : my password
(created by create_user)
It asks for a sync key (the “next” button is disabled until you enter a sync key, but I don’t have any), so I clicked on “I have lost my other device”, and it says “Incorrect account name or password” (while they are ok, I just recreated them to be sure).
April 1, 2011 at 4:34 pm
It’s unintuitive because it’s not really built to handle the minimal server (see my latest post). Your sync key is the passphrase it’s going to use to encrypt the data.
As to the incorrect password, have you tried entering the username and password directly in the auth? Note that if you’re using an email address as your username, it gets converted into a base32 string. Make sure you have the latest create_user script and it’ll do it for you automatically.
April 1, 2011 at 4:41 pm
I tried using an username (when it asks for email) :
$ sudo php create_user
(c)reate, (d)elete or change (p)assword: c
Please enter email: rom
Please enter password:
rom created
But firefox still says that rom/password is incorrect.
April 1, 2011 at 4:55 pm
I had exactly the same troubles. The script create_user need an _email_. It then returns the key you need.
April 1, 2011 at 4:57 pm
That’s not the key – if you use an email address, it converts it to base32, and that’s the username that’ll appear in your apache logs. Encrypting your data with that will be highly insecure.
April 1, 2011 at 4:58 pm
So, very strange, cause it worked well as soon as I used an email account.
April 1, 2011 at 6:52 pm
@tobyelliott: an idea about the reason why rom/password does not work in my Firefox ?
March 23, 2011 at 4:47 pm |
I had quite the same error as ®om bu, after restarting my apache2 server and logged in …/weave/1.0/blah/info/collection it created the database file.
I also created an user account. However, Firefox (4.0) refuses to connect on my weave server… even if I change the services.synx.serverURL (and then it turns it to its default value).
I think the last version of Firefox could have brought a lot of troubles. Maybe a new release or a new README would be useful ?
March 26, 2011 at 7:41 am |
I met the same problem.
I had changed services.sync.serverURL, but it changed/reset automatically to ”
https://auth.services.mozilla.com/“.
March 28, 2011 at 4:55 pm |
I’m not sure that’s the one you should be changing off the top of my head. You shouldn’t need to change any constants, though. Just select the custom server option when going through the setup process.
March 27, 2011 at 2:45 pm |
Do you have an upstream repository of this somewhere but the tarball in here? I’ve done a bit of patching (most notably hacked in the user/1.0/$user/node/weave support to use Firefox Home on iOS), and I’d like to simplify my merging of your upstream changes. And possibly, have some of my changes merged.
March 28, 2011 at 4:56 pm |
Yes, full repository is at http://hg.mozilla.org/services/minimal-server/
If everything else is working well, you may just want to update the create_user script.
March 28, 2011 at 5:34 am |
Sigh.
Looks like this is way over my head.
No chance of a nice point ‘n’ click install is there? Or some serious step-by-step from scratch how to’s?
Some of us n00bs out there aren’t up to doing this but would still like to maintain privacy with the firefox sync server…
Cheers,
March 28, 2011 at 4:58 pm |
You might try the python server that I mention in the latest post. However, that still requires some apache set up and configuration. The goal is to get to something point-and-click eventually, but I don’t think we’re there yet.
March 30, 2011 at 9:32 pm |
Könnte jemand die create_user datei als php-datei umschreiben, welche direkt im browser ausgeführt werden kann? dies wäre hilfreich, wenn auf einem hostingpaket kein php-cli zugriff besteht. die datei müsste zum schutz vor manipulation natürlich nach änderungen gelöscht werden oder manuell umbenannt werden. das wäre echt grossartig.
March 30, 2011 at 9:34 pm |
That’s what the full install is for. The minimal one was designed to pull that into a script.
March 31, 2011 at 8:36 am |
You could always do the relevant modifications on your local system. Download the weave_db, modify the user, and re-upload. Sure it’s inconvenient, but once you start making the user script web-aware, you might as well start implementing the user API and use the browser (extension) frontend.
April 7, 2011 at 1:27 pm |
Great tool, but I have a few questions installing the Weave Minimal Server.
Is it possible to configure it without doing any changes for the apache service. I don’t own a full featured server, only a managed server, so I can’t change apache settings.
And I don’t want to save my browser passwords on a mozilla server
If anybody can help me, feel free…
April 7, 2011 at 4:48 pm |
It is not possible to set up the Minimal Server without access to apache. Well, you could run your own local install on a different port and point to that, but I doubt that’s helpful.
April 7, 2011 at 8:42 pm |
Try using this URL in the FSync configuration:
http://domain.tld/weave_path/index.php
If Firefox does not delete the «index.php», it should work. But you’ve to try to check !
May 2, 2011 at 5:36 am |
I’m curious. Why do the 4 .php files require write permissions? This seems to me to be unnecessarily permissive. I’ve tried to lock down those files both through ACLs and directives, but both means cause syncs to fail. And yet these files do not get modified by the server as far as I can tell. Thank you.
May 2, 2011 at 4:15 pm |
Hmm, that is odd. The db obviously needs write permission, but the files shouldn’t.
What error does the server give you?
May 2, 2011 at 10:33 pm
Because the README had said that the folder needed write permissions and not just the DB file, I had assumed when I was asking my question that my experience was the norm and was just trying to understand why the whole folder needed the permissions. Because of your response, however, I realized that this was not the case and I was experiencing something unusual so I investigated it more deeply.
It appears that I was encountering a bug in Windows. For my convenience, I was using ICACLS to set the permissions on the files. It turns out that, if I apply a deny write ACL to a file from a normal user context (with admin privs) it breaks the ACLs for the file. But if I do it from an administrative command prompt, it would not. In the former scenario, it showed two identical deny write ACLs when I’d run ICACLS on a file, and only one (as it should be) in the latter scenario. (From the security GUI you couldn’t tell the difference between the two scenarios either from the Security tab or from Effective Permissions – they appeared identical). (Also interesting is that the same doesn’t happen if I apply the deny write from the user context using the security tab GUI, it’s only w/ ICACLS that this occurred.)
So, I went ahead and reset all the permissions to inherit (which, since it’s under my website document root means read only for my Apache user context) and then set only the DB file to allow writes for my Apache user context. And syncing appears to be working again. I’ll follow up if anything else relevant to Weave users comes out of this, but this appears to be an esoteric Windows bug not specifically relevant to Weave.
Thank you.
May 4, 2011 at 4:56 pm
I have one correction regarding my previous post. Syncing continued to fail after I made the changed mentioned in the last paragraph. I did have to give the folder itself write privs in addition to the DB (although this still seems like it shouldn’t be so, to me). But as long as I applied the deny write privs to the 3 .php files accounting for the bug I mentioned, syncing continued to work.
May 7, 2011 at 9:47 am |
I just wanted to add another FF client (v4.0.1) but it says “wrong sync key”. The key is definitely correct and it works for example upon login with Firefox Home (iPhone). Already “connected” FF instances also sync well (I don’t want to disconnect one of those though…).
HTTP logs say:
“GET /weave/1.0/rfk/info/collections HTTP/1.1″ 200 142
“GET /weave/1.0/rfk/info/collections HTTP/1.1″ 200 142
“GET /weave/1.0/rfk/storage/crypto/keys HTTP/1.1″ 200 405
Any ideas? Thanks.
May 18, 2011 at 9:02 pm |
[...] up your own, but the installation process is incredibly bulky and error-prone. So it’s great someone made the effort of writing a minimal version of a Firefox Sync server, which only needs PHP with [...]
May 22, 2011 at 6:07 pm |
I’ve gotten further with this than the full install version 1.1 but I’m stuck at this error now:
Server incorrectly configured
Based on the README, everything looks to be in place. I’ve been able to map the alias and write the initial sqlite database. I’ve created a user account and edited FF custom settings. In searching, I could only find one other reference to this error and it was caused by an incorrect URL; “/weave1.0/” versus “/weave/1.0/”.
I’m also seeing about:config reverting back to the default string value instead of maintaining the changed string value but when I correct it, I see the connection hit my server logs. Will this value stick once it makes a successful connection?
Details:
current weave_miniserver provided by link above
- index.php looks to be last updated Feb 4 2011
Iceweasel 4.0.1
- services.sync.serverURL = https://myserver/weave/
- Steps:
– Sync Setup
– “I don’t have the device with me”
– Account = as setup through create_user php
– Password = as setup through create_user php
– Custom Server = “https://myserver/weave/”
– Sync Key = “”
– “I have lost my other device”
Error returned “Server incorrectly configured” but there really isn’t any configuration I can see beyond the Apache config alias, directory ownership permissions and create_user.
I see the server hit in my access log:
<> – <> [22/May/2011:13:56:30 -0400] “GET /weave/1.0/<>/info/collections HTTP/1.1″ 400 413 “-” “Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20110430 Firefox/4.0.1 Iceweasel/4.0.1″
<> matches “<> created” returned by the create_user php so it apears
This is a new install so there is no pre-existing sync data to fetch and the client side has not used the sync function. Maybe it’s complaining because it can’t find pre-existing data?
Any help would be welcome. Managing browser sync data on my own server rather than involving a third party service would be fantastic.
(A Debian package for this or the full weave server could be interesting also.)
June 14, 2011 at 3:05 pm |
[...] не получилось, однако удалось найти следующий пост: http://tobyelliott.wordpress.com/2009/09/11/weave-minimal-server/ содержащий ссылку на Минимальный Weave сервер (Weave – [...]
June 22, 2011 at 7:49 pm |
[...] versammeln sich gerade diverse Cloud Dienste zu einem persönlich für mich zusammengestellten Bouquet auf meinem eigenen Server, weil [...]
June 23, 2011 at 3:22 pm |
This miniserver has been a blessing. You only realize how much you depend on it until it stops working…. Exactly this happens with the upgrade to Mozilla Firefox 5.0: Before the upgrade the latest “sync” plugin nicely syncs with this server, after the upgrade the plugin (version 1.7) reports: “Sync encountered an error while connecting: Incorrect account name or password”. Simply retyping the password does not work
Do you know if or what changed with the upgrade to Firefox 5?
June 23, 2011 at 3:51 pm |
First thing to do is to check if you have a really old minimal server: http://tobyelliott.wordpress.com/2009/11/11/61/
FF5 started using 1.1 full time
June 23, 2011 at 4:04 pm
Thanks for your quick reply. I confirmed that the changes detailed in your post were applied.
I subsequently also found your recent post http://tobyelliott.wordpress.com/2011/03/25/updating-and-deprecating-the-weave-minimal-server/
After simply copying the files (and leaving the db intact) the error message in FF5 changed to “Server incorrectly configured”. I guess this is to be expected. I will have a go at that from home tonight and report my findings back.
I’m sad to see the minimal server deprecated – it served very well for my family setup, but I understand your reasoning. Running the full server seems like too big a project for my needs. An even bigger thank-you for replying to my questions.
June 23, 2011 at 4:08 pm
You might find the python server is surprisingly easy to set up. Give it a shot and ask in the irc #sync channel if you run into difficulty.
Also, I’ve been helping some other minimal users in the most recent post (though the title is about python). See if one of the weirder solutions there helps.
June 25, 2011 at 3:20 am
Got it working with the new(er) php server. Did not have the mbstring extension installed.
I think I’ll stick with it until it breaks and hope that by then (a) I have more time to tinker than I have now (with two small kids), and (b) the python code is even easier to setup
Anyhow, thanks again for your help and your awesome code!
June 27, 2011 at 9:50 am |
It wasn’t working for me either so I investigated the problem and wrote a small patch that fixed it:
— weave_minimal_original/index.php 2011-02-04 20:44:19.000000000 +0100
+++ weave_minimal_working/index.php 2011-06-26 18:48:06.000000000 +0200
@@ -59,6 +59,13 @@
$path = substr($path, 1); #chop the lead slash
list($version, $username, $function, $collection, $id) = explode(‘/’, $path.’///’);
+ if ($version == ‘user’ && $collection == ‘node’ && $id == ‘weave’) {
+ if (isset($_SERVER['HTTPS'])) {
+ exit(“https://” . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']) . “/”);
+ } else {
+ exit(“http://” . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']) . “/”);
+ }
+ }
if ($version != ’1.0′ && $version != ’1.1′)
report_problem(‘Function not found’, 404);
June 28, 2011 at 1:08 pm
Thanks for the patch and saving me the pain of having to switch to the full server. This definitely fixed things for me.
August 6, 2011 at 1:36 pm |
This doesn’t seem to be working for me. I cannot make sense of this. I have gone through all the comments but still not working. I am using xampp in win7. If someone got it working in win7 xampp environment, can you post the step-by-step instruction on how you did it? Thanks
August 14, 2011 at 8:42 pm |
Hi Folx,
I was running weave_minimal for a long time but with some minor update of FF4 and now with FF5 I dont get it running anymore…
I also re-installed the weave_minimal and set up the client connection again.
I always (FF5) get 404 errors on
File does not exist: /XXXX/html-data/weave1.1
and
File does not exist: /XXXX/html-data/weaveuser
I also cared about the ending slash in the client setup, but it seems that the FF5 ignores this setting?
Any ideas? Would appreciate any help as I wanna stay on minimal_server, the full-blown is not really “compatible” with my webserver vhost setup here.
Thanks a lot,
Matthias
August 15, 2011 at 4:26 pm |
The problem is definitely the ending slash. Not sure why the client would remove it there – it doesn’t normally. Go into about:config and look for the sync preferences, and make sure there’s trailing slashes on there.
August 26, 2011 at 1:11 pm |
Share bookmarks…
Weave Minimal Server « Tapestry…
September 4, 2011 at 2:09 am |
I am wanting to know if it is possible to do so. and if so can someone tell me how? Or if anyone knows someone who can do it for a small fee..
September 26, 2011 at 1:05 pm |
Tried this but got this:
[Mon Sep 26 14:59:31 2011] [error] [client 1.2.3.4] File does not exist: /web/rc/weave1.0
[Mon Sep 26 14:59:31 2011] [error] [client 1.2.3.4] File does not exist: /web/rc/weaveuser
vhost config is:
Alias /weave/ /www/roundcube/weave_minimal/index.php
# php –version
PHP 5.3.8-1~dotdeb.2 with Suhosin-Patch (cli) (built: Aug 25 2011 13:30:46)
Linux 2.6.32 Debian Squeeze.
# ls -la
total 76
dr-xrwxr-x 2 root www-data 4096 Sep 26 14:55 .
dr-xr-xr-x 15 root root 4096 Sep 26 14:56 ..
-r-x—— 1 root root 5091 Mar 23 2011 create_user
-r–r–r– 1 root root 10129 Feb 4 2011 index.php
———- 1 root root 833 Sep 13 2010 README
-r–r–r– 1 root root 6954 Jun 23 2010 weave_basic_object.php
-r–rw—- 1 root www-data 8192 Sep 26 14:55 weave_db
-r–r–r– 1 root root 18846 Mar 23 2011 weave_storage.php
-r–r–r– 1 root root 6346 Jun 23 2010 weave_utils.php
Why is it asking for the wrong place
September 26, 2011 at 4:15 pm |
Looks like you need a slash at the end of your url in the client preferences.
October 9, 2011 at 10:49 pm |
[...] Elliot (Mozilla team), some months ago released a minimal version of the “real” sync server: it lacks all the user management api, but is a full [...]
November 19, 2011 at 12:02 am |
[...] systems but it’s large and hard to maintain. Even harder to get it working. There is also a Weave Minimal Server which you can run on your own server and connect to it. It’s much simpler and there are [...]