Problems with Centos 6 server and API Mikrotik

Issues related to configuring your network
Post Reply
charlesabrj

Problems with Centos 6 server and API Mikrotik

Post by charlesabrj » 2012/02/26 00:20:24

Hello, gentlemen ...
Forgive me for bad English, but I am Brazilian and I am using google translator.

Recently set up a server Centos 6 following the following tutorial

[url=http://www.howtoforge.com/perfect-server-centos-6.2-x86_64-with-apache2-ispconfig-3]The Perfect Server - CentOS 6.2 x86_64 With Apache2 [ISPConfig 3][/url]

This server will host a management system to access the Internet written in PHP / mysql and Mikrotik API to lock / unlock customers.

The whole routine PHP / API was working smoothly using wampp as a development platform (windows), but to put the files in PHP hosting (my server php / mysql centos 6), the functions of adding customers and managing permissions via API not responding. I see through the activity of Winbox login / logoff in RouterOS API commands as though Comm and write do not work.

Someone tell me if you need to do some kind of specific configuration commands for the API to work properly as well as worked in wampp?

Inform the Mikrotik is with the permission of API access enabled and all scripts php / mysql are working properly.

Thanks for help !

A big hug to everyone.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Problems with Centos 6 server and API Mikrotik

Post by pschaff » 2012/02/26 22:25:52

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

Those "perfect" articles are not recommended as they tell you to do inadvisable things like disabling SELinux and doing [url=http://wiki.centos.org/PackageManagement/SourceInstalls]Source Installs[/url], and seem to mainly be pushing ISPConfig which seems problematic.

If you have followed that the best approach is probably to do a fresh install to get to a stable configuration, install and configure Apache (httpd), php, and whatever else you need, and learn to manage the system with the supplied tools. If you explain in more detail what problems you are having and functionality you need, rather that just that it needs to work like "wampp" we might be able to offer better help.

You may also want to join the [url=http://lists.centos.org/mailman/listinfo/centos-pt-br]CentOS-pt-br -- Portuguese (Brazilian) CentOS mailing list[/url].

charlesabrj

Re: Problems with Centos 6 server and API Mikrotik

Post by charlesabrj » 2012/02/27 13:55:24

[quote]
pschaff wrote:
Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

Those "perfect" articles are not recommended as they tell you to do inadvisable things like disabling SELinux and doing [url=http://wiki.centos.org/PackageManagement/SourceInstalls]Source Installs[/url], and seem to mainly be pushing ISPConfig which seems problematic.

If you have followed that the best approach is probably to do a fresh install to get to a stable configuration, install and configure Apache (httpd), php, and whatever else you need, and learn to manage the system with the supplied tools. If you explain in more detail what problems you are having and functionality you need, rather that just that it needs to work like "wampp" we might be able to offer better help.

You may also want to join the [url=http://lists.centos.org/mailman/listinfo/centos-pt-br]CentOS-pt-br -- Portuguese (Brazilian) CentOS mailing list[/url].[/quote]


Good morning (here in Brazil) ;)

PSChaff friend, thanks for the reply. Inform you that the whole platform is working correctly (Apache, Mysql, PHP and even ISPConfig). My problem is to send commands to the RouterOS (MikroTik) through the API.

I see in the logs of RouterOS that the connection is established, but the commands are not executed (such as API-> Comm, API-> write).

About wampp only informed that the same scripts worked before, but when sent to the CentOS server no longer work.

A friend of the forum said it could be Miktrotik any configuration of CGI, but he could not help me to solve ...

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Problems with Centos 6 server and API Mikrotik

Post by pschaff » 2012/02/27 15:12:29

I looked at the [url=http://www.mikrotik.com/]MikroTik[/url] site but nothing obvious to me. The only configuration tool on the [url=http://www.mikrotik.com/download.html]Downloads[/url] page is a Windows executable. Perhaps you could provide a link to the tools you are trying to use to access the router, or use their [url=http://www.mikrotik.com/support.html]Support[/url].

It seems [url=http://www.google.com/search?q=wampp&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-a&safe=active]wampp[/url] may be [url=http://www.apachefriends.org/en/xampp-windows.html]xampp for windows[/url] so perhaps [url=http://en.wikipedia.org/wiki/XAMPP]XAMPP[/url] is the missing piece. A google on [url=http://www.google.com/search?q=xampp+centos-6+OR+rhel6+OR+%22red+hat+enterprise+linux+6%22&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-a&safe=active]xampp centos-6 OR rhel6 OR "red hat enterprise linux 6"[/url] will help.

Post Reply