Cgi Problems

secretman

Verified User
Joined
Nov 10, 2003
Messages
20
Hello,
i have some problems with cgi on direct admin.

Some script require a cgi library don't installed on direct admin.

I have other servers with Plesk and Cpanel and this scripts work good.

Is possible install other cgi library on direct admin?
 
Go into shell and run the script

cd /path/to/script
./script.cgi

if you can report the error output there it will help us determine your problem / what modules need installing

to install "CGI" (cgi.pm errors)

Code:
perl -MCPAN -e shell

Code:
cpan> install CGI

That will install the CGI bundle for you (CGI and a few CGI::* modules)

Chris
 
I have try to execute : perl -MCPAN -e shell
and have found errors : Can't locate Carp.pm in @INC ...

I don't have the Carp.pm on my server.

I have try to insert the Carp.pm of my cPanel server on the directadmin server but don't work.

Hot to make a install the file Carp.pm?
 
perl -MCPAN -e shell

install carp

check if you have cgi::carp also (in DA user panel under advanced)

Chris
 
I have try but appear compilation failed :

[root@server root]# perl -MCPAN -e shell
Can't locate Carp.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thr
ead-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-
multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/ven
dor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib
/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5
.8.0 .) at /usr/lib/perl5/5.8.0/CPAN.pm line 10.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/CPAN.pm line 10.
Compilation failed in require.
BEGIN failed--compilation aborted.
[root@server root]#

Have ideas for solutions?
 
Do you have the CGI Module (check the directadmin list.... user panel > advanced > installed perl modules

Chris
 
ByteLoader CPAN CPAN::Mirrored::By
CPAN::Nox Carp Class::ISA
Class::Struct Config Cwd
DB Data:: Dumper Demo
Descriptions Devel:: DProf Devel::pPPort

This are some modules installed. Carp is written but
the Carp.pm don't exist on server.
 
No i don't have.

This is the complete list with library installed :

AnyDBM_File Apache Apache::Connection
Apache::Constants Apache::Constants::Exports Apache::Debug
Apache::ExtUtils Apache::FakeRequest Apache::File
Apache::Include Apache::Leak Apache::Log
Apache::ModuleConfig Apache::MyConfig Apache::Opcode
Apache::Options Apache::perlRun Apache::perlRunXS
Apache::perlSections Apache::RedirectLogFix Apache::Registry
Apache::RegistryBB Apache::RegistryLoader Apache::RegistryNG
Apache::Resource Apache::SIG Apache::Server
Apache::SizeLimit Apache::StatINC Apache::Status
Apache::Symbol Apache::Symdump Apache::Table
Apache::URI Apache::Util Apache::httpd_conf
Apache::src Apache::test Attribute::Handlers
AutoLoader AutoSplit B
B::Asmdata B::Assembler B::Bblock
B::Bytecode B::C::Section B::CC
B::Concise B::Debug B::Deparse
B::Disassembler::BytecodeStream B::Lint B::Showlex
B::Stackobj B::Stash B::Terse
B::Xref Benchmark Bundle::Apache
ByteLoader CPAN CPAN::Mirrored::By
CPAN::Nox Carp Class::ISA
Class::Struct Config Cwd
DB Data::Dumper Demo
Descriptions Devel::DProf Devel::pPPort
Devel::peek Devel::SelfStubber Digest
Digest::MD5 DirHandle Dumpvalue
DynaLoader Encode Encode::Alias
Encode::Byte Encode::CJKConstants Encode::CN
Encode::CN::HZ Encode::Config Encode::EBCDIC
Encode::Encoder Encode::Encoding Encode::Guess
Encode::JP Encode::JP::H2Z Encode::JP::JIS7
Encode::KR Encode::KR::2022_KR Encode::MIME::Header
Encode::Symbol Encode::TW Encode::Unicode
English Env Errno
Exporter Exporter::Heavy ExtUtils::Command
ExtUtils::Command::MM ExtUtils::Constant ExtUtils::Embed
ExtUtils::Install ExtUtils::Installed ExtUtils::Liblist
ExtUtils::Liblist::Kid ExtUtils::MM ExtUtils::MM_Any
ExtUtils::MM_BeOS ExtUtils::MM_Cygwin ExtUtils::MM_DOS
ExtUtils::MM_MacOS ExtUtils::MM_NW5 ExtUtils::MM_OS2
ExtUtils::MM_UWIN ExtUtils::MM_Unix ExtUtils::MM_VMS
ExtUtils::MM_Win32 ExtUtils::MM_Win95 ExtUtils::MY
ExtUtils::MakeMaker ExtUtils::Manifest ExtUtils::Miniperl
ExtUtils::Mkbootstrap ExtUtils::Mksymlists ExtUtils::packlist
ExtUtils::testlib Fatal Fcntl
File::Basename File::CheckTree File::Compare
File::Copy File::DosGlob File::Find
File::Glob File::path File::Spec
File::Spec::Cygwin File::Spec::Epoc File::Spec::Functions
File::Spec::Mac File::Spec::OS2 File::Spec::Unix
File::Spec::VMS File::Spec::Win32 File::Temp
File::stat FileCache FileHandle
Filter::Util::Call Filter::Util::Exec Filter::cpp
Filter::decrypt Filter::exec Filter::sh
Filter::tee FindBin GDBM_File
Getopt::Long Getopt::Std Hash::Util
I18N::Collate I18N::LangTags I18N::LangTags::List
I18N::Langinfo IO IO::Dir
IO::File IO::Handle IO::pipe
IO::poll IO::Seekable IO::Select
IO::Socket IO::Socket::INET IO::Socket::UNIX
IPC::Msg IPC::Open2 IPC::Open3
IPC::Semaphore IPC::SysV List::Util
Locale::Constants Locale::Country Locale::Currency
Locale::Language Locale::Maketext Locale::Script
MIME::Base64 MIME::QuotedPrint Math::BigFloat
Math::BigFloat::Trace Math::BigInt Math::BigInt::Calc
Math::BigInt::Scalar Math::BigInt::Trace Math::BigRat
Math::Complex Math::Trig Memoize
Memoize::AnyDBM_File Memoize::Expire Memoize::ExpireFile
Memoize::ExpireTest Memoize::SDBM_File Memoize::Storable
MyClass NEXT Net::Cmd
Net::Config Net::Domain Net::FTP
Net::FTP::A Net::FTP::E Net::FTP::I
Net::FTP::L Net::FTP::dataconn Net::NNTP
Net::Netrc Net::pOP3 Net::ping
Net::SMTP Net::Time Net::hostent
Net::netent Net::protoent Net::servent
O Opcode POSIX
PerlIO PerlIO::encoding PerlIO::scalar
PerlIO::via PerlIO::via::QuotedPrint Pod::Checker
Pod::Find Pod::Functions Pod::Html
Pod::InputObjects Pod::LaTeX Pod::Man
Pod::parseLink Pod::parseUtils Pod::parser
Pod::perldoc Pod::perldoc::BaseTo Pod::perldoc::GetOptsOO
Pod::perldoc::ToChecker Pod::perldoc::ToMan Pod::perldoc::ToNroff
Pod::perldoc::ToPod Pod::perldoc::ToRtf Pod::perldoc::ToText
Pod::perldoc::ToTk Pod::perldoc::ToXml Pod::plainText
Pod::plainer Pod::Select Pod::Text
Pod::Text::Color Pod::Text::Overstrike Pod::Text::Termcap
Pod::Usage SDBM_File Safe
Scalar::Util Search::Dict SelectSaver
SelfLoader Shell Socket
Storable Switch Symbol
Sys::Hostname Sys::Syslog Term::ANSIColor
Term::Cap Term::Complete Term::ReadLine::Stub
Test Test::Builder Test::Harness
Test::Harness::Assert Test::Harness::Iterator Test::Harness::Straps
Test::More Test::Simple Text::Abbrev
Text::Balanced Text::parseWords Text::Soundex
Text::Tabs Text::Wrap Thread
Thread::Queue Thread::Semaphore Tie::Array
Tie::File Tie::Handle Tie::Hash
Tie::Memoize Tie::RefHash Tie::Scalar
Tie::SubstrHash Time::Local Time::gmtime
Time::localtime Time::tm UNIVERSAL
Unicode::Collate Unicode::Normalize Unicode::UCD
User::grent User::pwent XS::APItest
XS::Typemap XSLoader attributes
attrs autouse base
bigint bignum bigrat
blib bytes charnames
constant diagnostics encoding
fields filetest if
integer less lib
locale mod_perl open
ops overload re
sigtrap sort strict
subs threads threads::shared
utf8 vars vmsish
warnings warnings::register
 
Ths should get you the cgi::* modules and CGI

wget http://www.cpan.org/modules/by-module/CGI/CGI.pm-3.04.tar.gz
tar -zxvf CGI.pm-3.04.tar.gz
cd CGI*
perl Makefile.pl
make
make install

Chris
 
I have upload and dezip but have some problems.

[root@server CGI.pm-3.04]# perl Makefile.PL
Can't locate Carp.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at /usr/lib/perl5/5.8.0/ExtUtils/MakeMaker.pm line 12.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/ExtUtils/MakeMaker.pm line 12.
Compilation failed in require at Makefile.PL line 1.
BEGIN failed--compilation aborted at Makefile.PL line 1.


:( :( :(
 
Hello,

Does anyone know which package carp.pm comes with? Isn't is just the base package of perl? ... if it is, then yes, a reinstall of perl would work... but your method of doing that would be up to you... Either download/compile the whole thing from scratch, or try to find an rpm to do it for you.

John
 
We have CARP, and the CGI bundle included on all of our images, although i know the CGI bundle is one that is not included as default with perl - so the images used on our servers are obviously not the default bundles.

Carp.pm I assume should come with CARP, although I cant find the CARP source module on its own!

However, in the documentation:

CGI scripts have a nasty habit of leaving warning messages in the error logs that are neither time stamped nor fully identified. Tracking down the script that caused the error is a pain. This fixes that. Replace the usual

use Carp;

with

use CGI::Carp



Now CGI::Carp is bundled with the CGI package (CGI.pm) and looks like it may be an alternative.

Its easy enough to reinstall the RPM so it may be worth a try anyway... however if you have a standard install currently its more than likely not perl itself...

Have you tried installing the CGI bundle from source?

Chris
 
I have order a server on a webhosting company.
They have installed Direct Admin for me.

I don't know how to install cgi.

I have only load cgi script on my server and too many works bad.

I have request assistance on support of my webhosting but they don't are expert for cgi problems :(

You are expert? I have need to restore the cgi library for use every cgi script without problems.
Is possible request you a cgi restore for pay?
I have a paypal account for paying you.

If it possible please write me. I have need to use cgi on my server.
 
Check permissions and ownership

Hi Secretman,
Just wondering if when installing the scripts on DA did you set
the correct permisions?
Also if you have not checked make sure that the files are owned
by your user name. (example) If your direct admin login name is admin then the files should be owned by admin.
If you need help on how to change the ownership with chown then let me know. I have uploaded a PHP script using my admin ftp account and unzipped it using my admin account in SSH and for some reasone the files were all owned by root.

Good Luck -Jason :D
 
This is a cgi library lacks problem.

Permission are correct.

Direct Admin is a bad control panel for cgi. Direct Admin install cgi very bad!
 
secretman said:
This is a cgi library lacks problem.

Permission are correct.

Direct Admin is a bad control panel for cgi. Direct Admin install cgi very bad!

Its a standard Perl install - Some very highly used modules such as CGI aren't packaged with it... what DA could do is install the modules, howevever if you already have them theres no need (and itwill only come out with errors unless it checks for files firtsly)

I just checked all of our servers and have all the highly used modules etc since its on our image (redhat 9 with no DA installed(the image))

Cpan also works fine which basically shows its not DA but rather the default system ;)

Again, have you tried installing the cgi.pm source?

Chris
 
To Confirm:

it's standard in Perl 5.003 and up

rpm -qa | grep "perl"

Chris
 
Back
Top