[PHP-users 24984] 誰か助けてくださいーーー!
柳町 洋光
hiromitsu @ m9.dion.ne.jp
2005年 3月 21日 (月) 14:56:05 JST
柳町です。
えっと、もうお手上げ状態でだれか助けてください。
こんなのが出てきちゃったんです。
Warning: main(../cgi_bin/cnv_disp.cgi): failed to open stream: No such file or directory in /virtual/dogear/public_html/cgi_bin/reg_staff.cgi on line 6
Warning: main(): Failed opening '../cgi_bin/cnv_disp.cgi' for inclusion (include_path='.:/usr/local/lib/php') in /virtual/dogear/public_html/cgi_bin/reg_staff.cgi on line 6
Warning: mysql_connect(): Access denied for user: 'dogear @ localhost' (Using password: YES) in /virtual/dogear/public_html/cgi_bin/reg_staff.cgi on line 24
Warning: mysql_select_db(): Access denied for user: 'dogear @ localhost' (Using password: NO) in /virtual/dogear/public_html/cgi_bin/reg_staff.cgi on line 25
Warning: mysql_select_db(): A link to the server could not be established in /virtual/dogear/public_html/cgi_bin/reg_staff.cgi on line 25
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /virtual/dogear/public_html/cgi_bin/reg_staff.cgi on line 27
必要ならばFTPの情報も送らせていただきます。
お願いでございます。
ちなみに問題のCGIのソースだけ載せておきます。
いったいなにが悪いんですか?
#!/usr/local/bin/php4
<?
session_start();
include "../cgi_bin/cnv_dbstr.cgi";
include "../cgi_bin/cnv_disp.cgi";
if($_POST["reg"]){
if(reg_staff()) include_once "../".$_SESSION["browse"]."/registered_staff.html";
else include_once "../".$_SESSION["browse"]."/error.html";
}
function reg_staff(){
if($_POST["mail"]==$_POST["mailconf"] and $_POST["pass"]==$_POST["passconf"]){
if(!empty($_POST["mail"]) and !empty($_POST["name"]) and !empty($_POST["pass"]) and !empty($_POST["old"]) and !empty($_POST["sex"])){
if(insert_db()) return TRUE;
}
else return FALSE;
}
else return FALSE;
}
function insert_db(){
$con=mysql_connect("localhost","dogear","HvPT");
mysql_select_db("staff");
$sql="INSERT INTO staff(mail,name,pass,old,sex) values(".cnv_dbstr($_POST["mail"]).",".cnv_dbstr($_POST["name"]).",".cnv_dbstr($_POST["pass"]).",".cnv_dbstr($_POST["old"]).",".cnv_dbstr($_POST["sex"]).");";
if($res=mysql_query($sql,$con)) return TRUE;
else return FALSE;
mysql_close($con);
}
?>
PHP-users メーリングリストの案内