Core: Base table or view not found

Created on 7 Apr 2017  路  5Comments  路  Source: php-telegram-bot/core

Required Information

  • PHP version: 7.10
  • PHP Telegram Bot version: 0.41.0
  • Using MySQL database: yes
  • Update Method: getUpdates
  • Self-signed certificate: no
  • RAW update (if available):

Expected behaviour

Actual behaviour


I followed all the steps for getUpdate method, also I execute unset.php to disable webhook. And I get this into terminal when I execute `./getUpdatesCli.php

PHP Warning: PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.telegram_update' doesn't exist in /home/ismael/thinkingsize_development/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 199 2017-04-07 09:26:42 - Processed 0 updates%

Steps to reproduce


I used getUpdatesCli from the examples folder of this repository, I only change api key and bot name.

Extra details


[2017-04-07 09:26:42] bot_log.DEBUG: Verbose HTTP Request output: <POST https://api.telegram.org/****getUpdates> [CONNECT] <POST https://api.telegram.org/****/getUpdates> [MIME_TYPE_IS] message: "application/json" <POST https://api.telegram.org/****/getUpdates> [FILE_SIZE_IS] message: "Content-Length: 23" bytes_max: "23" <POST https://api.telegram.org/****/getUpdates> [PROGRESS] bytes_max: "23"

All 5 comments

I got this when I talk to my bot,

PHP Fatal error:  Uncaught Error: Call to undefined function Longman\TelegramBot\mb_convert_case() in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/Telegram.php:809
Stack trace:
#0 /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/Telegram.php(487): Longman\TelegramBot\Telegram->ucwordsUnicode('Editedmessage')
#1 /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/Telegram.php(216): Longman\TelegramBot\Telegram->sanitizeCommand('Editedmessage')
#2 /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/Telegram.php(432): Longman\TelegramBot\Telegram->getCommandsList()
#3 /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/Telegram.php(335): Longman\TelegramBot\Telegram->processUpdate(Object(Longman\TelegramBot\Entities\Update))
#4 /home/ismael/code/telegram-bot/src/getUpdatesCli.php(58): Longman\TelegramBot\Telegram->hand in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/Telegram.php on line 809

Are you sure you have php7.1-mbstring installed?

On your server, try php -m | grep mbstring or php -i | grep mbstring.
Do you get any output?

Hi, I have not installed php7.0-mbstring, but now it is. I have another problem when I tried to execute getUpdatesCli.

PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.telegram_update' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 199
PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.chat' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 456
PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.user' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 376
PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.user_chat' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 395
PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.message' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 893
PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.request_limiter' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 1100
PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.request_limiter' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 1143
PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.chat' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 456
PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.user' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 376
PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.user_chat' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 395
PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.message' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/DB.php on line 893
PHP Warning:  PDOStatement::execute(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'telegram.conversation' doesn't exist in /home/ismael/code/telegram-bot/vendor/longman/telegram-bot/src/ConversationDB.php on line 61

Did you set up your database using the structure.sql script in the top folder?

It's fine now, thanks you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NabiKAZ picture NabiKAZ  路  4Comments

esomkin picture esomkin  路  3Comments

ttvd94 picture ttvd94  路  4Comments

dorcu picture dorcu  路  3Comments

sineverba picture sineverba  路  3Comments