stuporglue / TreeTrumpet

Trumpet your genealogy on the web. Easy setup, no config files, no databases. Just upload and done.
Other
6 stars 2 forks source link

Strange modes #16

Open nigelhorne opened 9 years ago

nigelhorne commented 9 years ago

On first run it seems to create a directory tree called treetrumpet, but it an all of the subdirectories are in accessible because they are mod 1360, instead of 755, and all of the files are publicly writeable (oops!) because they are mode 666 instead of 644.

nigelhorne commented 9 years ago

These commands fix it, but they shouldn't be needed:

$ find . | xargs chmod 755 $ find . -type f | xargs chmod 644

nigelhorne commented 9 years ago

After running that all I get is a blank page and this error in the apache logs:

PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class PhpGedcom\ParserSqlite does not exist' in /home/njh/public_html/lib/treetrumpet.php:50\nStack trace:\n#0 /home/njh/public_html/lib/treetrumpet.php(50): ReflectionClass->__construct('PhpGedcom\Parse...')\n#1 /home/njh/public_html/model/ttgedcom.php(10): model('PhpGedcom\Parse...', Array)\n#2 [internal function]: ttgedcom->__construct('/home/njh/publi...')\n#3 /home/njh/public_html/lib/treetrumpet.php(51): ReflectionClass->newInstanceArgs(Array)\n#4 /home/njh/public_html/controller/index.php(3): model('ttgedcom', Array)\n#5 /home/njh/public_html/lib/treetrumpet.php(26): require('/home/njh/publi...')\n#6 /home/njh/public_html/index.php(32): controller('index.php', Array)\n#7 {main}\n thrown in /home/njh/public_html/lib/treetrumpet.php on line 50

erdoking commented 9 years ago

I don't know how you are installing it... I check all my file permissions (find . -type f -exec ls -la {} \; | less) and all are just user writeable. (Same if you are downloading the zip-file)

You need the 3rdparty addons php-gedcom-sqlite, php-gedcom-sqlite and ged2json! Have an look in the lib-directory on github... (If you are just download the AUTOMATIC zip the files are missing ...)

https://github.com/stuporglue/TreeTrumpet/tree/master/lib

Note the last update was 2 years ago! I think this is an dead project! I have changed some code for getting it working again... (Mainly i included the extern javascripts...)

stuporglue commented 9 years ago

It's not dead, it's just sleeping

Hello, I'll take a closer look at the issues tonight when I'm not at work, but quickly:

erdoking commented 9 years ago

Hi stuporglue,

I'm sorry for my assumption the project would be dead. Right now Treetrumpet currently the best GEDCOM web viewer ...

I'm really interested in a cleaned up release! The actually isn't really useful without some code rewriting ...

nigelhorne commented 9 years ago

That's great to hear - I'm looking forward to using your software.

I'm installing by using "git clone".

stuporglue commented 9 years ago

Ok. The download can be found on http://treetrumpet.com/download/

There are two caveats that I've found so far.

It has to be installed in a subdirectory (http://example.com/tree instead of http://example.com) and it looks like the geocoding has broken.


To install from the code on GitHub the commands you would use are:

git clone https://github.com/stuporglue/TreeTrumpet.git tree cd tree git submodule init git submodule update --init --recursive

Unfortunately there's still a missing class when installing that way. I'll get things sorted out over the next few days. I'm sorry it's not working correctly at the moment.

nigelhorne commented 9 years ago

Thanks for the instructions. I'll await the missing class fix. I'm looking forward to playing with your software.

erdoking commented 9 years ago

@nigelhorne: the missing classes are submodules ... If you are checkout these (read stuporglue instruction) TreeTrumpet start working...

You don't need any class fix ...

nigelhorne commented 9 years ago

I gave it a go, but still get the error message in the Apache log:

[Tue Sep 22 11:03:05.279484 2015] [:error] [pid 15418] [client 130.14.254.24:17214] PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class PhpGedcom\ParserSqlite does not exist' in /home/njh/public_html/tree/lib/treetrumpet.php:50\nStack trace:\n#0 /home/njh/public_html/tree/lib/treetrumpet.php(50): ReflectionClass->__construct('PhpGedcom\Parse...')\n#1 /home/njh/public_html/tree/model/ttgedcom.php(10): model('PhpGedcom\Parse...', Array)\n#2 [internal function]: ttgedcom->__construct('/home/njh/publi...')\n#3 /home/njh/public_html/tree/lib/treetrumpet.php(51): ReflectionClass->newInstanceArgs(Array)\n#4 /home/njh/public_html/tree/controller/index.php(3): model('ttgedcom', Array)\n#5 /home/njh/public_html/tree/lib/treetrumpet.php(26): require('/home/njh/publi...')\n#6 /home/njh/public_html/tree/index.php(32): controller('index.php', Array)\n#7 {main}\n thrown in /home/njh/public_html/tree/lib/treetrumpet.php on line 50

erdoking commented 9 years ago

root@webtrees:/var/www/html/treetrumpet# ls -la lib/3rdparty/ insgesamt 56 drwxr-xr-x 4 www-data www-data 4096 Aug 21 16:41 . drwxr-xr-x 4 www-data www-data 4096 Sep 21 23:28 .. -rwxr-xr-x 1 www-data www-data 3429 Jan 20 2014 ged2geojson.php -rwxr-xr-x 1 www-data www-data 11898 Jan 20 2014 ged2json.php drwxr-xr-x 3 www-data www-data 4096 Jan 20 2014 php-gedcom drwxr-xr-x 2 www-data www-data 4096 Jan 20 2014 phpmailer -rwxr-xr-x 1 www-data www-data 9839 Aug 21 15:40 ssgeocoder.php

do you have installed all needed 3rdparty libarys?

stuporglue commented 9 years ago
Uncaught exception 'ReflectionException' with message 'Class PhpGedcom\ParserSqlite does not exist' 

I also get this on a fresh clone of the repo (including with submodules), at least on my local dev machine.

nigelhorne commented 9 years ago

There is no lib/3rdparty directory. I guess they aren't in the github repo? I'm not sure if there's instructions on getting them but I can't find the instructions.

erdoking commented 9 years ago

I can reproduce your installation mistake. At the moment i debug this ... I have fixed this mistake in my installation but down't remember how ...

There are one repository for php-gedcom and one for php-gedcom-sqlite. Maybe the problem is here

stuporglue commented 9 years ago
There are one repository for php-gedcom and one for php-gedcom-sqlite. Maybe the problem is here

I think you're right. php-gedcom is the gedcom parsing library, php-gedcom-sqlite is a wrapper I wrote that caches it in an sqlite database so that the whole gedcom file doesn't have to be parsed on every page load. It looks like it's either not getting installed correctly or not getting included correctly.

erdoking commented 9 years ago

I think i found the mistake ... your last (working!) version is v0.1.3 your last GIT version is v0.1.2

https://github.com/stuporglue/TreeTrumpet/releases you need to set v0.1.3 as latest git-version!

v0.1.2 doen't work for me...

nigelhorne commented 9 years ago

I tried to update but got this:

njh@compaq:~/public_html/tree$ git pull Already up-to-date.

erdoking commented 9 years ago

root@webtrees:/tmp# git clone https://github.com/stuporglue/TreeTrumpet.git Klone nach 'TreeTrumpet'... remote: Counting objects: 1214, done. remote: Total 1214 (delta 0), reused 0 (delta 0), pack-reused 1214 Empfange Objekte: 100% (1214/1214), 2.68 MiB | 2.41 MiB/s, Fertig. Löse Unterschiede auf: 100% (753/753), Fertig. Prüfe Konnektivität... Fertig. root@webtrees:/tmp# cd TreeTrumpet root@webtrees:/tmp/TreeTrumpet# git describe --abbrev=0 --tags v0.1.2 root@webtrees:/tmp/TreeTrumpet# git tag v0.1 v0.1.1 v0.1.2 v0.1.3

git clone doesn't load the latest version! I think there is an mistake in the git tagging. You can either wait until stuporglue correct the tags or manually download the latest release:

https://github.com/stuporglue/TreeTrumpet/releases/download/v0.1.3/treetrumpet.zip

warthenr commented 9 years ago

Just wanted to say I’m watching all this and am definitely interested when this gets all worked out. This has been a back burner task to get this working in some stuff I’m looking at, so excited to see it.

From: erdo_king [mailto:notifications@github.com] Sent: Tuesday, September 22, 2015 11:19 AM To: stuporglue/TreeTrumpet TreeTrumpet@noreply.github.com Subject: Re: [TreeTrumpet] Strange modes (#16)

root@webtrees:/var/www/html/treetrumpet# ls -la lib/3rdparty/ insgesamt 56 drwxr-xr-x 4 www-data www-data 4096 Aug 21 16:41 . drwxr-xr-x 4 www-data www-data 4096 Sep 21 23:28 .. -rwxr-xr-x 1 www-data www-data 3429 Jan 20 2014 ged2geojson.php -rwxr-xr-x 1 www-data www-data 11898 Jan 20 2014 ged2json.php drwxr-xr-x 3 www-data www-data 4096 Jan 20 2014 php-gedcom drwxr-xr-x 2 www-data www-data 4096 Jan 20 2014 phpmailer -rwxr-xr-x 1 www-data www-data 9839 Aug 21 15:40 ssgeocoder.php

do you have installed all needed 3rdparty libarys?

— Reply to this email directly or view it on GitHub https://github.com/stuporglue/TreeTrumpet/issues/16#issuecomment-142321395 . https://github.com/notifications/beacon/AHyraPfbRh_wrB2p7teT9aP9oL2dbGkHks5o0WjXgaJpZM4GBH7g.gif

stuporglue commented 9 years ago

Ok! I think I have the build process sorted out and documented:

https://github.com/stuporglue/treetrumpet#installing-from-source

I followed the process as documented, then compared the files between the demo (http://treetrumpet.com/demo/) and the build and they were the same.

Still on my radar:

erdoking commented 9 years ago

@stuporglue: Your latest tag v0.1.3 isn't released so far...

I checkout the git-repo and manually download the treetrumpet.zip with Version v0.1.3.

diff treetrumpet_git/index.php treetrumpet_v0.1.3/index.php 2,5d1 < // This is the router for TreeTrumpet. < // Since TreeTrumpet is supposed to be 0-config we need to work where .htaccess doesn't < // PHP files such as tree.php or individual.php should require index.php which will take over < 31d26 < controller('cache',Array($endpoint,$args));

if [ "git clone" != "v0.1.3"] ; then echo "hello world"; fi
hello world
stuporglue commented 9 years ago

@erdoking I'm not sure what happened to 0.1.3

Tonight I updated the js libs that TreeTrumpet uses and put together a new release, 0.1.4. No real improvements yet, except that it should work on https sites now and that the jQuery and Leaflet versions aren't two years out of date.

Please try 0.1.4 and let me know how it goes.

erdoking commented 9 years ago

v0.1.4 seems to work! (git tag is set correctly ;) ) But ssl don't works for me, i open an new issue for this

nigelhorne commented 9 years ago

I'm still getting this error message in the Apache logs:

[Tue Sep 29 10:59:28.128332 2015] [:error] [pid 14307] [client 130.14.254.24:31579] PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class PhpGedcom\ParserSqlite does not exist' in /home/njh/public_html/tree/lib/treetrumpet.php:50\nStack trace:\n#0 /home/njh/public_html/tree/lib/treetrumpet.php(50): ReflectionClass->__construct('PhpGedcom\Parse...')\n#1 /home/njh/public_html/tree/model/ttgedcom.php(10): model('PhpGedcom\Parse...', Array)\n#2 [internal function]: ttgedcom->__construct('/home/njh/publi...')\n#3 /home/njh/public_html/tree/lib/treetrumpet.php(51): ReflectionClass->newInstanceArgs(Array)\n#4 /home/njh/public_html/tree/controller/index.php(3): model('ttgedcom', Array)\n#5 /home/njh/public_html/tree/lib/treetrumpet.php(26): require('/home/njh/publi...')\n#6 /home/njh/public_html/tree/index.php(32): controller('index.php', Array)\n#7 {main}\n thrown in /home/njh/public_html/tree/lib/treetrumpet.php on line 50

And I get a 500 error:

$ curl -v http://bandsman.mooo.com/~njh/tree/

nigelhorne commented 9 years ago

Sorry, Github's rather annoying markdown "feature" reformatted my message. I hope you can still read it. The important thing is:

HTTP/1.0 500 Internal Server Error

Which I presume is from the PHP fatal error.

nigelhorne commented 9 years ago

And in case you're wondering, the file ParserSqlite.php does exist:

./lib/php-gedcom-sqlite/PhpGedcom/Parser ./lib/php-gedcom-sqlite/PhpGedcom/ParserSqlite.php ./lib/ged2json/examples/php/lib/php-gedcom/library/PhpGedcom/Parser ./lib/ged2json/examples/php/lib/php-gedcom/library/PhpGedcom/Parser.php ./lib/ged2json/examples/php/lib/php-gedcom/tests/library/Gedcom/ParserTest.php

Is there any special tweaking to Apache that I need to do to tell it where to find the stuff? I'm using mod_userdir to run it all out of my home directory..

erdoking commented 9 years ago

In my local git-directory (SOURCECODE!) there is an directory tree/lib/php-gedcom-sqlite. After compiling there is an directory tree/lib/php-gedcom-custom ...

Did you move the tree/treetrumpet to an new place? This directory contains the compiled webpage .. I think there must be an directory tree/treetrumpet/lib/php-gedcom-custom so you need to copy/move the compiled webpage to another place

pwd ~/tree mv treetrumpet ../treetrumpet ls -l ../* --- tree/ --- treetrumpet/

nigelhorne commented 9 years ago

No, I didn't move it. I followed the instructions in the README, copied in a family.ged and pointed my browser to it. That's all I did.

stuporglue commented 9 years ago

erdoking is correct that tree/treetrumpet has the generated website. If you move tree/treetrumpet to your webhost it should work. build.php also generates treetrumpet.zip. You could copy treetrumpet.zip to your host and unzip it there and it should work as well.

If you leave it in the tree directory I think it (tree/treetrumpet) should work, but tree itself will never work.

I'm sorry if it's confusing. I'll see what I can do for a future release, weather that means better documentation or changing how the code directory is structured.

nigelhorne commented 9 years ago

I don't get what you're talking about. I installed it using 'git clone' and I get errors in Apache's log when I try to access it.

There is no file "treetrumpet.zip" in the git repo that I can see.

stuporglue commented 9 years ago

The code in the git repo isn't ready to run a website as is. TreeTrumpet uses some 3rd party libraries that include a bunch of files you don't actually need, so there's a build process that generates the actual needed resources for your website.

It's a similar idea to how C++ projects in github have the source code, but not the binaries that the source will produce.

This step:

php ./build.php

is the step that copies all of the needed code into a single location. When you run ./build.php it will create a directory named "treetrumpet" and a treetrumpet.zip file.

Unless you're planning on modifying TreeTrumpet and contributing those changes back to the project, I'd recommend going here: https://github.com/stuporglue/TreeTrumpet/releases/tag/v0.1.4 and downloading treetrumpet.zip.


Michael Moore

On Wed, Sep 30, 2015 at 8:51 AM, Nigel Horne notifications@github.com wrote:

I don't get what you're talking about. I installed it using 'git clone' and I get errors in Apache's log when I try to access it.

There is no file "treetrumpet.zip" in the git repo that I can see.

— Reply to this email directly or view it on GitHub https://github.com/stuporglue/TreeTrumpet/issues/16#issuecomment-144407512 .

nigelhorne commented 8 years ago

Although I prefer to build things myself, because I can't get npm to work I thought it best to save time and download the treetrumpet.zip from the location you pointed to.

So I did that and copied my Gedom into family.ged and fired up my browser. Sadly I got no output. This is the error message in the apache log file:

11] PHP Fatal error: Uncaught exception 'Exception' with message 'Incorrect arguments to setSour' in /home/njh/public_html/treetrumpet/lib/3rdparty/php-gedcom/library/PhpGedcom/Record.php:53\nStack trace:\n#0 /home/njh/public_html/treetrumpet/lib/3rdparty/php-gedcom/library/PhpGedcom/Parser/SourRef.php(43): PhpGedcom\Record->__call('setSour', Array)\n#1 /home/njh/public_html/treetrumpet/lib/3rdparty/php-gedcom/library/PhpGedcom/Parser/SourRef.php(43): PhpGedcom\Record\SourRef->setSour(NULL)\n#2 /home/njh/public_html/treetrumpet/lib/3rdparty/php-gedcom/library/PhpGedcom/Parser/Indi/Even.php(86): PhpGedcom\Parser\SourRef::parse(Object(PhpGedcom\ParserSqlite))\n#3 /home/njh/public_html/treetrumpet/lib/3rdparty/php-gedcom/library/PhpGedcom/Parser/Indi.php(150): PhpGedcom\Parser\Indi\Even::parse(Object(PhpGedcom\ParserSqlite))\n#4 /home/njh/public_html/treetrumpet/lib/3rdparty/php-gedcom/library/PhpGedcom/Parser.php(273): PhpGedcom\Parser\Indi::parse(Object(PhpGedcom\ParserSqlite))\n#5 /home/njh/public_html/treetrumpet/lib/php-gedcom-custom/ in /home/njh/public_html/treetrumpet/lib/3rdparty/php-gedcom/library/PhpGedcom/Record.php on line 53