Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.5 - Submitting form (edit_interface.php) results in page loading error #33

Closed
magicsunday opened this issue Nov 11, 2013 · 8 comments
Closed

Comments

@magicsunday
Copy link
Contributor

After I submit the edit_interface.php form using webtrees 1.5 the page fails to load, displaying the browser error message: Connection aborted.

No problems with version 1.4.4

@fisharebest
Copy link
Owner

edit_interface.php is used for many different types of editing. It appears to work OK on the demo site - http://dev.webtrees.net/demo-stable/

Unless I can see the problem, it is difficult to make suggestions.

@fisharebest
Copy link
Owner

Do you still see this problem?

If yes - which form?

@magicsunday
Copy link
Contributor Author

In WT_Filter::_inputArray the PHP 5.3 shorthand form of the ternary operator ?: is used.

return $tmp[$variable] ?: array();

Although my QNAP NAS is running PHP 5.3.26, it seems to fail to resolve the expression. I dont know why. Inside my Development-VM I run PHP 5.3.8 without throwing any errors. If I replace it with the default syntax, in my eyes also much more easier to read.

return isset($tmp[$variable]) ? $tmp[$variable] : array();

The error went away.

WT_Filter seems to be the only place where the shorthand form of the operator is used (My search founds 6 matches). Maybe those affected lines could be replaced with the normal syntax?

@fisharebest
Copy link
Owner

I don't think the "?:" is the problem (and you don't supply the actual PHP error message).

More likely, $tmp[$variable] is not set (failed validation??), and you are seeing an error for this.

Perhaps $default needs to be array() rather than null ?

@magicsunday
Copy link
Contributor Author

There is actual no PHP error message as the server connection gets lost. Problem still exists after changing $default to an array(). $tmp[$varialbe] is also set. Only changing to the long hand version of the ternary operator resolves the problem.

@fisharebest
Copy link
Owner

Can you create a test for this in isolation? e.g.

<?php echo 1 ?: 2;

@magicsunday
Copy link
Contributor Author

After loading the testpage for the first time the result 1 is displayed. After reloading the page for several times, that the error occurs from time to time (3 success, 1 error and so on).

Seems to be a bug in QNAP php version. But there is currently no way to upgrade to a newer version without compiling it by myself.

@fisharebest
Copy link
Owner

I have finally gained access to a QNAP to investigate this problem...

It appears to be a bug in the eAccelerator module. Disabling this module fixes the problem.

bxbroze pushed a commit to bxbroze/webtrees that referenced this issue Jan 16, 2016
@ricklach ricklach mentioned this issue Jul 11, 2019
This was referenced Aug 25, 2019
@makitso makitso mentioned this issue Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants