下記のようなエラー出てしまって解決できません、誰かが教えていただけません?
Mysqlのバージョンの問題のようには思いましたが解決できませんでした。
1)Strict Standards: Non-static method MyAdodbControl::getAdodbInstance() should not be called statically in /app/webtest.php on line 10
ソースコードはこれです。
$adodb = &MyAdodbControl::getAdodbInstance(); if (PEAR::isError($adodb)) { input_error($adodb->getMessage()); }
2)Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /includes/adodb/drivers/adodb-mysql.inc.php on line 348
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /includes/adodb/drivers/adodb-mysql.inc.php on line 348
ソースコードはこちらです。
function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) { if (!empty($this->port)) $argHostname .= ":".$this->port; if (ADODB_PHPVER >= 0x4300) $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword, $this->forceNewConnect,$this->clientFlags); else if (ADODB_PHPVER >= 0x4200) $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword, $this->forceNewConnect); else $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword); if ($this->_connectionID === false) return false; if ($argDatabasename) return $this->SelectDB($argDatabasename); return true; }
3)Fatal error: Call to undefined method PEAR::raise_error() in /lib/MyAdodbControl.class.php on line 30
ソースコードはここです。
function &getAdodbInstance() { static $singleton; if ($singleton == null) { require_once(ADODB_DIR. 'adodb.inc.php'); $ADODB_CACHE_DIR = ADODB_CACHE_DIR; $singleton = &ADONewConnection(ADODB_DSN); if (!$singleton) { return PEAR::raise_error(''); } $singleton->SetFetchMode(ADODB_FETCH_ASSOC); } return $singleton; } }
回答3件
あなたの回答
tips
プレビュー