Can't locate configure.cgi

apps

#1

Hi,

Has anyone experience with cgi-scripts from superscripts.com or drewstar.com ?

Tis is what my Telnet say;

zebes:~> perl q2.be/cgi-bin/matchmasters/login.cgi
Can’t locate configure.cgi in @INC (@INC contains: /usr/local/lib/perl/5.6.1 /us
r/local/share/perl/5.6.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.6.1 /us
r/share/perl/5.6.1 /usr/local/lib/site_perl .) at q2.be/cgi-bin/matchmasters/log
in.cgi line 16.

(login.cgi 16 = require “configure.cgi”; )

My good dreamhost support told me this;

Generally what this error means is that it’s looking for a file called “configure.cgi”, and is unable to find it in the places it expects to.
You should make sure that it is where the documentation says it should be, and try again.

Like the doc. say it’s in 2 directeries, upload in ASCII, chmod 755 etc.

Knowing all the cgi files works except those associated with the mysqldatabase

Can somebody help me in some way?


#2

It appears the login.cgi script is looking for configure.cgi in the current directory and not able to find it there, nor in the directories perl also looks for library files.

Note the full path to the file, then edit the scripts that have the require statements in them to specify the full path. For example,

require "/home/username/domain/configure.cgi"; And the scripts should have no problem finding it as long as it is actually there.


#3

Ooo yes , he only say to input it in the bulkemail.cgi

I put the full path in every script that have the “ require “configure.cgi”; “

Now I got this;

[zebes]$ perl q2.be/cgi-bin/matchmasters/admin/quemail.cgi
Content-type: text/html

ERROR! Subject Missing![zebes]$
[zebes]$ perl q2.be/cgi-bin/matchmasters/login.cgi
Content-type: text/html

Invalid Login[zebes]$

[quote]looks good I guess, but…
[/quote]


Invalid Login[zebes]$ perl q2.be/cgi-bin/matchmasters/add.cgi
DBI->connect(1test) failed: Can’t connect to local MySQL server through socket ‘
/var/run/mysqld/mysqld.sock’ (111) at q2.be/cgi-bin/matchmasters/add.cgi line 57
Couldn’t connect to database!

Add.cgi line 57 => $dbh = DBI->connect(“dbi:mysql:$mysqldatabase”,"$mysqlusername","$mysqlpassword") || die(“Couldn’t connect to database!\n”);

[zebes]$ perl q2.be/cgi-bin/matchmasters/forgot.cgi
DBI->connect(1test) failed: Can’t connect to local MySQL server through socket ‘
/var/run/mysqld/mysqld.sock’ (111) at q2.be/cgi-bin/matchmasters/forgot.cgi line 30
Couldn’t connect to database!

forgot.cgi line 30 => $dbh = DBI->connect(“dbi:mysql:$mysqldatabase”,"$mysqlusername","$mysqlpassword") || die(“Couldn’t connect to database!\n”);

[zebes]$ perl q2.be/cgi-bin/matchmasters/admin/adminmodify.cgi
DBI->connect(1test) failed: Can’t connect to local MySQL server through socket ‘
/var/run/mysqld/mysqld.sock’ (111) at q2.be/cgi-bin/matchmasters/admin/adminmodify.cgi line 58
Couldn’t connect to database!

adminmodify.cgi line 58 => $dbh = DBI->connect(“dbi:mysql:$mysqldatabase”,"$mysqlusername","$mysqlpassword") || die(“Couldn’t connect to database!\n”);

[zebes]$ perl q2.be/cgi-bin/matchmasters/admin/count.cgi
DBI->connect(1test) failed: Can’t connect to local MySQL server through socket ‘
/var/run/mysqld/mysqld.sock’ (111) at q2.be/cgi-bin/matchmasters/admin/count.cgi line 20
Couldn’t connect to database!

count.cgi line 20 => $dbh = DBI->connect(“dbi:mysql:$mysqldatabase”,"$mysqlusername","$mysqlpassword") || die(“Couldn’t connect to database!\n”);

[zebes]$ mysql -h mysql1test.q2.be -u 1test -p
Enter password: xxxx
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is xxxx to server version: 3.23.54-max-log

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql>

(type ISAM)

so gues the mysqldatabase is okey

This is a part of my config.cgi;

sub configure {
########################################

CGI CONFIGURATION VARIABLES

########################################
$mailprogram = “/usr/lib/sendmail”;
$mysqldatabase= “xxx”;
$mysqlusername = “xxx”;
$mysqlpassword = “xxxxxx”;

(there’s nothing more about my mysqldatabase to enter)

OMG, starting to get ….

Thanx


#4

Invalid Login[zebes]$ perl q2.be/cgi-bin/matchmasters/add.cgi DBI->connect(1test) failed: Can't connect to local MySQL server through socket ' /var/run/mysqld/mysqld.sock' (111) at q2.be/cgi-bin/matchmasters/add.cgi line 57 Couldn't connect to database! That error means the scripts tried connecting to a database using a socket and failed. DreamHost hosts the databases on a different machine and you have to tell your scripts what machine it is - and thats why you have to choose a hostname for your database in the Web Admin Panel.

[code]sub configure {
########################################

CGI CONFIGURATION VARIABLES

########################################
$mailprogram = “/usr/lib/sendmail”;
$mysqldatabase= “xxx”;
$mysqlusername = “xxx”;
$mysqlpassword = “xxxxxx”;
[/code]
You need edit the above to use the following assignment:

$mysqldatabase = “database=(database name);host=(database hostname)”;

where:

(database name) = name of the database
(database hostname) = the hostname you chose in the web admin panel

example:

$mysqldatabase = "database=toysforboys;host=toysforboys.toystore.com";
For further reference, check out the documentation of the DBD::mysql module:

http://aspn.activestate.com/ASPN/CodeDoc/DBD-mysql/DBD/mysql.html