in reply to Re^2: Can the username be represented differently ?
in thread Can the username be represented differently ?

744 translate to "rwxr--r--", but if you are running it as a CGI for testing you probably need it set as 755 ("rwxr-xr-x"). Also, in such a case, you likely want to include $|=1; after the #!/usr/bin/perl -wT line. You may also want to check the webserver error log to see if there is anything else occurring.

Hope that helps.

Replies are listed 'Best First'.
Re^4: Can the username be represented differently ?
by peterr (Scribe) on Jun 28, 2004 at 06:13 UTC
    The code now looks like this

    #!/usr/local/bin/perl -wT $|=1; $name = 'myusername'; $uid = getpwnam($name); print "$uid: $uid;


    but I'm still getting the 500 msg in the browser, and the web logs say "Premature end of script headers: /home/myusername/cgi-bin/getvars1.pl

    I think I had better check the forums at the hosts to see if anything has changed since last I used Perl, however I did just run FormMail.pl from the same path, it has a 744 and it worked just fine ??

    Thanks,

    Peter
      The browser output is now:

      uid: 32149

      Thanks,

      Peter