Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Linux to NT Open()

by darinlang (Initiate)
on Aug 07, 2002 at 02:53 UTC ( [id://188222]=perlquestion: print w/replies, xml ) Need Help??

darinlang has asked for the wisdom of the Perl Monks concerning the following question:

I have a simple script that I can't get to work on NT, it works fine on Linux, and Unix. Any idea why? The file exists in the same directory as the script, permissions are set to full-access, but it will not open the file.
print "Content-type: text/html\n\n"; open CONF_VIP, "VIP.txt" or die "Can't open config.txt. $!\n"; $vip = <CONF_VIP>; print "VIP is $vip\n";

Replies are listed 'Best First'.
Re: Linux to NT Open()
by dws (Chancellor) on Aug 07, 2002 at 03:20 UTC
    The file exists in the same directory as the script, permissions are set to full-access, but it will not open the file.

    For developement purposes only, add use CGI::Carp qw(fatalsToBrowser); to the top of your script. You should then see the error message (though note that you have the wrong filename in the die string).

Re: Linux to NT Open()
by weini (Friar) on Aug 07, 2002 at 04:53 UTC
    Hi,
    I guess your Webserver is not looking for your vip.txt-file in the same directory as your scripts is stored (probably \cgi-bin) but in the root-dir of the webpages (maybe \wwwroot).
    Try moving it there.

    HTH
    weini

    update: ... by the way: you get printed just the first line of the file (maybe you want @vip instead of $vip).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://188222]
Approved by rob_au
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2025-04-22 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.