ona icon indicating copy to clipboard operation
ona copied to clipboard

Apache2 error on Ubuntu 21.10

Open OneTrueDash opened this issue 3 years ago • 3 comments

Getting this in the Apache error.log on every failed attempt to connect via browser:

[Fri Feb 04 11:41:54.558277 2022] [php:error] [pid 16772] [client ::1:42680] PHP Fatal error: Uncaught ArgumentCountError: parse_str() expects exactly 2 arguments, 1 given in /opt/ona/www/config/config.inc.php:33\nStack trace:\n#0 /opt/ona/www/config/config.inc.php(33): parse_str()\n#1 /opt/ona/www/index.php(7): require_once('...')\n#2 {main}\n thrown in /opt/ona/www/config/config.inc.php on line 33

OneTrueDash avatar Feb 04 '22 16:02 OneTrueDash

I was able to bypass this error to get to the welcome screen:

// Get any query info parse_str($_SERVER['QUERY_STRING'], $output);

Per this link, the second parameter is no longer optional in php8.0

https://www.php.net/manual/en/function.parse-str.php

OneTrueDash avatar Feb 04 '22 17:02 OneTrueDash

And now this when connecting to the database:

PHP Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /opt/ona/www/include/adodb5/drivers/adodb-mysqli.inc.php on line 124 PHP Warning: Undefined variable $status in /opt/ona/install/installcli.php on line 429

OneTrueDash avatar Feb 04 '22 17:02 OneTrueDash

Looks like there will probably be a few things that ONA does not conform to the new php8 requirements.. I have not yet gone through the code to update it for php8. It should work with ~7.5 versions.

Additionally, if you should use the development branch version for now as it has some updates to bring it more compatible with newer systems.

I hope to be refreshing ONA to work with these newer versions of PHP in the near future (aka 22.04)

mattpascoe avatar Feb 06 '22 02:02 mattpascoe

Should now be fixed in v19.0.0

mattpascoe avatar May 30 '23 05:05 mattpascoe