Closed mogilka closed 2 years ago
can you please share the result of getWebhookInfo
method or error_log
btw i see your code and find that your $text
variable is empty so nothing will be send to user.
Hi @mogilka, the output is correct, because print_r
needs a second parameter to return the actual value.
Try with:
TelegramLog::debug(print_r($telegram->getCommandsPaths(), true));
Also, as @OxMohsen mentioned, you need to add some text to a message.
Hi @mogilka, the output is correct, because
print_r
needs a second parameter to return the actual value.Try with:
TelegramLog::debug(print_r($telegram->getCommandsPaths(), true));
Also, as @OxMohsen mentioned, you need to add some text to a message.
you're right, thank you. Now I see that commands_paths contains my folder and SystemCommands folder. I tried to send unempty message but nothing happens anyway
can you please share the result of
getWebhookInfo
method orerror_log
btw i see your code and find that your$text
variable is empty so nothing will be send to user.
Sending unempty message doesn't work too. Error.log is empty unfortunately. Here is WebhookInfo output:
[2022-05-12T08:10:23.391332+00:00] zvezdo_bot.DEBUG: {"ok":true,"result":{"url":"https:\/\/zvezdochet.guru\/ru\/bot\/hook","has_custom_certificate":false,"pending_update_count":19,"last_error_date":1652342962,"last_error_message":"Wrong response from the webhook: 500 Internal Server Error","max_connections":40,"ip_address":"---.---.---.75"}} [] []
It means Telegram bot limit expired?
There is an error with your server setup: 500 Internal Server
Check the error log of your webserver.
What version of PHP and the bot are you using? It may have to do with missing PHP extensions.
@noplanman Okey, everything worked today after some errors fixed. All of them occurred after big php-telegram-bot updating (I don't remember when I did it last time before April 2022):
2022/05/13 07:59:04 [error] PHP Fatal error: Declaration of Longman\TelegramBot\Commands\UserCommands\HelpCommand::execute() must be compatible with Longman\TelegramBot\Commands\Command::execute()
[MySQL: Error Code: 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB]
The reason for this is not very clear to me but I fixed it by setting some variables in MySQL config. After this I tested my bot commands and they was executed successfully
Answering your questions about PHP version:
~$ php -v PHP 7.4.28 (cli) (built: Feb 17 2022 16:17:19) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
Thanks to all
Hello, please help. My Start command stopped working a month ago. In the beginning of April I've upgraded OS server successfully and I've updated your php-telegram-bot (source code and DB). Everything looks to be working fine, but commands. I've checked everything but I can't find the error
Here is my start command:
My hook:
Before handle I set commands path and check it - via this line:
TelegramLog::debug(print_r($telegram->getCommandsPaths()));
But in the debug.log I see a message:
[2022-05-11T09:44:26.745532+00:00] zvezdo_bot.DEBUG: 1 [] []
It means that commands path haven't set. But why? What's wrong and how to fix it?