Skip to content

getUpdateCLI.php - SSL certificate problem: self signed certificate in certificate chain #49

Closed
@farhadsaberi

Description

@farhadsaberi

Hi, i used getUpdate Method and when opened getUpdateCLI.php , bot does not reply to me , i get this error:

exception 'Longman\TelegramBot\Exception\TelegramException' with message 'SSL certificate problem: self signed certificate in certificate chain' in C:\xampp\htdocs\Longman\TelegramBot\src\Request.php:161 Stack trace: #0 C:\xampp\htdocs\Longman\TelegramBot\src\Request.php(239): Longman\TelegramBot\Request::executeCurl('getUpdates', Array) #1 C:\xampp\htdocs\Longman\TelegramBot\src\Request.php(394): Longman\TelegramBot\Request::send('getUpdates', Array) #2 C:\xampp\htdocs\Longman\TelegramBot\src\Telegram.php(364): Longman\TelegramBot\Request::getUpdates(Array) #3 C:\xampp\htdocs\Longman\TelegramBot\example-getUpdatesCLI.php(42): Longman\TelegramBot\Telegram->handleGetUpdates() #4 {main}

This is my getUpdateCLI.php:

'localhost:3306', 'user'=>'root', 'password'=>'XXXXX', 'database'=>'dbname'); try { // create Telegram API object $telegram = new Longman\TelegramBot\Telegram($API_KEY, $BOT_NAME); $telegram->enableMySQL($credentials); $telegram->handleGetUpdates(); //Options // $telegram->enableMySQL($credentials, $BOT_NAME.'_'); // $telegram->addCommandsPath($COMMANDS_FOLDER); //here you can set some command specified parameters, //for example, google geocode/timezone api key for date command: // $telegram->setCommandConfig('date', array('google_api_key'=>'your_google_api_key_here')); //$telegram->setLogRequests(true); //$telegram->setLogPath($BOT_NAME.'.log'); //$telegram->setLogVerbosity(3); //$telegram->setDownloadPath("../Download"); //$telegram->setUploadPath("../Upload"); // $results = $telegram->sendToActiveChats( // 'sendMessage', //callback function to execute (see Request.php methods) // array('text'=>'Hey! Checkout the new feature!!'), //Param to evaluate the request // true, //Send to chats (group chat) // true, //Send to users (single chat) // null, //'yyyy-mm-dd hh:mm:ss' date range from // null //'yyyy-mm-dd hh:mm:ss' date range to // ); // $results = $telegram->handle(); // handle telegram getUpdate request } catch (Longman\TelegramBot\Exception\TelegramException $e) { // log telegram errors echo $e; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions