03
enterpri
s
e
Server Management
Cool Gizmos
Web Design Beyond
FileMaker Tips
Online Store
Server Management
Cool Gizmos
Web Design Beyond
FileMaker Tips
Online Store
Server Management
PEAR::DB_DataObjectインストール
12/20/2008 20:35:22
MacOSX Server 10.4へのインストール
PHP 5.2.6をインストール。次のステップである、pearコマンドからのMDBインストールとの連携を保つため、--prefix=/usr/local/phpとし、既存のPHP4ディレクトリ/usr/local/phpに置き換えた。
pear install -a MDB2#mysqli
でMDB2とMySQLドライバをインストール。ファイルは、/usr/lib/php/内に保存される。
configファイルを作成。Webルートディレクトリの一つ上にDataObjectsフォルダを作り、その中に保存。
[DB_DataObject]
database = mysql://username:password@localhost/dbname
schema_location = /home/user/DataObjects
class_location = /home/user/DataObjects
require_prefix = /home/user/DataObjects/
class_prefix = DataObjects_
debug = 3
db_driver = MDB2
phpコマンドでテーブル情報ファイルの自動生成。
php /usr/lib/php/DB/DataObject/createTables.php /usersfoldername/DataObjects/configfile.ini
php.iniファイルで、インクルードパスが正しく設定されていないとエラーになる。
Comments
Add comment for this article
Comment
URL
Password
(You can revise your comment later with this password.)
Security Code
Input this text in the right textarea.
03
enterprise
Copyright © Majestic, Inc.
Privacy Policy