Linux WebServer with Navision

Hi there… did anybody ever try to connect a Linux (Apache/PHP/Perl/etc.) Webserver to a NF Database (ODBC, etc.)? Torsten Brasch Navision Solution Developer

YES! I’m developing a E-Commerce Website on a apache server. To connect to NF I installed a Zope server ( on the NT box where NF is. The Zope server responds like a XML-RPC server ( and uses the Zodbc connector to talk to NF thru C/ODBC. After this you can interrogate the xmlrpc server with sql sentences from where you want (like linux). On the linux side I have an Apache server, and behind a Zope server with a e-Commerce solution. The e-Commerce solution will let our customers input orders into Navision. The xmlrpc server has a few other use, too (i.e. real time replication).

Are you replicating Data to your Linux Server ? If yes what sort of database have you got on your Linux Sever ? That could be a hell of a cost effective web server solution : Linux OS - $0 (Well almost!) Apache Server - $0 (Well Almost!) _____________________ Grand Total Certainly less than Win NT + IIS and all the rest

Yes, I replicate some tables on the linux server and use MySQL as database server. The reason to replicate some tables is that the access time from Zope to MySQL is very small, due to the use of the python MySQL module. Another advantage is that the python MySQL module is multithraded. I only use the connection to Navision to list the stock of products (but not the rest of fields of the table of products, to see old invoices of a customer and to write orders. Replicated tables (translated from spanish, maybe not correct): Cliente - Customers (some fields) Envio a Dirección - Shipping address Producto - Product (some fields) Tarifa venta producto - Product price list Unidad medida producto - Producto unit measure

How do you return the orders to Navison? Do you create a new table for web orders, and then perform validation upon moving the orders to a sales order? Or do you directly write the order? How do I set the laser printer to “Stun”?

I store the orders in a table on mysql and when the customer push a button called “register order” I copy the order to Navision Sales Order with the Order number starting with PW… The reason to store the order in mysql while the customer is introducing the order is the long time the validation in Navision requires.

Another approach: Server side (NF DB) - CODBC - Easysoft ODBC-ODBC Bridge server ( Client side (web server, linux) - Easysoft ODBC-ODBC Bridge client - Apache - PHP (compiled with ESOOB support) Allows to talk to NF DB just as you would with any ODBC datasource. Uses the same xmlrpc (as fas as I know), allows to encrypt client/server connections. IK D/S ELVA NSC Riga, Latvia

IK, Tell me more about your solution? Can you walk me through entering customer data on the web and getting it in Navision? Also, look at my post about what we are trying to do with Attain on the web. I’ll owe you :wink: Yours in Software, /m

Well, where is the problem? Download apache, php (source), easysoft odbc-odbc bridge client (binary) for linux. Extract them somewhere, say /usr/local/src/ Setup up easysoft odbc-odbc bridge client. Change to respective dir, ./install and answer to questions Set up webserver apache: ./configure --prefix=/usr/local/apache --enable-module=so make; make install php: ./configure --with-esoob --with-apxs=/usr/local/apache/bin/apxs make; make install In case of problems with installaction refer to docs included in packages. Make /etc/odbc.ini with contents: [navision] Driver = OOB SERVER = PORT = 8888 TRANSPORT = tcpip TARGETDSN = navsource LOGONUSER = guest LOGONAUTH = guest TargetUser = TargetAuth = Substitute with your database server ip. Linux side is ready to go. Now let’s set up database server side (windows). Install and prepare Navision database where information will be stored. Install C/ODBC. Demo ODBC datasource will be created. Delete it. Create new datasource, using C/ODBC driver. Set it up to use your navision database, and name it ‘navsource’ (as in odbc.ini above) Install Easysoft OOB server on database server. If you install the client as well, demo ODBC datasource will be created - delete it, it is not used. Launch ESOOB server admin website, change one setting to make server launch separate process (not thread) for each connection. Make a user in navision with SUPER permissions for all companies. Name it ROOT and set the password ‘password’ for example. Database server is now ready as well. Try out connecting from php with a command like: $link=odbc_connect(“navision”,“root”,“password”); Everything else goes on like with any other normal ODBC datasource in Windows environment. Hope it helps. IK D/S ELVA NSC Riga, Latvia