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: 11665
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: 11555
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: 11607
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: 11608
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: 11592
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: 11641
Feb 6, 2001, 11:50 PM
Veteran / Moderator (18441 posts)
Feb 6, 2001, 11:50 PM
Post #10 of 37
Views: 11554
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: 11594
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: 11600
Feb 7, 2001, 5:10 AM
Veteran (19537 posts)
Feb 7, 2001, 5:10 AM
Post #13 of 37
Views: 11522
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: 11612
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: 11638
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: 11545
Feb 8, 2001, 12:15 PM
Veteran / Moderator (18441 posts)
Feb 8, 2001, 12:15 PM
Post #20 of 37
Views: 11511
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: 11481
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: 11527
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: 11577
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: 11433
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
Feb 8, 2001, 4:15 PM
Veteran (19537 posts)
Feb 8, 2001, 4:15 PM
Post #26 of 37
Views: 5547
I think you will find that \n doesn't work in the code that Dan provided - you have to use the br tag.
Paul Wilson.
new - http://www.wiredon.net
Paul Wilson.
new - http://www.wiredon.net
Feb 8, 2001, 4:21 PM
Veteran (19537 posts)
Feb 8, 2001, 4:21 PM
Post #27 of 37
Views: 5729
If you are that desperate to see what modules I have on the server.....go here....
http://odp.wiredon.net/cgi-bin/pm.cgi
Paul Wilson.
new - http://www.wiredon.net
http://odp.wiredon.net/cgi-bin/pm.cgi
Paul Wilson.
new - http://www.wiredon.net
Feb 8, 2001, 11:27 PM
Veteran / Moderator (18441 posts)
Feb 8, 2001, 11:27 PM
Post #29 of 37
Views: 5685
Feb 8, 2001, 11:28 PM
Veteran / Moderator (18441 posts)
Feb 8, 2001, 11:28 PM
Post #30 of 37
Views: 5650
Noooo, i just wondered how it worked....
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Feb 8, 2001, 11:29 PM
Veteran / Moderator (18441 posts)
Feb 8, 2001, 11:29 PM
Post #31 of 37
Views: 5662
Sorry, I've changed it now! I wondered why he used {br} as i have never seen this make a break in a link; i don't even know it as a Perl function....
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Feb 8, 2001, 11:44 PM
Enthusiast (760 posts)
Feb 8, 2001, 11:44 PM
Post #32 of 37
Views: 5672
Hi Andy:
I did explain in my initial post. The forum script parses out some HTML tags like the br one (but not all). That is why I placed them in curly braces with the added notation that you had to replace the curly braces with angular (not square as one posted) brackets.
For example, here is the HTML br tag -
Did you see it? That is why I placed the br tag in curly braces so you could see it.
Dan
Note:
=====
[] Square Brackets (=Brackets)
{} Curly Braces (colloquial?)
() Parentheses
<> Angular Brackets
I did explain in my initial post. The forum script parses out some HTML tags like the br one (but not all). That is why I placed them in curly braces with the added notation that you had to replace the curly braces with angular (not square as one posted) brackets.
For example, here is the HTML br tag -
Did you see it? That is why I placed the br tag in curly braces so you could see it.
Dan
Note:
=====
[] Square Brackets (=Brackets)
{} Curly Braces (colloquial?)
() Parentheses
<> Angular Brackets
Feb 8, 2001, 11:47 PM
Veteran / Moderator (18441 posts)
Feb 8, 2001, 11:47 PM
Post #33 of 37
Views: 5671
Thanks... lol.... I didn't see the bit where you said to change to square brackets...
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Feb 9, 2001, 4:57 AM
Veteran (19537 posts)
Feb 9, 2001, 4:57 AM
Post #34 of 37
Views: 5629
Erm.......
NO Anthro.......I have tested both codes and \n does NOT work in the code Dan gave.....myself and youradds have both tried it and it doesn't work so you may want to check your facts before you shout your mouth off.
Paul Wilson.
new - http://www.wiredon.net
NO Anthro.......I have tested both codes and \n does NOT work in the code Dan gave.....myself and youradds have both tried it and it doesn't work so you may want to check your facts before you shout your mouth off.
Paul Wilson.
new - http://www.wiredon.net
Feb 9, 2001, 8:22 AM
Veteran (19537 posts)
Feb 9, 2001, 8:22 AM
Post #36 of 37
Views: 5674
WELL it doesn't work for me and it doesn't work for youradds.
Paul Wilson.
new - http://www.wiredon.net
Paul Wilson.
new - http://www.wiredon.net
Feb 9, 2001, 12:28 PM
Veteran / Moderator (18441 posts)
Feb 9, 2001, 12:28 PM
Post #37 of 37
Views: 5545
Just tried it, and it does work now....
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com
Andy
http://www.ace-installer.com
webmaster@Ace-installer.com