WebMO - Computational chemistry on the WWW
Recent news

WebMO 6.1 is now available for free download!

WebMO 6.1 Pro has a variety of additional features and is available for purchase.

WebMO supports Windows, Mac, and Unix web browsers.

August 17, 2019

Import WebMO archive fails Log Out | Topics | Search
Moderators | Edit Profile

WebMO Support Forum » Bug Reports » WebMO Version 3.X » Import WebMO archive fails « Previous Next »

Author Message
Wayne F. Palmer
Posted on Tuesday, October 23, 2001 - 7:49 pm:   

Downloading WebMO archives is a great way to save WebMO jobs locally and works fine. All the files are for one or more jobs are apparently tar'ed up and transferrred to my local PC.

However, I am having problems uploading the WebMO archive. When I try to Import a Local WebMO Archive, I get an Internal Server Error message. The web server error log indicates "malformed header from script. Bad header=Month '-1' out of range 0..11"

Any idea of what is happening and how to fix it?
schmidt
Posted on Friday, November 09, 2001 - 5:24 pm:   

This is a bug which was introduced into the WebMO 3.1 distribution, and will be fixed in the next release. In the meantime, the following patch can be applied:

In mopac.cgi, add the following line to the read_mopac_form_data subroutine:

$jobDate = &asctime(time);

Repeat for gamess.cgi, in the the read_gamess_form_data subroutine;
Repeat for gaussian.cgi, in the the read_gaussian_form_data subroutine;

In import.cgi, change the following lines in the import_archive subroutine from:

/(\d+)\/(\d+)\/(\d+) (\d+):(\d+)/;
local @structtm;
$structtm[0] = 0;
$structtm[1] = $5;
$structtm[2] = $4;
$structtm[3] = $2;
$structtm[4] = $1-1;
$structtm[5] = $3;
$summaryInfo{'binaryDate'} = timelocal(@structtm);

to

if ($_ ne "")
{
/(\d+)\/(\d+)\/(\d+) (\d+):(\d+)/;
local @structtm;
$structtm[0] = 0;
$structtm[1] = $5;
$structtm[2] = $4;
$structtm[3] = $2;
$structtm[4] = $1-1;
$structtm[5] = $3;
$summaryInfo{'binaryDate'} = timelocal(@structtm);
}
else
{
$summaryInfo{'binaryDate'} = time;
}

After making the above change, check the syntax of your modified file with

% perl -c import.cgi

This creates all future archives correctly, and allows ones which may have been previosly generated incorrectly to be imported without errors.
William Polik (Polik)
Posted on Friday, November 16, 2001 - 6:51 pm:   

The above changes have been collected into a patch file, which is available for download here:
text/plainimport_3.1.002p.patch
import_3.1.002p.txt (3 k)

To use the patch file, locate the the webmo cgi script directory, move into the webmo cgi script directory, backup the files to be patched, copy the patch into the current directory, and apply the patch:

find ~ -name "import.cgi"
cd {path to WebMO cgi directory}
cp -p gamess.cgi gamess.cgi.orig
cp -p gaussian.cgi gaussian.cgi.orig
cp -p mopac.cgi mopac.cgi.orig
cp -p import.cgi import.cgi.orig
cp {path to patch}/import_3.1.002p.patch .
patch <import_3.1.002p.patch


This patch should be applied only to WebMO version 3.1.002. Although the patch was generated for WebMO Pro, it should work for both WebMO (the free version) and WebMO Pro. Because the patch process analyzes the context of the lines to be changed, it will work even if you have made minor customizations to the above files.

Add Your Message Here
Post:
Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Post as "Anonymous"
Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration