入口
pkgsrc による設置
  php3
    php3-i18n
    database/php3-pgsql
    www/ap-php3
apache 版
postgres (1)
  php4-pgsql (3)
    make install
php4 (apache1)
  www/php4(2)
    php4 の版
  www/ap-php4(5)
  www/apache(4)
    IPv6
    IPv4+nossl
    Apache/SSL
php4(apache2) - 依存関係
  ap2-php4
    php4
    mod_php4.so
    /usr/pkg/etc/php.ini
  php4-session(6)
    session.so
    --enable-session
    core_globals
    map
    php4 i18n 無
    php4 i18n
  configure
セッション管理
  php3 互換モード
  php4 内蔵
  php4 + phplib
  phpinfo()
PostgreSQL 準備
  postmaster
  環境変数
  initdb
    実際の様子
    試しに起動
  postmaster 設定
  postgreql.conf
  pg_hba.conf
  postmaster の起動
  使用者登録
  pg_ctl
  /etc/rc.conf
  shutdown
データべースを作る
psql
  psql \h
  psql \?
  psql \h select
  psql \d
  psql \copy
  psql 操作
  Data Type
    DATE
Application
  pgpost
    pgpost 設置例
    psql で見る
  AuthPG
      create table
        GRANT
  pgimage
  pgimage psql
SQL
URL
  PostgreSQL
  PHP
良くある問題
    undefined pg_connect()
    Link-ID == false
    Call-time pass-by-reference
    session_register
    Undefined session_adapt_flush
    Failed opening for inclusion
  does not exist in ..
  pg_exec() query failed
  Undefined property: Port
  undefined function: preg_match()
  used in non-rule query
その他
適用例
  日記から等

PostgreSQL + Apache + PHP4 | PHP4 programming

www/ap-php4(5)

Apache 用の組込部品 mod_php4.so を作る

cd /usr/pkgsrc/www/ap-php4
Makefile に次の行を加えておく

CONFIGURE_ARGS+= --enable-i18n --enable-mbstring --enable-mbstr-enc-trans 
CONFIGURE_ARGS+= --enable-trans-sid --enable-session

make install

ttyp0:makoto@ibook  7:39:15/021008(...www/ap-php4)> make install
===> Installing for ap-php-4.2.3
===> Becoming root@ibook to install ap-php-4.2.3.
/usr/bin/su Password:
install -c -o root -g wheel -m 444 /export/pkgsrc/www/ap-php4/work/php-4.2.3/.libs/libphp4.so    /usr/pkg/lib/httpd/mod_php4.so
===> Please note the following:

===========================================================================
$NetBSD: MESSAGE,v 1.3 2002/08/26 00:12:51 grant Exp $

In order to use this module in your Apache installation, you need to
add the following to your httpd.conf file:

  LoadModule php4_module lib/httpd/mod_php4.so
  AddType application/x-httpd-php .php

You may also add following if you still use .php3 files:

  AddType application/x-httpd-php .php3

===========================================================================

===> Registering installation for ap-php-4.2.3
ap-php-4.2.3 requires installed package apache-1.3.26nb5
ap-php-4.2.3 requires installed package expat-1.95.2
ap-php-4.2.3 requires installed package libmm-1.2.1
ap-php-4.2.3 requires installed package php-4.2.3
ttyp0:makoto@ibook  7:47:04/021008(...www/ap-php4)> 
2004/09/18, make install
===> Installing for ap-php-4.3.8 if [ -f /export/pkgsrc/www/ap-php4/work/php-4.3.8/.libs/libphp4.so ]; then install -c -o root -g wheel -m 444 /export/pkgsrc/www/ap-php4/work/php-4.3.8/.libs/libphp4.so /usr/pkg/lib/httpd/mod_php4.so; elif [ -f /export/pkgsrc/www/ap-php4/work/php-4.3.8/libs/libphp4.so ]; then install -c -o root -g wheel -m 444 /export/pkgsrc/www/ap-php4/work/php-4.3.8/libs/libphp4.so /usr/pkg/lib/httpd/mod_php4.so; fi
===> Please note the following:

===========================================================================
$NetBSD: MESSAGE,v 1.4 2003/12/17 20:10:41 jdolecek Exp $

In order to use this module in your Apache 1.x installation, you need to
add the following to your httpd.conf file:

  LoadModule php4_module lib/httpd/mod_php4.so
  AddType application/x-httpd-php .php

You may also add following if you still use .php3 files:

  AddType application/x-httpd-php .php3

For Apache 2.x installation, you need following:

  LoadModule php4_module lib/httpd/mod_php4.so
  AddHandler application/x-httpd-php .php

You may also add following if you still use .php3 files:

  AddHandler application/x-httpd-php .php3

===========================================================================

===> Registering installation for ap-php-4.3.8
ap-php-4.3.8 requires installed package apache-2.0.50nb1
ap-php-4.3.8 requires installed package apr-0.9.5.2.0.50
ap-php-4.3.8 requires installed package expat-1.95.8nb1
ap-php-4.3.8 requires installed package php-4.3.8
info.php (等)の内容
<?php	
phpinfo();
?>
上のような短い内容で info.php などを作り、http:// で見ると、 環境変数等の情報の画面 が表示されれば、ap-php4 の設置はうまく行っています。 以下 (準備中) その時に、下の図のように、PostgreSQL の項目が表示されていることを確認します。 されていない場合には、上の青文字と、 二つ前の画面の中の 青文字が設定されているかを確認します。

この画面は Jeedosaquin によって表示しています。
Last Update: Fri, 03 May 2019 15:45:20 GMT 1.66 2008/03/08