Gossamer Forum
Home : General : Perl Programming :

Script Configuration and Server Error problems?

Quote Reply
Script Configuration and Server Error problems?
Hi Guys!
We writing new software.
And we have one problem that i can't figure out how to solve. Currently we testing it under linux.
In all scripts we have config file i_config.pm.
That contain configuration to all path and urls.
When you trying to run script i got next error : The document has moved or Internel Server Error.
When i take a look on a logs files, i see that it can't find i_config.pm file.
But without any changes to the script usually when you trying to run it in a third time it works.
It does't make any sense.

One more thing, we try to run it on different Unix Servers, on some of them we have the same problem, but on some we don't.

Appriciate any help.

Thank you
Dmitry
Quote Reply
Re: [doom] Script Configuration and Server Error problems? In reply to
What does the error say exactly?

How are you calling the config file into your main script?

What does the config file look like?
Quote Reply
Re: [Paul] Script Configuration and Server Error problems? In reply to
Hi Paul!
Thank a lot for response.
Here is error:
[Wed Sep 25 12:13:39 2002] [error] [client 206.231.76.21] File does not exist: /usr/local/psa/home/vhosts/iprok.com/httpdocs/test//test/images/ue_pict.jpg
[Wed Sep 25 12:14:09 2002] [error] Undefined subroutine &Apache::ROOTwww_2eiprok_2ecom::test::scripts::create_user_2epl::ExecSQL called at /usr/local/psa/home/vhosts/iprok.com/httpdocs/test/scripts/create_user.pl line 533.
======================================================
We have to files i_config.cfg and i_common.pm

We call this way:
use CGI;

require "i_config.cfg";

require "i_common.pm";
========================================================
Config Script:
use DBI;




$DOCUMENT_ROOT = "/usr/local/psa/home/vhosts/iprok.com/httpdocs/test";



$SERVER_PATH = "/test";

$SCRIPT_ROOT = $DOCUMENT_ROOT."/scripts";

$LIB_ROOT = $DOCUMENT_ROOT."/libs";

$TEMPLATE_ROOT = $DOCUMENT_ROOT."/templates";


$PERMISSIONS{"users"} = "USER";

$PERMISSIONS{"users_add"} = "USER_ADD";

$PERMISSIONS{"users_edit"} = "USER_EDIT";

$PERMISSIONS{"users_del"} = "USER_DEL";

$PERMISSIONS{"users_view"} = "USER_VIEW";

$PERMISSIONS{"accounts"} = "ACCOUNT";

$PERMISSIONS{"accounts_add"} = "ACCOUNT_ADD";

$PERMISSIONS{"accounts_edit"} = "ACCOUNT_EDIT";

$PERMISSIONS{"accounts_del"} = "ACCOUNT_DEL";

$PERMISSIONS{"accounts_view"} = "ACCOUNT_VIEW";

$PERMISSIONS{"pages"} = "PAGE";

$PERMISSIONS{"pages_add"} = "PAGE_ADD";

$PERMISSIONS{"pages_edit"} = "PAGE_EDIT";

$PERMISSIONS{"pages_del"} = "PAGE_DEL";

$PERMISSIONS{"pages_view"} = "PAGE_VIEW";

$PERMISSIONS{"mass_mail"} = "MASS_MAIL";
$PERMISSIONS{"admin_add"} = "ADMIN_ADD";


1;


=========================================================
Thank you for help
Dmitry
Quote Reply
Re: [doom] Script Configuration and Server Error problems? In reply to
Is your script running under mod_perl?

The error just seems to suggest you are missing the ExecSQL routine.
Quote Reply
Re: [Paul] Script Configuration and Server Error problems? In reply to
Hi Paul!

Yes it runs under mod_perl!
By the way can this errors cause that we are not using ; strict.?
If it just a matter of ExecSQL routine. Why it runs from a second or third time?

Thank you
Dmitry
Quote Reply
Re: [doom] Script Configuration and Server Error problems? In reply to
Try running it in a normal environment before you run it under mod_perl.

Your code has to be almost perfect for it to run under mod_perl (not saying your's isn't) but use strict and warnings and when you have erradicated all the errors then try again with mod_perl.