vine-users ML アーカイブ



[vine-users:078252] mysqlのエ ラー

  • From: kaz <okui@xxxxxxxxxxxx>
  • Subject: [vine-users:078252] mysqlのエ ラー
  • Date: Sat, 29 Mar 2008 12:02:15 +0900
こんにちは 奥井です。

phpからmysqlへの接続について色々やっててわからないことがあるのでご教授おねがいします。

やったこと。
/etc/php.iniで;extenshon=msql.soを以下に変更(msql.soになってました)
extenshon=mysql.so
php-mysqlをインストール
apt-get install php-mysql

rpm mysql|grep phpの結果
php-4.4.8-0vl1
php-apache2-4.4.8-0vl1
php-mysql-4.4.8-0vl1
php-apache-4.4.8-0vl1
php-pear-4.4.8-0vl1

apache2をリスタート
/etc/rc.d/init.d/apache2 restart


試しに以下を実行したらmysql接続は問題なし。
<?php
$link = mysql_connect('localhost', 'root', '78c$V091');
if (!$link) {
   die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>

目的としたスクリプトを実行したらデータベースが作成されておらずおかしいなと思い/var/log/apache2/error_logを見ると色々エラーあり
apache2 restartのあとに色々でてるけどこの意味がよくわかりません。
実行したスクリプトについてはなにもエラーはでていません。
[Sat Mar 29 11:39:02 2008] [notice] caught SIGTERM, shutting down
[Sat Mar 29 11:39:03 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sat Mar 29 11:39:04 2008] [warn] module php4_module is already loaded, skipping
[Sat Mar 29 11:39:04 2008] [notice] Digest: generating secret for digest authentication ...
[Sat Mar 29 11:39:04 2008] [notice] Digest: done
PHP Notice:  Constant MYSQL_ASSOC already defined in Unknown on line 0
PHP Notice:  Constant MYSQL_NUM already defined in Unknown on line 0
PHP Notice:  Constant MYSQL_BOTH already defined in Unknown on line 0
PHP Notice:  Constant MYSQL_CLIENT_COMPRESS already defined in Unknown on line 0
PHP Notice:  Constant MYSQL_CLIENT_SSL already defined in Unknown on line 0
PHP Notice:  Constant MYSQL_CLIENT_INTERACTIVE already defined in Unknown on line 0
PHP Notice:  Constant MYSQL_CLIENT_IGNORE_SPACE already defined in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_connect in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_close in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_select_db in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_query in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_unbuffered_query in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_db_query in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_list_dbs in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_list_tables in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_list_fields in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_list_processes in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_error in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_errno in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_affected_rows in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_insert_id in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_result in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_num_rows in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_num_fields in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_fetch_row in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_fetch_array in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_fetch_assoc in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_fetch_object in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_data_seek in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_fetch_lengths in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_fetch_field in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_field_seek in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_free_result in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_field_name in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_field_table in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_field_len in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_field_type in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_field_flags in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_escape_string in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_real_escape_string in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_stat in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_thread_id in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_client_encoding in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_ping in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_get_client_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_get_host_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_get_proto_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_get_server_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_info in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_fieldname in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_fieldtable in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_fieldlen in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_fieldtype in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_fieldflags in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_selectdb in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_freeresult in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_numfields in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_numrows in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_listdbs in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_listtables in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_listfields in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_db_name in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_dbname in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_tablename in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_table_name in Unknown on line 0
PHP Warning:  mysql:  Unable to register functions, unable to load in Unknown on line 0
[Sat Mar 29 11:39:05 2008] [notice] Apache/2.2.3 (Unix) configured -- resuming normal operations