kalkun-sms/Kalkun

Error on daemon.php with file_get_contents

Closed this issue · 14 comments

Describe the bug
When receiving message, daemon starts ok, but it throws out following error:
Sat 2022/07/30 15:55:38 gammu-smsd[4934]: Subprocess output: PHP Warning: file_get_contents(http://localhost/kalkun/index.php/daemon/message_routine/): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error
in /var/www/html/kalkun/scripts/daemon.php on line 11

this causes messages that are not shown in kalkun. Sending messages is working fine

Browser, kalkun setup, database setup..:
Please open the "about" screen of kalkun and copy/paste the information.
To open the about screen, go to the dashboard and at the bottom right click on the version of kalkun, right after "Powered by..."

  • Kalkun version:
  • Operating system:
  • PHP Version: 7.0
  • DB Backend: mysql
  • Gammu version & DB Schema: Gammu 1.42.0, Linux, kernel 5.15.0-43-generic (#46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022), GCC 11.2 && Gammu DB schema: 17
  • Browser: any
  • Installed plugins: none

Additional context
installed on lubuntu, apache2, php7.0
in htaccess CI_ENV is set to development

Please copy/paste content of 'about'.

How did you install? With Debian packages ? If not, Did you run composer?

Check config again at https://github.com/kalkun-sms/Kalkun/wiki/Installation

You might want to check your Apache logs too

Hi,

it was installed by extracting the tar.gz in /var/www/html and then logged in and installed it though GUI.
It was configured with instructions on https://github.com/kalkun-sms/Kalkun/wiki/Installation
I could not get it installed through composer

You might want to check your Apache logs too

apache also shows only error 500

Composer is to download the libraries required by kalkun, not to install kalkun. Did you run 'composer install' in the kalkun dir?

Please copy paste the about screen. Kalkun version is missing among other things

When I run composer install and then composer update --no-dev I get:
file_put_contents(./composer.lock): Failed to open stream: Permsion denied

I guess this has to be run as root.

At least with a user having proper permission

IIRC the 2nd command is only if you prepare a package for use on a foreign system with a different PHP version than the one you run composer on.

It was an error on my side in configuring PHP, thank you for your support! Now everything works fine...

P.S. if we could get more detailed instructions to install with Debian packages it will be great, I'm not that good with github, and in my opinion this will greatly help everyone if this is explained step by step (this step was problematic for me: click on the header of the 1st workflow to get the most recent)

Thanks for the follow up.

Maybe you can describe your solution? It could benefit those facing a similar issue in future.

Thanks for your suggestion. Will try to see how to improve this. It is indeed difficult to find. Btw the Debian bundle is also available on the release download page.

If you have an idea to improve Debian install instructions, don't hesitate updating the wiki.

@SasaB14 Do you recall what your solution was? I installed the same way you did and still getting the same errors. Cannot for the life of me figure it out

@Kieranwest unfortunately no, if I remember correctly I've started everything from the beginning... I've then gone through every step as careful as I can... Sorry that I'm not more helpful :(