アプリ版:「スタンプのみでお礼する」機能のリリースについて

お世話になります。
下記のCGIで掲示板を作成したいと思っているのですが、エラーが出てしまい設置できずにおります。
http://plus-code.net/cgi-flash-bbs/perlbbs/
サポートも終了してしまっていてお手上げ状態です・・・。

エラー内容は以下の通りです。
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 1 at C:/www/users/○○○/cgi-bin/config.cgi line 87.

87行目近辺のソースはこのような感じでした。

***********************************
my $dbh = DBI->connect("DBI:mysql:$in{d_databasename}:$in{d_hostname}", $in{d_username}, $in{d_password},{RaiseError => 1, PrintError => 0, AutoCommit => 0 }) || &error_html($ref_ini->{action_error}{db_er1});      //line 70

my $user="forum";
my $pass=&Cf::Random::d_crypt($user);
my $random_url=&Cf::Random::az09($ref_ini->{setup}{adjust30});
my @que=(
"insert into public values(1,'','','','','','','http://','',0,1,0,3000,10,10,10,30,7,0,1,3000,1, …
"insert into member values('u$tm','$user','$ip','$pass','','webmaster',0,0,'',0)",
"insert into section values('s$tm',0,'section_title','section_explain','webmaster','$user')",
"insert into forum values('f$tm','s$tm',0,'forum_title','forum_explain','webmaster','$user')",
"insert into contact values('c$tm','$user','webmaster','to_forum','webmaster','message title','message comment','','')",
"insert into clap values('s$tm','f$tm','t$tm','p$tm','w$tm','$user','$ip','testclap',10)",
"insert into post values('s$tm','f$tm','t$tm','p$tm','$user','webmaster','$ip','test title','test message','','',1,'')",
"insert into report values('r$tm','p$tm','$user','report title','report message')"
);

eval{my ($sth);
for (my $j=0;$j<scalar(@{$$ref_sql{create_table}});$j++) {      //line 87
$sth = $dbh->prepare($ref_sql->{create_table}[$j]);$sth->execute;
}#for end
for my $j(@que){$sth = $dbh->prepare($j);$sth->execute;

$sth->finish;}$dbh->commit;$dbh->disconnect;};


if($@){$dbh->rollback;$dbh->disconnect;&error_html($@);}      //line 95
***********************************

何卒宜しくお願い致します!

A 回答 (1件)

テーブル作成のSQLでこけてるようですね。


perlbbs\var\sql.cgiのtype=InnoDBは、MySQL4の構文かな?
MySQL5では、ENGINE=InnoDBのようです。
まずはその辺でしょうか。
    • good
    • 0
この回答へのお礼

さっそくの回答ありがとうございます!
type=InnoDBはMySQL4だったのですね・・・。
配布CGIの必須項目にMySQL5と書いてあったのでそのまま使えるものだと思ってました(^^;
おかげさまで何とかできそうです!ありがとうございました!

お礼日時:2011/10/26 11:21

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!