入口
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/php4(2)

php4/Makefile に次のように二行加えておく。 (しかし実は php4-session で make すれば、二行目の方は必要はないはず)
--- Makefile-oo	Fri May 24 12:19:49 2002
+++ Makefile	Fri May 24 11:58:46 2002
@@ -31,6 +31,7 @@
 
 CONF_FILES=	${EGDIR}/php.ini-recommended ${PKG_SYSCONFDIR}/php.ini
 OWN_DIRS=	${PREFIX}/${PHP_EXTENSION_DIR}
+CONFIGURE_ARGS+= --enable-i18n --enable-mbstring --enable-mbstr-enc-trans
+CONFIGURE_ARGS+= --enable-trans-sid --enable-session
 
 post-install:
 	${RMDIR} ${PREFIX}/include/php/ext/xml/expat/xmltok

configure の引数は、次のところでも確められる。

www/php4/work/php-4.1.2/config.status

# ./configure --without-mysql --without-pcre-regex --disable-posix --disable-session --disable-xml --with-config-file-path=/us r/pkg/etc --with-exec-dir=/usr/pkg/libexec/php4 --with-regex=system --enable-discard-path --enable-force-cgi-redirect --enable-memory-limit --enable-track-vars --enable-i18n --enable-mbstring --enable-mbstr-enc-trans --enable-trans-sid --host=powerpc--netbsd --prefix=/usr/ pkg
上記 --enable-session がないと次のようになる
output.o(.text+0x874): undefined reference to `session_adapt_flush'
undefined reference to `session_adapt_uris

php4 の版

php4 の版は、www/php4/Makefile.common に書いてあり、各地から参照されている。 万一変更したい時には、次のようにする。
Index: Makefile.common
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/www/php4/Makefile.common,v
retrieving revision 1.25
diff -u -r1.25 Makefile.common
--- Makefile.common	2002/04/12 17:59:57	1.25
+++ Makefile.common	2002/10/03 22:42:26
@@ -14,7 +14,7 @@
 # PHP_DIST_VERS		version number on the php distfile
 # PHP_BASE_VERS		pkgsrc-mangled version number (convert pl -> .)
 #
-PHP_DIST_VERS=		4.1.2
+PHP_DIST_VERS=		4.2.3
 PHP_BASE_VERS=		${PHP_DIST_VERS}
 
 DISTFILES?=		${PHP_DISTFILE}

Index: distinfo
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/www/php4/distinfo,v
retrieving revision 1.12
diff -u -r1.12 distinfo
--- distinfo	2002/09/04 14:47:40	1.12
+++ distinfo	2002/10/03 22:45:07
@@ -1,7 +1,9 @@
 $NetBSD: distinfo,v 1.12 2002/09/04 14:47:40 agc Exp $
 
 SHA1 (php-4.1.2.tar.gz) = fc4f9685b2b26d6e12af2e746a34fadfe57f0466
+SHA1 (php-4.2.3.tar.gz) = 3e57e8c056bd2f173bba8705293cdfa15aeb93bc
 Size (php-4.1.2.tar.gz) = 3359964 bytes
+Size (php-4.2.3.tar.gz) = 3413829 bytes
 SHA1 (patch-aa) = 09fb15fde09bf866d9be016839f33c889d9cefb9
 SHA1 (patch-ac) = 9478c18dbe18e8c4c05dffce31fa3f923562c832
 SHA1 (patch-ad) = 4ac02d0e0e5bd612254020d46292534a0e9445b0
単にそうするだけだと、次のようになってしまう。
===> Applying NetBSD patches for php-4.2.3
**************************************
Ignoring unknown patch file: /export/pkgsrc/www/php4/../../www/php4/patches/patch-ab
**************************************
1 out of 2 hunks failed--saving rejects to acinclude.m4.rej
Patch /export/pkgsrc/www/php4/../../www/php4/patches/patch-ac failed
*** Error code 1
Installing program: phpextdist
/bin/rmdir /usr/pkg/include/php/ext/xml/expat/xmltok
rmdir: /usr/pkg/include/php/ext/xml/expat/xmltok: No such file or directory
*** Error code 1
この画面は Jeedosaquin によって表示しています。
Last Update: Sat, 04 May 2019 00:45:20 GMT 1.66 2008/03/08