Micha
|
| Posted: 04/17/2002, 4:20 AM |
|
When I Use php everything is ok but when I try to use CGI I get every times an Server Error 
I try it out on Windows and Linux Servers but I get only Erros "HTTP 500"
on this Servers run already DBI.
for Test I use a DB that is not on localhost I must call via IP but
in the created Common.pm I dont find any Inormation witch server is connected
-------------------------------------------------------------------------
# Create database connection string, login and password variables
my $strConn = "shop";
my $strLogin = "root";
my $strPassword = "";
# Open the connection
$dbh = DBI->connect($strConn, $strLogin, $strPassword, { PrintError => 0, RaiseError => 0 } );
# Connection end
-------------------------------------------------------------------------
is this correct ???
here is the Domain http://heidl.info/cc.html and you can go the the Scripts
Here you can look witch modules installed http://heidl.info/cgi-bin/sysinfo.pl
thanks for help
Micha
|
|
|
 |
Jon Westfall
|
| Posted: 04/17/2002, 5:03 AM |
|
Micha,
My CGI's run fine using the following connection string:
DBI:mysql:<databasename> so if your database name is shop, your connection string on mysql should be DBI:mysql:shop . I'm assuming that other database types (i.e. MSSQL) use a different second part. You do not set the IP or address of your server in common.pm - you don't need to call on IP because whatever machine the code will run on (your local workstation or the remote server) will automatically be selected depending on where the code is run.
Hope this helps,
Jon.
|
|
|
 |
Micha
|
| Posted: 04/17/2002, 5:27 AM |
|
I change it to :
# Create database connection string, login and password variables
my $strConn = "DBI:mysql:shop";
my $strLogin = "root";
my $strPassword = "";
But the effect is the same I dont think the Problem is the DB connection
because I dry the Scripts on 5 Servers 3 Linux and two Windows and every time the efect is the same (
I Transfer all in ASCII:Mode chmod 755 and modified the perl pfad
But the files orginal from CC
Micha
|
|
|
 |
Micha
|
| Posted: 04/17/2002, 5:48 AM |
|
I have fixed this problem
thanks
Micha
|
|
|
 |
Tezozomoc
|
| Posted: 02/24/2003, 10:12 AM |
|
Goto to your common.pm module and find the following lines and substitue the following items with yours.
Assumptions: you are using activeperl 5.8.X and you are using dbi mysqlPP (latest version).
$self->{DataSource}= "DBI:mysqlPP:database=databasename;host=localhost;port=3306";
$self->{UserName} = "root";
$self->{Password} = "";
|
|
|
 |
Tezozomoc
|
| Posted: 02/24/2003, 10:27 AM |
|
Okay...
Here is how you fix the problem in the project so you can generate the cgis without post fixing.
select project
->settings
->connection tab
->modify and existing or add
->server tab
->select perl database driver, mysql
->dbi data source name place the following and substitute your info.
DBI:mysqlPP:database=databasename;host=localhost;port=3306
login: xxxx
password: xxxx
This should work out for you.
Tezo.
|
|
|
 |