Comments (3)
Thanks.
It could be the old RouterOS version indeed. I've never tested versions 4.*
and 3.*
. I only started this project near the end of the 5.*
versions, so that's the earliest ones supported (though today, I test only against the latest "current" version, and only touch others if reports come in).
Queries, according to the manual, were only supported since 3.21, so that last item failing is to be expected.
The other ones should work though. Check the return value. It contains the responses from the router. e.g.
$responses = $util->setMenu('/ip arp')->remove(8);
var_dump($responses);
(As already suggested in #19, future versions of Util will throw an exception on failure, so that the failure is more apparent)
from net_routeros.
I checked the source, and it seems find() (which is internally used by remove() to get the proper ID) only uses the "find" command for numbers, and never falls back to "print". I think I may have done this because on zero matches, no "ret" is present... So I can't really detect whether you're simply in a menu with zero items, or if you're using an older version where "find" doesn't work at all.
As a workaround, you can try to get all IDs, and get whatever the 8th one is, i.e.:
$util->setMenu('/ip arp')->remove(
$util->getAll(array('.proplist' => '.id'))[8]->getProperty('.id')
);
(though keep in mind this is somewhat inefficient, since ALL items' IDs are retrieved, only for the 8th one to be used, and the other ones effectively discarded)
I'll (re)evaluate if I could fallback to a "print" for older versions... In the meantime (and in general in fact), upgrading to a newer RouterOS version (preferably the latest one) would be best in the long run.
from net_routeros.
Thanks for your prompt reply.
I have updated the router to 6.10 and everything is now working. Seems it was time to scrap the old version and work on the new ones.
I will continue to explore the other feature of your client. In the meantime, thank you once again for your great work.
Etienne
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
- Persistent connection HOT 3
- 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.