Miva, Miva Script, Miva Empresa, Miva Mia amd Miva Merchant are registered trademarks of the Miva Corporation
 
Ivo Truxa - truXoft control systems: advanced programming and custom IT solutions home / about / webdesign / Miva / automation / contact

http://mivo.truxoft.com
MIVO!
miva beyond limits

 

MIVA®  RESOURCES: Mivo Patch

by Ivo Truxa, 02/20/2000

Note from 02/24/2000:
Even if the information in this article is still valid, in fact there is a simpler way how to gain the full access to your Miva configuration file by renaming the Miva binary. Read details in art0006.htm. The patch still makes sense, for example, if there are many third-party sites having links to you, using the CGI-style URLs. Renaming the Miva binary would cause a lot of broken links, but the patch let them unchanged.

Note from 10/29/2000:
In some configurations you do not even need to rename the binary. Just try to create an own miva.conf file in the directory where miva binary resides to see if it is your case.

Most of Miva users have their domains hosted at IHPs. Their technical support knows often very few about Miva and is not able to make any changes in the default Miva configuration. Asking your IHP to increase the timeout or disable cookies is a wasted time (I am trying it two years!). Even if the control of such parameter on a user level appeared many times on the Miva Wish List, it looks that it has no priority for the Miva Corporation.

I've got bored with years waiting for response from my IHP or from Miva and decided to try to solve it myself. By changing a single bit in them Miva Empresa binary I can access and change my Miva configuration as needed. And even more - I can create different profiles in each directory of for different file extensions.

Before you continue, please read the legal disclaimer. Strictly taken, you are NOT ALLOWED to make any changes on the Miva engine. If you want to do it, please do it in your own responsibility, but be aware that you very probably break some copyrights, laws, agreements or Terms of Service. I publish the information just for educational purposes and refuse any responsibility for possible damages, consequences or above mentioned violations.

I've tested the patch on a 3.64 Linux Miva Empresa but I suppose it works on any other UNIX version, at least up to 3.64. It can happen (but I do not hope so) that Miva Co. decides to disable this possibility in later versions. The patch is possible only if the Miva binary resides in your cgi-bin folder. You cannot do it if your IHP uses secure installation method or a server plug-in. I am not sure if it possible on NT.

The trick is very easy. Miva looks for its configuration file in the /etc directory. If not found, it looks in the directory, where the Miva binary resides (mostly your cgi-bin) and when not found there, it looks in the current working directory. It is enough to overwrite the '/etc' string in the Miva binary with something else (e.g. to '/ftc') and Miva automatically goes to search the configuration file in your cgi-bin - that simple it is!

How to do it?

Well, as I told - you should NOT do it! But it is evident, that you can open the binary in any hex editor, search for the '/etc' string and change a bit, byte or all the string (keep the length!). Backup the file before touching it! If you do not know what a hex editor is or never used it, you have no clue about how program works or how to find the binary, then please keep far from the patch. Any unqualified manipulation with the file can have fatal consequences!

You should keep your original Miva binary. It continues to work with the IHP's (mostly default) configuration. You can make several instance of the patched file in your cgi-bin with different names. Each of them looks for a configuration file of its own name. For example 'miva' looks for 'miva.conf', if you call the patched file 'mivo' it needs the 'mivo.conf' file. If you do not keep any config in the cgi-bin, you can customize each of your script directories separately.

Have a look at Miva Empresa Admin Manual and Miva Installation Docs for details about the configuration. There is a sample basic configuration file here:

htmlscriptdefault=index.mv
globaltimeout=90
mailtimeout=20
calltimeout=60
usecookies=yes
htmlscriptroot=/absolute_path_to_your_script_dir
stdmodedatadir=/absolute_path_to_your_data_dir   
sitevars=/absolute_path_to_your_cgi-bin/sitevars 
loglevel=0
serveradmin=webmaster@your_domain.com

As I told, you can create multiple configurations - for example with and without cookies, with short and long timeout, with different extensions etc.

Please keep on mind that improper changes in the configuration can harm your virtual or physical server, can cause malfunctions of your scripts or have other serious consequences! If you do not fully understand the way to administrate Miva Empresa, please keep away from the patch!


top

Some Useful Links

List of several hex-editors
tiny (11kB) Hex editor (freeware) [cached]
Hackman hex editor (freeware)
HexWorkShop

top

   

Miva and some other terms used on this page are registerd trademarks of the Miva Corporation
copyright  truXoft  © 1997-2008