Comments (21)
@vahidvdn 1) No, it runs only when an authorization key is generated
2) No, telegram needs two keys for each datacenter (10 keys (temporary-permanent pair) if you connect to every datacenter)
from madelineproto.
Not exactly, the key sometimes has to be regenerated.
from madelineproto.
@Max93 Welcome.
from madelineproto.
The prime module has to run twice (or even more if errors occurred) for every datacenter, if you're connecting to 3 datacenter it is run 6 times.
Have you pulled the latest version and did you run composer update?
from madelineproto.
@danog I updated to the last version, and again the same problem. It's very fast in local, but very slow in the host.
From your readme:
Also note that MadelineProto will perform better if a big math extension like gmp or bcmath is installed.
In my host, gmp
is not installed, only bcmath
is installed. Is it ok? Or maybe the problem is here? (both is installed in local)
from madelineproto.
I deactived gmp
extension in local. So it became very slow.
I searched into your code, first you try to use gmp
, then if not exist, use bcmath
.
Performance of gmp
is much more better than bcmath
.
from madelineproto.
Hey, since you implemented Pollard Brent factorization in PHP, would you mind sending a pull request with it to https://github.com/danog/PrimeModule?
That'd be real nice.
from madelineproto.
@danog I sent a pull request. Please check it.
from madelineproto.
@danog Does prime factorization run on every single request (method)? As I understood, it does.
But as I know, telegram only requires it on auth key, Isn't it?
from madelineproto.
@danog Oh yes. We instantiate MadelineProto
class only when an authorization key is generated by:
new \danog\MadelineProto\API($settings);
Then we just use deserialize
for calling other methods and this does not need factorization module. Am I right?
from madelineproto.
@danog This works fine in cpanel
. But I have some issues in directAdmin
web host.
Of course maybe there is nothing about MadelineProto, but maybe there are something not installed in my server. When I run, it takes too long and finally gives me 500 internal error. Error log file says:
Script timed out before returning headers
Note: Php 7 is running and gmp
is installed. (tested)
Is there anything more than these two that I must install in my server? (local and cpanel works fine)
from madelineproto.
Can you please provide logs?
(It might be due to datacenter 4, where calls were activated, not responding to req_pq)
from madelineproto.
No more logs is provided. I even asked from server providers. Just mentioned log.
(It might be due to datacenter 4, where calls were activated, not responding to req_pq)
Do you mean telegram's voice call? So because of that ,not responding to req_pq?
from madelineproto.
@danog Yes, you are right. Other methods works fine. Because I get AUTH_KEY_UNREGISTERED
response message. It seems that's about responding problem to req_pq.
Why this happen? Any way to solve it?
from madelineproto.
@vahidvdn have u resolve ? i have the same issue. Let me know, thanks.
from madelineproto.
I have the same issue
What is your issue? Please explain more.
from madelineproto.
@vahidvdn i hope this is clear
I have created a simple app. Login by phone number was successful, this is the code.
use danog\MadelineProto\Api;
$settings = json_decode(
'{
"app_info":{
"api_id": *,
"api_hash":"*"
},
"connection_settings":{
"all":{"test_mode":true}
}
}', true) ?: [];
$MadelineProto = new Api($settings);
$sentCode = $MadelineProto->phone_login('+39 XXXXXXX');
$code = '';
for ($x = 0; $x < $sentCode['type']['length']; $x++) {
$code .= fgetc(STDIN);
}
$MadelineProto->complete_phone_login($code);
When I try to do any operations, like send an invite or create a channel, $MadelineProto response with error:
CallHandler: An error occurred while calling method auth.sendInvites: AUTH_KEY_UNREGISTERED in ResponseHandler on line 343. Recreating connection and retrying to call method...
Exception: An error occurred while calling method auth.sendInvites (AUTH_KEY_UNREGISTERED in ResponseHandler on line 343). in CallHandler.php:191
from madelineproto.
@Max93 You get this exception from telegram:
AUTH_KEY_UNREGISTERED
This is not related to MadelineProto. It means you are not logged in into telegram.
You must whether use MadelineProto session management (to keep user logged in) or call any method immediately like the following:
$MadelineProto->complete_phone_login($code);
$MadelineProto->methodName();
from madelineproto.
@vahidvdn i call immediately the complete_phone_login whit successful result. When I try to do any operations, like send an invite or create a channel, $MadelineProto response with error AUTH_KEY_UNREGISTERED.
from madelineproto.
@Max93 Maybe 2fa is enabled in your telegram account.
from madelineproto.
@vahidvdn I donβt know why, but it works π. I used the web app for 2 step configuration and it worked π. Thanks for the support!
from madelineproto.
Related Issues (20)
- RPC error with getFullInfo() HOT 2
- getPropicInfo() returns NULL HOT 4
- > pray for daniil πππ
- > pray for daniil πππ
- Telegram+
- Redis Settings overrides database number and password when URI contains these values HOT 3
- ΧΧΧ ΧΧΧΧ§Χ HOT 1
- How to send messages to the robot through MadelineProto, please give a successful example HOT 1
- Install error / difficulties HOT 1
- messages.sendMessage needs random_id parametr HOT 1
- How to read messages from public channel HOT 1
- Update of channel message send twice when we dont use IsNotEdited Filter
- PHP - fpm fall down in infinitive loop HOT 2
- getDownloadLink() error message: The given data cannot be sent because it is not serializable HOT 1
- getInfo is ok, but the same parameters using in getFullInfo is not ok. I rly can't understand) HOT 3
- Surfaced: AssertionError: No info for DC -5! HOT 1
- AssertionError: No info for DC -1 HOT 1
- A
- getDownloadLink method exception HOT 1
- Hash generation Issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from madelineproto.