Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base table or view not found #455

Closed
JasterTDC opened this issue Apr 7, 2017 · 5 comments
Closed

Base table or view not found #455

JasterTDC opened this issue Apr 7, 2017 · 5 comments

Comments

@JasterTDC
Copy link

JasterTDC commented Apr 7, 2017

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"

@JasterTDC
Copy link
Author

JasterTDC commented Apr 7, 2017

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

@noplanman
Copy link
Member

noplanman commented Apr 7, 2017

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?

@JasterTDC
Copy link
Author

JasterTDC commented Apr 7, 2017

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

@noplanman
Copy link
Member

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

@JasterTDC
Copy link
Author

It's fine now, thanks you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants