- Status Closed
- Percent Complete
- Task Type Bug Report
- Category Backend/Core
- Assigned To No-one
- Operating System All
- Severity Medium
- Priority Very Low
- Reported Version 1.0-beta
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#2088 - Error when trying to add task with dokuwiki
Steps to reproduce:
- install Flyspray 1.0 beta 2 on Turnkey Linux LAMP Stack 14.0 - this is Debian 8 (Jessie), PHP Version 5.6.13-0+deb8u1, see attached phpinfo.htm
- run Flyspray setup by navigating to Flyspray install dir in browser
- manually run curl / composer as suggested by setup
- set write permissions on attachments, cache, and newly created empty flyspray.conf.php
- allow FS to create new DB (”flyspraytest”)
- rename setup dir at end of setup
- navigate to Flyspray install dir in browser
- click “add new task”
- enter summary and description
- click “add this task”
Observed behavior:
Empty web page except for the following output, and task is not created:
Fatal error: Cannot redeclare class DokuHTTPClient in /var/www/flyspray-1.0-beta.2/plugins/dokuwiki/inc/HTTPClient.php on line 20 Call Stack: 0.0000 276512 1. {main}() /var/www/flyspray-1.0-beta.2/index.php:0 0.0067 1874152 2. require_once('/var/www/flyspray-1.0-beta.2/scripts/details.php') /var/www/flyspray-1.0-beta.2/index.php:194 0.0109 1947272 3. TextFormatter::render() /var/www/flyspray-1.0-beta.2/scripts/details.php:145 0.0109 1948656 4. call_user_func:{/var/www/flyspray-1.0-beta.2/includes/class.tpl.php:687}() /var/www/flyspray-1.0-beta.2/includes/class.tpl.php:687 0.0109 1949040 5. dokuwiki_TextFormatter::render() /var/www/flyspray-1.0-beta.2/includes/class.tpl.php:687 0.0112 2223680 6. require_once('/var/www/flyspray-1.0-beta.2/plugins/dokuwiki/inc/common.php') /var/www/flyspray-1.0-beta.2/plugins/dokuwiki/dokuwiki_formattext.inc.php:17 0.0113 2248136 7. require_once('/var/www/flyspray-1.0-beta.2/plugins/dokuwiki/inc/io.php') /var/www/flyspray-1.0-beta.2/plugins/dokuwiki/inc/common.php:11 0.0113 2285584 8. require_once('/var/www/flyspray-1.0-beta.2/plugins/dokuwiki/inc/HTTPClient.php') /var/www/flyspray-1.0-beta.2/plugins/dokuwiki/inc/io.php:11
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
At the moment I can't reproduce the error on opensuse13.2 local install. (php5.6.1, yast minimal install + apache2 + php-openssl + php-phar + php-mysql + php-pgsgl packages)
In your attached phpinfo.htm there is _COOKIE["shellInABox"], but no "flyspray"-cookie. This is a hint that it is from an older flyspray version. (?!)
Or you didn't run phpinfo(); from the flyspray-1.0-beta.2/ -dir?
I made some changes to make the composer steps working with flyspray webinstall with more server environments but needs more testing.
I'm using Flyspray 1.0 beta 2 from:
https://github.com/Flyspray/flyspray/archive/v1.0-beta.2.zip
I've attached phpinfo2.htm, this time executed from the flyspray-1.0-beta.2 directory, after having run Flyspray in that browser session. Note that the server automatically updated itself from PHP 5.6.13 to 5.6.14 since the last phpinfo I sent.
I edited HTTPClient.php and moved the DokuHTTPClient class to the end of the file, after HTTPClient, and that seems to have solved the problem. I don't understand why, though.
I have a slightly idea what could happens there:
Lets have a file HTTPClient.php:
And a script test.php:
When I call it on the command line 'php test.php' I get:
What happened here probably: The autoloader tries to include the file HTTPClient a second time when the code is at class DokuHTTPClient, it does not know what HTTPClient is and the autoload kicks in..
Did you referenced some external files or something like that in the description or doesn't it happened with also simple text description?
But I haven't an explanation yet why I can't reproduce it with flyspray yet. Some config must be different..
The summary and description I entered were both just simple text like ajksdflj. I tried to keep the test as minimal as possible to reproduce the error.
It looks to me like the PHP docs say you're supposed to declare a parent class before a child class that extends it. But I'm not sure why using the wrong order works in some environments but not others, or if it's not wrong because there's some nuance to the order requirement that I'm not aware of.
http://php.net/manual/en/language.oop5.inheritance.php
http://php.net/manual/en/keyword.extends.php
The switch of classes in plugins/dokuwiki/inc/HTTPClient.php is now merged to Flyspray 1.0-rc7 dev master.
Couldn’t reproduce yet, but lets follow PHP documentation.
https://github.com/Flyspray/flyspray/commit/6a199f8414f4ff8a52f1922dfc2217f6697295dc