Flyspray - The bug killer!

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Installer and Upgrader
  • Assigned To No-one
  • Operating System Linux
  • Severity Medium
  • Priority Low
  • Reported Version 1.0-rc
  • Due in Version 1.0
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Flyspray - The bug killer!
Opened by gschwepp - 03.08.2016
Last edited by peterdd - 15.07.2018

FS#2189 - undefined constant ADODB_ASSOC_CASE_NATIVE Warning: Headers already send

I try to install flyspray-1.0-rc1 on a shared hoster (all-inkl.com).

Apache
PHP 5.3.28 note by peterdd: php version can be switched on all-inkl.com settings per subdomain from 5.2, 5.3,5.4, 5.5, 5.6 up to 7.0

MYSQL 5.3.28 note by peterdd: not mysqlnd 5.0.12-dev as phpinfo told from all-inkl.com???

During & after installation (or updating) i get the following error:

Use of undefined constant ADODB_ASSOC_CASE_NATIVE - assumed 'ADODB_ASSOC_CASE_NATIVE' in /www/htdocs/[userid]/flyspray/vendor/adodb/adodb-php/adodb.inc.php on line 3818
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/[userid]/flyspray/vendor/adodb/adodb-php/adodb.inc.php:4642) in /www/htdocs/[userid]/flyspray/includes/class.flyspray.php on line 835
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/[userid]/flyspray/vendor/adodb/adodb-php/adodb.inc.php:4642) in /www/htdocs/[userid]/flyspray/includes/class.flyspray.php on line 835
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/[userid]/flyspray/vendor/adodb/adodb-php/adodb.inc.php:4642) in /www/htdocs/[userid]/flyspray/includes/class.flyspray.php on line 835
Headers are already sent, this should not have happened. Please inform Flyspray developers.

The part before the last sentence is repeated numerous time. Sometimes the tracker is shown partially below the error message.

Cheers

Closed by  peterdd
15.07.2018 16:22
Reason for closing:  Complete
Additional comments about closing:  

only very old php versions and later ADOdb versions removed references to old ADOdb php extension

Project Manager
peterdd commented on 03.08.2016 14:25

Assuming ADOdb 5.20.4 of Flyspray 1.0-RC1 zipfile with included 3rd libraries:

Mmh, constant ADODB_ASSOC_CASE_NATIVE is defined in vendor/adodb/adodb-php/adodb.inc.php line 138:

define('ADODB_ASSOC_CASE_NATIVE', 2);

The only cases this line is not run if the condiftion in line 91

if (!$ADODB_EXTENSION || ADODB_EXTENSION < 4.0) {

failed.

So maybe $ADODB_EXTENSION is set by all-inkl.com hosting environment and so that part of adodb.inc.php is never run? (line 92 - 163 of adodb.inc.php)
And all-inkl.com uses an older ADODB extension by default?

Could you please verify by putting

echo PHP_VERSION.'<pre>'; print_r($GLOBALS);die('</pre>');

at start of setup/index.php or
at start of vendor/adodb/adodb-php/adodb.inc.php
so we can find out if a variable ADODB_EXTENSION is set?

Netherless I would see this as bug of ADOdb under some hosting circumstances, but first lets verify it.

gschwepp commented on 04.08.2016 06:48

I used the zipfile without 3rd libraries.

https://github.com/Flyspray/flyspray/archive/v1.0-rc1.zip

As far as I can tell composer was installed during the installation without any error-notification. (I do not have shell access to the server).

ADODB_EXTENSION is not set. I pasted the code and searched for pattern, with no result.

Project Manager
peterdd commented on 05.08.2016 21:25

Could you please retry with the release for php5.3 with the included 3rd party libs?

http://flyspray.org/packed/flyspray-1.0-rc1_php53.tgz

gschwepp commented on 06.08.2016 11:34

Hi,

I removed the old installation, cleaned the database and installed the package you linked.

It triggers the same error. I attach the full error message in a file.

Project Manager
peterdd commented on 07.08.2016 21:36

I created a testaccount on https://all-inkl.com and tried to install Flyspray there.

They use ADOdb 5.0.4 (released 2008 - 8 year old) for php5.3, php5.4, php5.5, php5.6

But netherless what version of ADOdb they provide by default as enabled extension, Flyspray should use its own uptodate version of ADOdb.

Curiously the warnings show the lines from Flysprays vendor directory. But maybe it is done by PHP after the warning is raised?

Possible solutions:

  • Tell all-inkl.com they should update their ADOdb extension to current 5.20.4 version. This is only a solution for your case, but not generic and future proof. (If there is a bug found and fixed in ADOdb after 5.20.4 and future Flyspray releases comes with fresh ADOdb 5.20.5+ then you need to nag all-inkl.com again.)
  • Find a way to disable that ADOdb 5.0.4 extension, either by hosting settings or within Flyspray code, so Flyspray only uses its own ADOdb 5.20.4 (needs research how to do, I do not know yet.) And if possible, a way that is quite generic and not too weired..
  • all-inkl.com provides Mantis as one of the selectable software for quick install. Mantis uses ADOdb too. I installed Mantis there and it seems their Mantis uses ADOdb 5.10 which do not have the ASSOC constants defined in adodb.inc.php. (the code is commented out, maybe all-inkl.com modified it to have it working there?) So, ask all-inkl.com to add Flyspray to their list of software and win them as partner/supporter of Flyspray? :-)

Project Manager
peterdd commented on 08.08.2016 02:25

using a script

<?php print_r(get_defined_constants(true)); ?>

outputs this:

...
 [ADOdb] => Array
        (
            [ADODB_EXTENSION] => 5.04
            [ADODB_FETCH_DEFAULT] => 0
            [ADODB_FETCH_NUM] => 1
            [ADODB_FETCH_ASSOC] => 2
            [ADODB_FETCH_BOTH] => 3
            [ADODB_PHPVER] => 21920
            [TIMESTAMP_FIRST_YEAR] => 100
            [ADODB_PREFETCH_ROWS] => 10
            [ADODB_TABLE_REGEX] => ([]0-9a-z_\`\.\@\[-]*)
            [ADODB_BAD_RS] => 

Bad $rs in %s. Connection or SQL invalid. Try using $connection->debug=true;

        )
...

So we have now evidence that a constant ADODB_EXTENSION is defined before php runs our own code.

Project Manager
peterdd commented on 08.08.2016 03:19

Experiment:

As php7 is the only php version on all-inkl.com without included adodb as extension, I set the php version to php7 in all-inkl admin for a subdomain on the test account and installed flyspray using the http://flyspray.org/packed/flyspray-1.0-rc1_php56.tgz

There were some Notice warnings on the first setup screen, but then the webinstall was quite smooth. not tested any further yet.

Flyspray wasn't yet tested on php7 at all yet, but let's start supporting it too..

Project Manager
peterdd commented on 15.08.2016 21:00

I mailed all-inkl.com and opened issue in ADOdb issue tracker:
https://github.com/ADOdb/ADOdb/issues/269

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing