Community discussions

 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Metarouter with http, php and sqlite?

Sat Nov 12, 2011 10:07 am

I would liek to have http with php and sqlite support in metarouter. I am not familiar with linux. What is the easiest way for someone like me to get to the point when it is all installed and works?
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Metarouter with http, php and sqlite?

Mon Nov 14, 2011 1:17 pm

you can try OpenWRT
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: Metarouter with http, php and sqlite?

Thu Nov 17, 2011 8:05 pm

That much I know. Thing is all instructions somehow start in a middle if the story so I do not know where to begin from.
 
Ackster
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Wed Oct 06, 2004 6:22 pm

Re: Metarouter with http, php and sqlite?

Fri Nov 18, 2011 2:29 am

It is VERY touchy. You will have to make your own image and really work with it. I've been messing with it for a few days on a RB751 with a small web server and PHP. I may have finally gotten a stable version. I have been keeping some notes as I worked on it and may try to contribute to the wiki if I actually get this to work. I think the lack of documentation and the understanding of OPENWRT are preventing people from using this very powerful feature.
 
ayufan
Member
Member
Posts: 331
Joined: Sun Jun 03, 2007 9:35 pm
Contact:

Re: Metarouter with http, php and sqlite?

Fri Nov 18, 2011 2:53 am

It is VERY touchy. You will have to make your own image and really work with it. I've been messing with it for a few days on a RB751 with a small web server and PHP. I may have finally gotten a stable version. I have been keeping some notes as I worked on it and may try to contribute to the wiki if I actually get this to work. I think the lack of documentation and the understanding of OPENWRT are preventing people from using this very powerful feature.
How did you manage to fit openwrt on RB751 with so little memory?
hAP AC, TP-Link Archer C7 v2, RB951G, RB450G, RPI2, RPI zero
 
Ackster
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Wed Oct 06, 2004 6:22 pm

Re: Metarouter with http, php and sqlite?

Fri Nov 18, 2011 3:23 am

Very carefully :) Actually I'm stripping out a bunch of stuff. I'm not using any DHCP, firewall, connection tracking, dropbear, etc. Trying to build a very small very specific image with just PHP and a tiny web browser. I'm still experimenting with it, but seem to have a stable image running for over 4 hours now. Just sitting in an endless loop in a PHP script running in the console. Sleeps for 10 mins, wakes up downloads a small webpage, prints the source to console and saves the source to file, then goes back to sleep for 10 mins. Running a 12MB OPENWRT image. RB751 still has 2.7MB free memory and 16MB free HD. I still think I have some room to shrink it even more.

I'm finding this fun, takes me back to the DOS days. I remember writing programs that had to fit in to a 64K source and 64k data segments, showing my age :)
 
ayufan
Member
Member
Posts: 331
Joined: Sun Jun 03, 2007 9:35 pm
Contact:

Re: Metarouter with http, php and sqlite?

Fri Nov 18, 2011 3:26 pm

Which packages do you have enabled on ROS? How much memory did you assign to MR? Did you consider making some tutorial?
hAP AC, TP-Link Archer C7 v2, RB951G, RB450G, RPI2, RPI zero
 
Ackster
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Wed Oct 06, 2004 6:22 pm

Re: Metarouter with http, php and sqlite?

Fri Nov 18, 2011 4:29 pm

ROS is stock, haven't tried to remove any packages yet. Being this project is targeted at the home user, I could take a few things out like mesh, radius, MPLS, etc. That would save some more room. The current OPENWRT package is running with 12 MB of memory. I am taking notes as I go along. If this experiment works, I will do a wiki page of some form. My current test has been running for about 16 hours so far, my next steps are to write the real PHP script, fine tune the make image, and install on my home router to see how things work with the ROS having to pass traffic while running the MR.
 
ayufan
Member
Member
Posts: 331
Joined: Sun Jun 03, 2007 9:35 pm
Contact:

Re: Metarouter with http, php and sqlite?

Fri Nov 18, 2011 5:13 pm

Nice. It's pity that RB751U doesn't have more memory, like 48MB or even 64MB. Also It would be nice to have USB sharing to MR. It would make ideal home router with RouterOS as base and OpenWRT as data storage and usb printer sharing.
hAP AC, TP-Link Archer C7 v2, RB951G, RB450G, RPI2, RPI zero
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: Metarouter with http, php and sqlite?

Sat Nov 19, 2011 12:07 am

Ackster, it seems your setup is exactly what I need. If you want me to test it on RB433AH, let me know.
 
Ackster
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Wed Oct 06, 2004 6:22 pm

Re: Metarouter with http, php and sqlite?

Sat Nov 19, 2011 1:19 am

Not sure about the SQL lite, but give me a another week to work with what I have and I can send you something to try. Just starting to get busy around here with Thanksgiving coming up.

Are you looking at using DHCP client on the OpenWRT image or static IP? As I said before, due to space on the 750, I'm trimming OpenWrt down to just what I need.
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: Metarouter with http, php and sqlite?

Sat Nov 19, 2011 8:27 am

Static IP would be ok. SQLite should not be a problem if you already have php, it has native support by default.
 
Ackster
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Wed Oct 06, 2004 6:22 pm

Re: Metarouter with http, php and sqlite?

Sat Nov 19, 2011 5:31 pm

Things were going great, but had a complete fail late last night :( System was running for over 36 hours. When I checked it this morning the router had rebooted. That is not to bad, except it seems the OpenWRT drive got corrupt and went back to factory defaults, losing all my network settings and even files I transferred to the image. Not good in a production system. The project I'm working on is a home router solution with a target of over 1000 users. I can afford to have a few bugs, but a complete fail is totally unacceptable.

Unfortunately, if I don't find a stable fix for this in the next couple of weeks, I will be shelving the project or moving on to a different hardware platform.
 
ayufan
Member
Member
Posts: 331
Joined: Sun Jun 03, 2007 9:35 pm
Contact:

Re: Metarouter with http, php and sqlite?

Sun Nov 20, 2011 1:28 am

Unfortunately, if I don't find a stable fix for this in the next couple of weeks, I will be shelving the project or moving on to a different hardware platform.
Most probably problem is due to small memory footprint (12MB for openwrt is very small). When I was working with OpenWRT 12MB wasn't sufficient enough to handle all common tasks. I got bugs when was trying to save configurations, install new packages. Moreover my home RB751U uses up to 20MB of memory to handle some simple tasks like: queues, ipsec, firewall and dns.

In fact we need more memory, not that much just 16MB more to make hv happy and mr happy...
hAP AC, TP-Link Archer C7 v2, RB951G, RB450G, RPI2, RPI zero
 
ayufan
Member
Member
Posts: 331
Joined: Sun Jun 03, 2007 9:35 pm
Contact:

Re: Metarouter with http, php and sqlite?

Sun Nov 20, 2011 4:24 am

You can try making swap file disk. It should help somehow.
hAP AC, TP-Link Archer C7 v2, RB951G, RB450G, RPI2, RPI zero
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: Metarouter with http, php and sqlite?

Tue Dec 06, 2011 12:34 pm

Ackster, did you achieve any progress with this?
 
Ackster
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Wed Oct 06, 2004 6:22 pm

Re: Metarouter with http, php and sqlite?

Tue Dec 06, 2011 4:04 pm

Other things have come up, but test router has bee running for over a week. Very basic test, no traffic load on it. Going to try to make some time next week to expand testing.

Who is online

Users browsing this forum: No registered users and 3 guests