kalkun-sms / Kalkun

Open Source Web based SMS Manager
https://kalkun.sourceforge.io/
GNU General Public License v2.0
210 stars 131 forks source link

Distributed environment issue #508

Closed plawer closed 5 months ago

plawer commented 7 months ago

Raspberry OS x64 / Debian Linux 12 Nginx 1.22.1 / PHP 8.2.7

I am trying to install kalkun in a distributed environment. mariadb and gammu are up and running on two separate raspberry pi's. Gammu is communicating correctly with the mariadb server and the modem.

I am now trying to install kalkun on the third server, the web server. The db user has been created. The credentials have been added to the kalkun file. The db tables exist in the database from my previous 0.8.0-beta-3 installation. I have not updated anything in mariadb from the kalkun sql.

There is an install file in the folder. When I access http://webserver/kalkun/index.php/install/ I get a 404 error. http://webserver/kalkun/index.php returns a 500 error with the following message

Error:

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_URI::$config is deprecated

Filename: core/URI.php

Line Number: 102

Backtrace:

File: /var/www/html/kalkun/index.php Line: 315 Function: require_once A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property MY_Router::$uri is deprecated

Filename: core/Router.php

Line Number: 128

Backtrace:

File: /var/www/html/kalkun/index.php Line: 315 Function: require_once An uncaught Exception was encountered

Type: ErrorException

Message: Creation of dynamic property Kalkun::$benchmark is deprecated

Filename: /var/www/html/kalkun/vendor/codeigniter/framework/system/core/Controller.php

Line Number: 83

Backtrace:

File: /var/www/html/kalkun/application/core/MY_Controller.php Line: 32 Function: __construct

File: /var/www/html/kalkun/application/controllers/Kalkun.php Line: 30 Function: __construct

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

Steps performed before accessing the url:

cd ~ wget "https://github.com/kalkun-sms/Kalkun/releases/download/v0.8.2.1/Kalkun_v0.8.2.1_forPHP8.2.zip" unzip Kalkun_v0.8.2.1_forPHP8.2.zip rm Kalkun_v0.8.2.1_forPHP8.2.zip mv Kalkun_v0.8.2.1_forPHP8.2 kalkun

sudo mv kalkun /var/www/html cd /var/www/html/ sudo chown root:root kalkun cd kalkun

sudo nano application/config/database.php ( update db/user/pass)

php -r 'echo bin2hex(random_bytes(16)), "\n";'

sudo nano application/config/config.php ( update encryption_key) $config['encryption_key'] = hex2bin('xxxxxxxxx');

cd scripts sudo chmod +x daemon.php daemon.sh daemon.bat cd ..

composer update composer install

tenzap commented 7 months ago

you run php 8.2, codeigniter 3.1.13 still doesn't support it. You may want to have a look at the release notes https://github.com/kalkun-sms/Kalkun/wiki/Release-notes where this is explained. Either you patch your CI yourself with https://github.com/bcit-ci/CodeIgniter/pull/6173 or since you use Debian-based distrib follow https://github.com/kalkun-sms/Kalkun/wiki/Installation#Debian-and-related . There are also packages in Debian unstable if you prefer.

If you managed to fix your issue, please close it.

plawer commented 7 months ago

That just left me with this error

An uncaught Exception was encountered

Type: Error

Message: Cannot call constructor

Filename: /var/www/html/kalkun/application/core/MY_Model.php

Line Number: 26

Backtrace:

File: /var/www/html/kalkun/application/third_party/MX/Loader.php Line: 211 Function: model

File: /var/www/html/kalkun/application/third_party/MX/Loader.php Line: 236 Function: model

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

File: /var/www/html/kalkun/application/third_party/MX/Loader.php Line: 66 Function: initialize

File: /var/www/html/kalkun/application/core/MY_Controller.php Line: 32 Function: __construct

File: /var/www/html/kalkun/application/controllers/Kalkun.php Line: 30 Function: __construct

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

plawer commented 7 months ago

And trying to add the debian package gives this:

Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 362, in sys.exit(0 if addaptrepo.main() else 1) ^^^^^^^^^^^^^^^^^ File "/usr/bin/add-apt-repository", line 345, in main shortcut = handler(source, shortcut_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 40, in shortcut_handler return handler(shortcut, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 86, in init if self.lpppa.publish_debug_symbols: ^^^^^^^^^^ File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 126, in lpppa self._lpppa = self.lpteam.getPPAByName(name=self.ppaname) ^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 113, in lpteam self._lpteam = self.lp.people(self.teamname) ^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'people'

tenzap commented 6 months ago

File "/usr/bin/add-apt-repository", line 362, in

That's an issue with add-apt-repository.

tenzap commented 5 months ago

No update for about 2 months. Closing. Please reopen if you are still facing an issue.