Web based family history software

Question MyPage times out on copied system [Solved php conf

  • Cameron
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago - 10 years 11 months ago #1 by Cameron
This one has me completely flummoxed and I'd appreciate it if anyone has hints about where to look or what I've done wrong.

I run webtrees on a local Linux server and my wife likes to refer to it when away somewhere with no internet access.

As I did with phpGedView before, I have made a local copy on the windows-7 laptop (with the understanding that any changes will not be transferred back to the server).
The process was:
  • copyiing the web pages and media files,
  • dump and restore the mysql database
  • I could not find any config setting to adjust (mysql users and pwds were the same)
  • cleaned up the cache dir
Both systems run php 5.3.x and Apache 2.2.x. Mysql is 5.5 on the win-7 PC and 5.1 on the server.
In fact the server has been upgraded from 32-bit 5.0 to 64-bit 5.1 since the transfer. I redid the sql transfer but the results were the same.

The DB is based on two gedcoms, one of which is the working version and the other is a static copy created by a relative.
The only users were my wife and I.

When either of us initially logged in we were taken straight to the admin page, where everything worked as expected.
As soon as we selected "My Page", the system would think for a bit and then give up. Internet Explorer gave the typical useless message "cannot display the webpage", and Firefox say "the connection was reset".
Sniffing the traffic shows that the tcp connection is established, the GET request goes to the server, but after about 3 seconds a TCP reset is returned.
There is no record in the apache access.log, but there are entries for the child threads starting and finishing (apache log level set to info).
There is no message in the webtrees log.

I can create a new dummy tree, make it default and connect to "My Page" properly.
I can default to the other existing tree (not our working one) and connect fine.
I just cannot switch to our working tree without it disconnecting me. This seems to be independent of whatever privacy settings I apply.

I can create a new user, who can access the main tree, appropriately to the privacy settings.
I can create a user with properties matching mine as closely as I can (except email) and that user has no problems.

I have done the usual clearing of cookies and caches to no avail.
The problem occurs connecting via localhost or from another PC over the lan, so that is 4 browsers on 2 PCs that behave the same.

webtrees running on private Linux server: Debian 10; Apache 2.4; PHP 7.3; MariaDB 10.3
Last edit: 10 years 11 months ago by Cameron. Reason: edit heading

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago - 10 years 11 months ago #2 by Jackie
Replied by Jackie on topic MyPage times out on copied system.
Hi,

Cameroun
I could not find any config setting ..


The config.ini.php is located in the /data folder. It contains the connection information to the server. Did you change the path of your server online by the path of your local server?

Example of connection information on Wamp installed on local computer Windows 7 - 64 bits:
Code:
; <?php exit; ?> DO NOT DELETE THIS LINE dbhost="localhost" dbport="3306" dbuser="root" dbpass="" dbname="abcdwt" tblpfx="wt_"
Last edit: 10 years 11 months ago by Jackie.

Please Log in or Create an account to join the conversation.

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
10 years 11 months ago #3 by ToyGuy
Replied by ToyGuy on topic MyPage times out on copied system.
That was a lot of work to go through, if you didn't need nor desire to maintain a mirror image with users, etc.

Simply do a MAMP, XAMMP, LAMMP type installation of the server/SQL/PHP combination, install webtrees as a fresh installation, create the user/users you need for external-only access and use an exported version of your master family tree (GEDCOM) to populate the newly-installed webtrees.

Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #4 by makitso
Replied by makitso on topic MyPage times out on copied system.

When either of us initially logged in we were taken straight to the admin page, where everything worked as expected.


So, the problem is that your trying to log into to webtrees on the win7 machine and get the problem or your trying to log into webtrees on the linux server and get the problem or what?

Do you have a localhost entry in the hosts file? Is it set correctly for both systems?

Do you get the same problem if your local on the win7 system and enter webtrees from that system?

Rob
www.skatekey.net ( webtrees 2.1 beta GitHub)
webtrees forum admin
PHP 8.1.21
Hosted at tigertech.net

Please Log in or Create an account to join the conversation.

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
10 years 11 months ago #5 by ToyGuy
Replied by ToyGuy on topic MyPage times out on copied system.
Straight to the admin page usually means it doesn't recognized having a GEDCOM imported. You must have created a family tree.

Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

  • Cameron
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago - 10 years 11 months ago #6 by Cameron
Replied by Cameron on topic MyPage times out on copied system.

Jackie wrote: Hi,
The config.ini.php is located in the /data folder.

What I meant was that I have arranged it so that all the values are the same on both systems.


makitso wrote: So, the problem is that your trying to log into to webtrees on the win7 machine and get the problem or your trying to log into webtrees on the linux server and get the problem or what?

I have two completely separate installations, one on the home's linux server, one on the laptop.
Initially the laptop was only configured for web access to localhost, but after a tussle with the win-7 firewall, I can access both systems from any machine on our lan.

webtrees running on private Linux server: Debian 10; Apache 2.4; PHP 7.3; MariaDB 10.3
Last edit: 10 years 11 months ago by Cameron. Reason: tidy the layout

Please Log in or Create an account to join the conversation.

  • Cameron
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #7 by Cameron
Replied by Cameron on topic MyPage times out on copied system.

ToyGuy wrote: That was a lot of work to go through, if you didn't need nor desire to maintain a mirror image with users, etc.

Simply do a MAMP, XAMMP, LAMMP type installation of the server/SQL/PHP combination, install webtrees as a fresh installation, create the user/users you need for external-only access and use an exported version of your master family tree (GEDCOM) to populate the newly-installed webtrees.


I already had the windows WAMP system in place for other reasons. Dumping and restoring a mysql DB should be easier than going via the gedcom.

ToyGuy wrote: Straight to the admin page usually means it doesn't recognized having a GEDCOM imported. You must have created a family tree.

I don't understand the significance of this. They were originally gedcoms imported into phpGedView, and imported into webtrees from the pgv database in v1.3.1.
I had thought that webtrees was moving away from the close ties with gedcoms. I will try it and see what happens (when the laptop comes home again).

The dump of the imported webtrees DB compares almost exactly with the exported Linux version, the only difference being the session table and some extra log entries. The initial sessions should not have matched, because client IP addresses were different, but it is something I will need to be careful of.

The implication is that there is something else in the DB that is system-specific. But I can't find it.
Or there was something missing in the way I dumped the DB contents.

What is more a worry is that I was considering virtualising some of my system and moving webtrees to a different server.

And further tests have shown that the difference between old and new users is not quite as clear-cut as I had thought.
There are gaps in what the new users can see. Browsing to some individuals (clicking randomly on people in the family navigator area) can also cause the page reset to occur. And the search box gives a reset as well.

webtrees running on private Linux server: Debian 10; Apache 2.4; PHP 7.3; MariaDB 10.3

Please Log in or Create an account to join the conversation.

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
10 years 11 months ago #8 by ToyGuy
Replied by ToyGuy on topic MyPage times out on copied system.
Cameron
I have often dumped a webtrees DB and installed on another machine, usually for other admins experiencing problems with export or in need of assistance on place hierarchy or other errors. Usually similar systems (MAC) and OS, as well as webtrees versions always the same. When going across other platforms, I've usually just accepted a GEDCOM file to import (a webtrees download or export), and imported it into a virgin setup. In those cases, versions of SQL and PHP are not relevant to the results. If I wished a non-internet-active duplicate, I'd just import the family tree as a webtrees installation is so easy as a virgin, and not so easy as moved.

Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

  • Cameron
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #9 by Cameron
Replied by Cameron on topic MyPage times out on copied system.
Thanks Tony,
I have occasionally migrated DBs both ways between Windows and Linux, with no problems apart from some upper/lower case table names issues.
I can see no such problems here, so I'm still as baffled as before.

webtrees running on private Linux server: Debian 10; Apache 2.4; PHP 7.3; MariaDB 10.3

Please Log in or Create an account to join the conversation.

  • Cameron
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #10 by Cameron
Replied by Cameron on topic MyPage times out on copied system.
OK, finally getting somewhere. Importing the gedcom file failed spectacularly, hanging at 35% import and leaving a completely corrupted database, where the tree was listed, but I could do nothing with it (the import, delete, etc links were missing).

However, I did identify the cause, which was an individual with a very large entry. By manually trimming the one gedcom entry I have been able to get a working system.

This seems to expose a bug that affects the code only under Windows.

The invidividual's full entry in the wt_individuals.i_gedcom column is 270kB in size, and a similar number of characters. The table data type is mediumtext, which allows for 16MB, so it is nowhere near that limit.

I tried bumping the php memory limit from 128MB to 256MB but that did not help.

With the fully imported database, the "connection reset" coincides with that individual appearing somewhere on the page being prepared. In the case of the original users, he was included in the favourites, hence was referenced when constructing the main page.
For the other users, it crashed while preparing any page that provided a link to that individual - for example: any near relatives, or a list of people with that surname.

Should I file this as a bug report in launchpad?

webtrees running on private Linux server: Debian 10; Apache 2.4; PHP 7.3; MariaDB 10.3

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #11 by fisharebest
Replied by fisharebest on topic MyPage times out on copied system.

where the tree was listed, but I could do nothing with it


To recover this, empty the wt_gedcom_chunk table.

I tried bumping the php memory limit from 128MB to 256MB but that did not help.


MySQL has a setting called "max_allowed_packet". The default value is 1MB. You cannot execute any query that contains more than this number of characters. If you try, MySQL will simply close the connection, and you'll get one of the cryptic "MySQL server has gone away" errors.

So, attempting to import a record larger than this will fail. From your description, this would seem to be a likely explanation.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
10 years 11 months ago #12 by ToyGuy
Replied by ToyGuy on topic MyPage times out on copied system.
Cameron
I doubt it was the content, but rather perhaps some bad data or links. I can't think of anything that would cause a windows only problem.
Have you tried to reenter that data? or import a new tree with just that person and then merge between trees?

Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #13 by kiwi
Replied by kiwi on topic MyPage times out on copied system.
Cameron, your problem sounds a lot like one I have experienced a couple of times. My experience is only with GEDCOM imports though, as like Stephen I see little benefit in complex DB transfers when a simple GEDOCM import works easier on a local system copy.

The problem is specific to Windows, which is why you don't see it on a Unix server. It is best explained in this article:

stackoverflow.com/questions/7620910/rege...urning-browser-error

The fix I use is to change the setting for "pcre.backtrack_limit" to a very low 524 in php.ini

Please Log in or Create an account to join the conversation.

  • Cameron
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #14 by Cameron
Replied by Cameron on topic MyPage times out on copied system. [Solved]

kiwi wrote: ...The problem is specific to Windows, which is why you don't see it on a Unix server. It is best explained in this article:

stackoverflow.com/questions/7620910/rege...urning-browser-error


Nail on the head, Kiwi. Thank you so much.

Well, not quite dead-centre. The variable in question is pcre.recursion_limit, according to the thread you linked.
And changing it to 500 got rid of the ged import failure as well as the problems with mysql import.

Sysinternal's VMMap confirmed that each apache thread has a 256kB stack. It is a pity that php cannot be compiled with sensible defaults. The Linux version also has recursion limit about 6 times too high for its 8MB stack.

There is still something rather odd about it. When webtrees searches or displays the individual's information, the tail end is missing.
However, the full record is present when exported to GED file. I guess it might be using pcre to parse the individual gedcom field and giving up when it runs out of stack space. Well, now it hits the recursion limit instead of causing a stack overflow.

webtrees running on private Linux server: Debian 10; Apache 2.4; PHP 7.3; MariaDB 10.3

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}