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

Error on daemon.php with file_get_contents #474

Closed SasaB14 closed 1 year ago

SasaB14 commented 1 year ago

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..."

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

tenzap commented 1 year ago

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

tenzap commented 1 year ago

You might want to check your Apache logs too

SasaB14 commented 1 year ago

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

SasaB14 commented 1 year ago

You might want to check your Apache logs too

apache also shows only error 500

tenzap commented 1 year ago

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

SasaB14 commented 1 year ago

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

tenzap commented 1 year ago

I guess this has to be run as root.

tenzap commented 1 year ago

At least with a user having proper permission

tenzap commented 1 year ago

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.

SasaB14 commented 1 year ago

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)

tenzap commented 1 year ago

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.

tenzap commented 1 year ago

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

Kieranwest commented 1 year ago

@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

SasaB14 commented 1 year ago

@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 :(