Closed Thread Icon

Topic awaiting preservation: Problem with Include file in CGI (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=13060" title="Pages that link to Topic awaiting preservation: Problem with Include file in CGI (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Problem with Include file in CGI <span class="small">(Page 1 of 1)</span>\

 
Darkwind
Nervous Wreck (II) Inmate

From:
Insane since: Jul 2001

posted posted 02-22-2004 21:33

This is really strange and I'm not that good with PERL. I have a chat program I purchased a number of years back. I had it working on an old hosting account I had. I am trying to reimplement the program on a new host.

The problem is this:

When I run the script, the error I get is that it can't find a file that is clearly there.

The script is looking for a conf file, and it resides in the same directory as the script itself.

Here is the code:

<BLOCKQUOTE><FONT face="Verdana, Arial">code:</font><HR><pre>
#!/usr/bin/perl -wT
use CGI::Carp qw(fatalsToBrowser);


$conf_file = "/usr/home/acount_name/public_html/cgi-bin/chatpro.conf";
$default_lang_file = "/usr/home/acount_name/public_html/cgi-bin/chatpro.lang";

&main;

sub main {
$

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 02-23-2004 18:35

Are you sure that /usr/home/acount_name/public_html/cgi-bin/ is the correct path to your account?

If it is try

code:
use lib /usr/home/acount_name/public_html/cgi-bin/



put that line near the top of your perl script so the path will be added to th @INC variable. Perl should then be able to find your module.



-- not necessarily stoned... just beautiful.

Darkwind
Nervous Wreck (II) Inmate

From:
Insane since: Jul 2001

posted posted 02-24-2004 21:27

When I do that, I get this error:

quote:
syntax error at chatpro.cgi line 3, near "/home/account_name"
Execution of chatpro.cgi aborted due to compilation errors.



I don't think this program is going to work on the version of PERL without a major rewrite.

I'm thinking that to have this kind of chat, I'm going to have to write one using PHP. Which would give Me more experience with PHP. I was just looking to save some time.

Thanks for your help hyperbole.


hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 02-25-2004 19:24

I'm sorry. My fault. You need to put the path name in quotes

code:
use lib "/usr/home/acount_name/public_html/cgi-bin/";




-- not necessarily stoned... just beautiful.


[This message has been edited by hyperbole (edited 02-25-2004).]

Darkwind
Nervous Wreck (II) Inmate

From:
Insane since: Jul 2001

posted posted 02-26-2004 21:16

I recieved the original error code. I do appreciate your help. I'm going to write a PHP version since I'm thinking that this is a compatability problem between versions of PERL.

When I purchased the program, PERL4 was still the most popular but 5 was making huge inroads.

Or, the INC is misconfigured on the server. Not sure.

Again, thanks.

« BackwardsOnwards »

Show Forum Drop Down Menu