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

set.php problem #336

Closed
MadAlexk opened this issue Dec 2, 2016 · 6 comments
Closed

set.php problem #336

MadAlexk opened this issue Dec 2, 2016 · 6 comments

Comments

@MadAlexk
Copy link

MadAlexk commented Dec 2, 2016

Required Information

  • PHP version: 7
  • PHP Telegram Bot version: from composer
  • Using MySQL database: no
  • Update Method: problems on setup
  • Self-signed certificate: problems on setup
  • RAW update (if available):

Expected behaviour

What SHOULD be happening?

On set UP:
https://......AAEtT4Rh2eBTPakzJOo0bkFk3A-6pxaEErk/set.php

PHP Fatal error: Uncaught Error: Call to a member function getBody() on null in C:\inetpub\WWW.....\63AAEtT4Rh2eBTPakzJOo0bkFk3A-6pxaEErk\vendor\longman\telegram-bot\src\Request.php:227
Stack trace:
#0 C:\inetpub\WWW.....\63AAEtT4Rh2eBTPakzJOo0bkFk3A-6pxaEErk\vendor\longman\telegram-bot\src\Request.php(316): Longman\TelegramBot\Request::execute('setWebhook', Array)
#1 C:\inetpub\WWW.....\63AAEtT4Rh2eBTPakzJOo0bkFk3A-6pxaEErk\vendor\longman\telegram-bot\src\Request.php(814): Longman\TelegramBot\Request::send('setWebhook', Array)
#2 C:\inetpub\WWW.....\63AAEtT4Rh2eBTPakzJOo0bkFk3A-6pxaEErk\vendor\longman\telegram-bot\src\Telegram.php(742): Longman\TelegramBot\Request::setWebhook('https://........', 'C:\inetpub\WWW\...')
#3 C:\inetpub\WWW.....\63AAEtT4Rh2eBTPakzJOo0bkFk3A-6pxaEErk\set.php(19): Longman\TelegramBot\Telegram->setWebHook('https://........', 'C:\inetpub\WWW\...')
#4 {main}
thrown in C:\inetpub\WWW.....\63AAEtT4Rh2eBTPakzJOo0bkFk3A-6pxaEErk\vendor\longman\telegram-bot\src\Request.php on line 227


setWebHook($hook_url); // Uncomment to use certificate $result = $telegram->setWebHook($hook_url, $path_certificate); if ($result->isOk()) { echo $result->getDescription(); } } catch (Longman\TelegramBot\Exception\TelegramException $e) { echo $e; }
@noplanman
Copy link
Member

noplanman commented Dec 2, 2016

edit: #536 allows you to disable verification without modifying core files, please use that instead!


I'm guessing this is related to the fact that you're using Windows.
Unfortunately I don't have a Windows installation to test this, but either way the library won't work with Windows. It's laid out for *nix type systems.

@MadAlexk
Copy link
Author

MadAlexk commented Dec 2, 2016

i am sad.
But why?

Php works with it - not a windows :((
i can give ftp for you, do you want to look on it?

@noplanman
Copy link
Member

I don't think Windows is on the todo list for us.

Most PHP webservers run on some distribution of *nux, which is the most stable way of running it. I urge you to look into a *nix server for hosting your bot.
Alternatively, you can install VirtualBox on your Windows computer and install it there.

There should be enough information around on the internet on how to do that 😊

@jacklul
Copy link
Collaborator

jacklul commented Dec 3, 2016

I disagree on not supporting Windows, there are people who prefer Windows environment over Linux.

@MadAlexk MadAlexk closed this as completed Dec 3, 2016
@noplanman
Copy link
Member

@jacklul Ok, I understand what you mean. For me though, my Windows days are pretty much over, so I'll leave this open for others to implement.

@jacklul
Copy link
Collaborator

jacklul commented Dec 24, 2016

production unsafe (?) workaround: jacklul@46baa11

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

3 participants