Comments (3)
A connection is still created once when the PHP process starts and persists until the PHP process closes.
How many requests you can handle with the same connection depends on your web server config.
If you are running PHP as an apache module f.e., then PHP is tied to Apache's process, so the connection will only be gone if you restart Apache.
In the case of FastCGI, there's a "recycle" time and number of requests. Whenever a "recycle" occurs, persistent data is lost.
from net_routeros.
I use Apache module. So it means that the connection remains open until Apache is restarted. Even so, whenever I make a request, a new connection is initiated with mikrotik (but not closed). What I need is for a function to start the connection with mikrotik and when I have a new request, it should be done with the connection that is already open. How do I save this open connection for use in subsequent requests?
ie:
$RadiusServer = new RouterOS\Client('ip', 'user', 'pass', null, true);
$connection = $RadiusServer->persistentId;
if($connection){
$util = new RouterOS\Util($connection);
$util->setMenu('/ip arp');
print_r($util->getAll());
}
from net_routeros.
There is no persistentId property, so how are you getting that?
Anyway... I'm not entirely sure why that happens. Can you give me your versions involved? Apache version, PHP version, APC(u) version, MikroTik version, OS version? Any one of those could be the cause, as persistent connections are kind of a hack job to be honest.
from net_routeros.
Related Issues (20)
- utils find implementation error HOT 4
- Error installing with composer HOT 3
- Error in Codeigniter HOT 7
- phar file for download? HOT 1
- Getting router MAC address HOT 3
- 6.45.8 - authentication failure HOT 2
- Hi, i already updated script to login with version 6.43.
- Caracters <> doesnt show ? HOT 2
- Unable to connect to the router HOT 4
- Authentication problem from RouterOS 6.45.6 HOT 1
- Workflow question HOT 4
- $response->getType return "!re" - what's going on? HOT 2
- "LIKE" in query HOT 1
- Best practice to add a large list HOT 4
- exec() problem HOT 2
- Call "all" option on Hotspot Server submenu to use in Users submenu HOT 3
- Why can't I enable, disable or remove Hotspot Users? HOT 2
- Unable to login ROS v6.47.10 (long-term)
- Random Mac Address 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 net_routeros.