Errors when using version 1.5 and PHP 8.1

I’m trying to install V1.5 on my ubuntu server running Apache2 with PHP V8.1.2. I’m getting this following errors when I first open up and run the index.php file on the server:

A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated

Filename: MX/Controller.php

Line Number: 47

Backtrace:

File: /var/www/html/application/third_party/MX/Controller.php
Line: 47
Function: str_replace

File: /var/www/html/application/core/Base_Controller.php
Line: 29
Function: __construct

File: /var/www/html/application/core/User_Controller.php
Line: 29
Function: __construct

File: /var/www/html/application/core/Admin_Controller.php
Line: 26
Function: __construct

File: /var/www/html/index.php
Line: 325
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated

Filename: MX/Loader.php

Line Number: 198

Backtrace:

File: /var/www/html/application/third_party/MX/Loader.php
Line: 198
Function: strtolower

File: /var/www/html/application/core/Base_Controller.php
Line: 45
Function: library

File: /var/www/html/application/core/User_Controller.php
Line: 29
Function: __construct

File: /var/www/html/application/core/Admin_Controller.php
Line: 26
Function: __construct

File: /var/www/html/index.php
Line: 325
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 132

Backtrace:

File: /var/www/html/application/third_party/MX/Loader.php
Line: 209
Function: _ci_load_library

File: /var/www/html/application/core/Base_Controller.php
Line: 45
Function: library

File: /var/www/html/application/core/User_Controller.php
Line: 29
Function: __construct

File: /var/www/html/application/core/Admin_Controller.php
Line: 26
Function: __construct

File: /var/www/html/index.php
Line: 325
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 294

Backtrace:

File: /var/www/html/application/third_party/MX/Loader.php
Line: 209
Function: _ci_load_library

File: /var/www/html/application/core/Base_Controller.php
Line: 45
Function: library

File: /var/www/html/application/core/User_Controller.php
Line: 29
Function: __construct

File: /var/www/html/application/core/Admin_Controller.php
Line: 26
Function: __construct

File: /var/www/html/index.php
Line: 325
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 168

Backtrace:

File: /var/www/html/application/third_party/MX/Loader.php
Line: 209
Function: _ci_load_library

File: /var/www/html/application/core/Base_Controller.php
Line: 45
Function: library

File: /var/www/html/application/core/User_Controller.php
Line: 29
Function: __construct

File: /var/www/html/application/core/Admin_Controller.php
Line: 26
Function: __construct

File: /var/www/html/index.php
Line: 325
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::write($session_id, $session_data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 237

Backtrace:

File: /var/www/html/application/third_party/MX/Loader.php
Line: 209
Function: _ci_load_library

File: /var/www/html/application/core/Base_Controller.php
Line: 45
Function: library

File: /var/www/html/application/core/User_Controller.php
Line: 29
Function: __construct

File: /var/www/html/application/core/Admin_Controller.php
Line: 26
Function: __construct

File: /var/www/html/index.php
Line: 325
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::destroy($session_id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 317

Backtrace:

File: /var/www/html/application/third_party/MX/Loader.php
Line: 209
Function: _ci_load_library

File: /var/www/html/application/core/Base_Controller.php
Line: 45
Function: library

File: /var/www/html/application/core/User_Controller.php
Line: 29
Function: __construct

File: /var/www/html/application/core/Admin_Controller.php
Line: 26
Function: __construct

File: /var/www/html/index.php
Line: 325
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 358

Backtrace:

File: /var/www/html/application/third_party/MX/Loader.php
Line: 209
Function: _ci_load_library

File: /var/www/html/application/core/Base_Controller.php
Line: 45
Function: library

File: /var/www/html/application/core/User_Controller.php
Line: 29
Function: __construct

File: /var/www/html/application/core/Admin_Controller.php
Line: 26
Function: __construct

File: /var/www/html/index.php
Line: 325
Function: require_once

Is there something I am missing in installation? it seems that there are deprecated calls happening with the third party MX.

Any help would be greatly appreciated.

Hi there,

Welcome.
I had to change the title a bit, because more users will run into this problem.

Invoiceplane version 1.5 is not compatible with PHP 8.1.
Try the Beta of version 1.6.

Is it the same procedure to install 1.6 as it is 1.5? does it use the same PHP plugin etc?

Thank you in advance.

I don’t understand the question.
For InvoicePlane v1.6 you just copy the files from the .zip on the site or on github over the files of version 1.5.
After that you need to go to /setup to upgrade the database.

Is that what you meant?

There are some extra things that you need to do after that though.

Hopefully this weekend we’ll release the real 1.6 and it will show some documentation with it on the site.

Either docs.invoiceplane.com or wiki.invoiceplane.com will have that documentation

That’s what I meant.
Thank you!

1 Like

Perfect!
So, when you go from 1.5 to 1.6 there are a couple of extra steps.
Keep an eye on the documentation site, right before you make your move.

When you run into anything, just howler.
We’re here and we’re also on slack, to help.

2 Likes

This topic was automatically closed after 14 days. New replies are no longer allowed.