[PHP-users 9972] PHP¤«¤é¤ÎDB¥ê¥â¡¼¥È¥¢¥¯¥»¥¹

php-users@php.gr.jp php-users@php.gr.jp
Wed, 11 Sep 2002 11:23:27 +0900


»Ï¤á¤Þ¤·¤Æ¡¢±«µÜ¤È¿½¤·¤Þ¤¹¡£PHP¤«¤é¤ÎDB¤Ø¤ÎÀܳ¤Ë¤Ä¤¤¤Æ¼ÁÌ䤵¤»¤Æ¤¯¤À¤µ¤¤¡£¥Þ¥·¥óA¤«¤é¡¢PHP¤Ç¥Þ¥·¥óB¤ÎDB¤Ë¥¢¥¯¥»¥¹¤¹¤ëºÝ¤Ë²¼µ­¤Î¤è¤¦¤Ê¥¨¥é¡¼¤¬½Ð¤Æ¤¤¤Þ¤¹¡£¤Ê¤Ë¤Ö¤ó½é¿´¼Ô¤Ê¤Î¤â¤Ç¡¢¸¡º÷¤·¤Æ¤âÂкö¤Ê¤É¤¬È¯¸«¤Ç¤­¤Ê¤¤¤Ç¡¢¤É¤Ê¤¿¤«¶µ¤¨¤Æ¤¯¤À¤µ¤¤¡£°ø¤ß¤Ë¥Þ¥·¥óB¤ÎPostgres¤ÏÀµ¾ï¤ËÆ°ºî¤·¤¤¤Þ¤¹¡£"-i"¥ª¥×¥·¥ç¥ó¤Ç¤Îµ¯Æ°¤Ç¤¹¤·¡¢pg_hba.conf¤Ë¤â¥¢¥¯¥»¥¹µö²Ä¤òÍ¿¤¨¤Æ¤¤¤Þ¤¹¡£¡þ¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¡þWarning: pg_connect() unable to connect to PostgreSQL server: connectDBStart() -- connect() failed: Invalid argument Is the postmaster running (with -i) at '¥Þ¥·¥óB' and accepting connections on TCP/IP port '5432'? in /public/htdocs/phptest.php on line 21It failed to the implementation¡þ¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¡þ¥Þ¥·¥óAOS:HP-UX11.00DB:Postgres7.0.2(PHP¤Î¥³¥ó¥Ñ¥¤¥ëÍѤǻÈÍѤϤ·¤Þ¤»¤ó)PHP¡§php4.2.2¥Þ¥·¥óBOS:TurboLinux6.5JDB:Postgres7.0.2PHP:php3.0.18-i18n-ja-2¤Ç¤¹¡£Ê̤Υޥ·¥ó(OS¤ÏTurbo7)¤«¤é¡¢¥Þ¥·¥óB¤Ø¡ŠPHP4.0.6¤Ç¥¢¥¯¥»¥¹¤·¤¿¤È¤³¤í¡¢DB¤ØÀܳ½ÐÍè¤Æ¤¤¤Þ¤¹¡£(¥×¥í¥°¥é¥à¤ÏÁ´¤¯Æ±¤¸¤â¤Î¤ò»ÈÍѤ·¤Æ¤¤¤Æ¡¢»ê¶Ë´Êñ¤Ê¤â¤Î¤Ç¤¹)¥×¥í¥°¥é¥à¤Ï²¼µ­¤ÎÄ̤ê¤Ç¤¹¡£<?phpecho "";$host = "¥Þ¥·¥óB";$port = "5432";$db_name = "testdb";$conn_id = pg_connect( "host=$host user=$user dbname=$db_name" );if( !$conn_id ){        echo "It failed to the implementation
\n";        exit;}echo "con_id=$conn_id
";echo "";?>Ĺ¡¹¤È¤¹¤¤¤Þ¤»¤ó¤¬¡¢¤É¤Ê¤¿¤«Í­¼±¼Ô¤ÎÊý¤¬¤¤¤¿¤é¶µ¤¨¤Æ夭¤¿¤¤¤Î¤Ç¤¹¤¬¡¢¤ª´ê¤¤¤·¤Þ¤¹¡£---------------------------±«µÜ¡¡·°Amemiya kaorue-mail:k_all@infoseek.jp------------------------------------------------------------------------¡ú¡Ô¹­¹ð¡Õ¤¬¾Ã¤¨¤ë¡ª¡©¡ª¡©¡¡¤½¤ì¤¬¡¢Í­ÎÁ¥á¡¼¥ê¥ó¥°¥ê¥¹¥È by infoseek http://sml.www.infoseek.co.jp/?svx=971148