recently i declined to add a link to the site .. so i hit delete ... it went through the motions and returned an error (sendmail path something or other not found) yet i know that sendmail path is fine ... what can i do? (i can't login using telnet.)
Feb 2, 2001, 5:51 PM
Veteran (19537 posts)
Feb 2, 2001, 5:51 PM
Post #2 of 37
Views: 11796
Add the following code to a file and name it sendmail.cgi....
#!/usr/bin/perl
sendmail();
sub sendmail {
# ------------------------------------------------------------------
# Try and figure out where sendmail is located.
#
-x '/usr/sbin/sendmail' and return '/usr/sbin/sendmail';
-x '/usr/lib/sendmail' and return '/usr/lib/sendmail';
-x '/bin/sendmail' and return '/bin/sendmail';
return '';
}
.....execute it from your browser and it will tell you where sendmail is.
Then edit the path to sendmail in links.cfg
Paul Wilson.
NEW website coming soon...
#!/usr/bin/perl
sendmail();
sub sendmail {
# ------------------------------------------------------------------
# Try and figure out where sendmail is located.
#
-x '/usr/sbin/sendmail' and return '/usr/sbin/sendmail';
-x '/usr/lib/sendmail' and return '/usr/lib/sendmail';
-x '/bin/sendmail' and return '/bin/sendmail';
return '';
}
.....execute it from your browser and it will tell you where sendmail is.
Then edit the path to sendmail in links.cfg
Paul Wilson.
NEW website coming soon...
Feb 6, 2001, 11:23 AM
Veteran / Moderator (18441 posts)
Feb 6, 2001, 11:23 AM
Post #3 of 37
Views: 11685
I've never seen this code before, how does it work? Or more to the point, why doesn't it work? I tried it as a script called sendmail.cgi, and executed it from my browser, and i got a 500 Error!!!
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Feb 6, 2001, 11:29 AM
Veteran / Moderator (18441 posts)
Feb 6, 2001, 11:29 AM
Post #4 of 37
Views: 11737
Just tried it via telenet, and that didn't work either!!!
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Feb 6, 2001, 11:30 AM
Veteran (19537 posts)
Feb 6, 2001, 11:30 AM
Post #5 of 37
Views: 11738
Oops...try printing the header at the top.....
It is from the Links SQL install script
Paul Wilson.
new - http://www.wiredon.net
It is from the Links SQL install script
Paul Wilson.
new - http://www.wiredon.net
Feb 6, 2001, 11:37 AM
Veteran (19537 posts)
Feb 6, 2001, 11:37 AM
Post #6 of 37
Views: 11722
Ok this works.........
#!/usr/bin/perl
sendmail();
sub sendmail {
# ------------------------------------------------------------------
# Try and figure out where sendmail is located.
#
print "Content-type: text/html\n\n";
-x '/usr/sbin/sendmail' and print "/usr/sbin/sendmail";
-x '/usr/lib/sendmail' and print "/usr/lib/sendmail";
-x '/bin/sendmail' and print "/bin/sendmail";
}
Paul Wilson.
new - http://www.wiredon.net
#!/usr/bin/perl
sendmail();
sub sendmail {
# ------------------------------------------------------------------
# Try and figure out where sendmail is located.
#
print "Content-type: text/html\n\n";
-x '/usr/sbin/sendmail' and print "/usr/sbin/sendmail";
-x '/usr/lib/sendmail' and print "/usr/lib/sendmail";
-x '/bin/sendmail' and print "/bin/sendmail";
}
Paul Wilson.
new - http://www.wiredon.net
Feb 6, 2001, 11:32 PM
Veteran / Moderator (18441 posts)
Feb 6, 2001, 11:32 PM
Post #8 of 37
Views: 11772
Feb 6, 2001, 11:50 PM
Veteran / Moderator (18441 posts)
Feb 6, 2001, 11:50 PM
Post #10 of 37
Views: 11684
Don't worry, got it working now. Can this be used for other functions like finding out the installed modules on your server (like PerlDiver)???
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Feb 7, 2001, 12:07 AM
Enthusiast (760 posts)
Feb 7, 2001, 12:07 AM
Post #11 of 37
Views: 11725
Hi Andy:
Use the following code to locate installed modules:
#!/usr/bin/perl
use strict;
print "Content-type: text/html\n\n";
use File::Find;
my (@mod, %done, $dir);
find (\&get_module, grep { -r and -d } @INC);
@mod = grep (!$done{$_}++, @mod);
foreach $dir (sort { length $b <=> length $a } @INC) {
foreach (@mod) { next if s,^\Q$dir,,; }
}
foreach (@mod) { s,^/(.*)\.pm$,$1,; s,/,::,g; print "$_
\n"; }
sub get_module {
/^.*\.pm$/ && /$ARGV[0]/i && push @mod, $File::Find::name;
}
Dan
Use the following code to locate installed modules:
#!/usr/bin/perl
use strict;
print "Content-type: text/html\n\n";
use File::Find;
my (@mod, %done, $dir);
find (\&get_module, grep { -r and -d } @INC);
@mod = grep (!$done{$_}++, @mod);
foreach $dir (sort { length $b <=> length $a } @INC) {
foreach (@mod) { next if s,^\Q$dir,,; }
}
foreach (@mod) { s,^/(.*)\.pm$,$1,; s,/,::,g; print "$_
\n"; }
sub get_module {
/^.*\.pm$/ && /$ARGV[0]/i && push @mod, $File::Find::name;
}
Dan
Feb 7, 2001, 3:13 AM
Veteran / Moderator (18441 posts)
Feb 7, 2001, 3:13 AM
Post #12 of 37
Views: 11730
Feb 7, 2001, 5:10 AM
Veteran (19537 posts)
Feb 7, 2001, 5:10 AM
Post #13 of 37
Views: 11653
If you want to check out the php environment make a php3 file called info.php3 and add the following code...
<? phpinfo(); ?>
Ooops......sorry off topic.
Paul Wilson.
new - http://www.wiredon.net
<? phpinfo(); ?>
Ooops......sorry off topic.
Paul Wilson.
new - http://www.wiredon.net
Feb 7, 2001, 12:33 PM
Veteran / Moderator (18441 posts)
Feb 7, 2001, 12:33 PM
Post #14 of 37
Views: 11743
That code didn't seem to work forme!! Any ideas? (IS Error)
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Feb 7, 2001, 11:55 PM
Veteran / Moderator (18441 posts)
Feb 7, 2001, 11:55 PM
Post #17 of 37
Views: 11769
Right, i got it working now. Is there anyway to make it get displays in a downwards collumn (rather than just a mess of different modules installed!!!)
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Feb 8, 2001, 1:22 AM
Veteran / Moderator (18441 posts)
Feb 8, 2001, 1:22 AM
Post #19 of 37
Views: 11675
Feb 8, 2001, 12:15 PM
Veteran / Moderator (18441 posts)
Feb 8, 2001, 12:15 PM
Post #20 of 37
Views: 11642
Right, this is the code i am now using (just gives me blank pages now, not IS Errors);
#!/usr/bin/perl
use strict;
print "Content-type: text/html\n\n";
use File::Find;
my (@mod, %done, $dir);
find (\&get_module, grep { -r and -d } @INC);
@mod = grep (!$done{$_}++, @mod);
foreach $dir (sort { length $b <=> length $a } @INC) {
foreach (@mod) { next if s,^\Q$dir,,; }
}
foreach (@mod) { s,^/(.*)\.pm$,$1,; s,/,::,g; print "$_{br}\n"; }
sub get_module {
/^.*\.pm$/ && /$ARGV[0]/i && push @mod, $File::Find::name;
}
Any ideas???
Thanks
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
#!/usr/bin/perl
use strict;
print "Content-type: text/html\n\n";
use File::Find;
my (@mod, %done, $dir);
find (\&get_module, grep { -r and -d } @INC);
@mod = grep (!$done{$_}++, @mod);
foreach $dir (sort { length $b <=> length $a } @INC) {
foreach (@mod) { next if s,^\Q$dir,,; }
}
foreach (@mod) { s,^/(.*)\.pm$,$1,; s,/,::,g; print "$_{br}\n"; }
sub get_module {
/^.*\.pm$/ && /$ARGV[0]/i && push @mod, $File::Find::name;
}
Any ideas???
Thanks
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Feb 8, 2001, 12:57 PM
Veteran (17240 posts)
Feb 8, 2001, 12:57 PM
Post #21 of 37
Views: 11612
Here is a copy of the Mod that jerry su wrote and it works fine for me across different browsers (initially when jerry su released the Mod, it would only work in Netscape).
#!/usr/local/bin/perl
#
#############################################################
# File Name: modules.cgi
# Written by Widgetz, Jerry, Gossamer Threads Scripts User
# Last Modified: November 08,1999
#############################################################
use strict;
use File::Find;
my (@mod, %done, $dir);
find(\&get, grep { -r and -d } @INC);
@mod = grep(!$done{$_}++, @mod);
foreach $dir (sort { length $b <=> length $a } @INC) {
foreach (@mod) { next if s,^\Q$dir,,; }
}
print "Content-type: text/html\n\n";
foreach (@mod) { s,^/(.*)\.pm$,$1,; s,/,::,g; print "$_
\n"; }
print "Done! ($#mod modules!)\n\n";
sub get { /^.*\.pm$/ && /$ARGV[0]/i && push @mod, $File::Find::name; }
Regards,
Eliot Lee
Code:
#!/usr/local/bin/perl
#
#############################################################
# File Name: modules.cgi
# Written by Widgetz, Jerry, Gossamer Threads Scripts User
# Last Modified: November 08,1999
#############################################################
use strict;
use File::Find;
my (@mod, %done, $dir);
find(\&get, grep { -r and -d } @INC);
@mod = grep(!$done{$_}++, @mod);
foreach $dir (sort { length $b <=> length $a } @INC) {
foreach (@mod) { next if s,^\Q$dir,,; }
}
print "Content-type: text/html\n\n";
foreach (@mod) { s,^/(.*)\.pm$,$1,; s,/,::,g; print "$_
\n"; }
print "Done! ($#mod modules!)\n\n";
sub get { /^.*\.pm$/ && /$ARGV[0]/i && push @mod, $File::Find::name; }
Regards,
Eliot Lee
Feb 8, 2001, 1:04 PM
Veteran / Moderator (18441 posts)
Feb 8, 2001, 1:04 PM
Post #22 of 37
Views: 11658
Still shows all the found modules as one line (e.g. B::Asmdata B::Assembler B::Bblock B::Bytecode B::C B::CC B::Debug B::Deparse B::Disassembler B::Lint B::Showlex).
Any ideas?
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Any ideas?
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Feb 8, 2001, 2:02 PM
Enthusiast (760 posts)
Feb 8, 2001, 2:02 PM
Post #23 of 37
Views: 11708
Same issue with both - you must add a BR tag $_. My code does just that, and the modules are listed one per line. It doesn't show up in the code here because the forum script parses out HTML tags. Did you do as I said, change {} to HTML tag angular brackets? {br} is meaningless and will not produce line breaks.
Dan
Dan
Feb 8, 2001, 4:12 PM
Veteran (19537 posts)
Feb 8, 2001, 4:12 PM
Post #25 of 37
Views: 11564
DID you not read the post.......he said use a br tag with square brackets...... not {br}......surely you should know that!
Paul Wilson.
new - http://www.wiredon.net
Paul Wilson.
new - http://www.wiredon.net