OpenPNE3セットアップしてみた
http://trac.openpne.jp/wiki/pne-openpne3-develop を参考に。
$ symfony -V symfony version 1.2.0 (/usr/share/php/symfony)
$ svn co https://trac.openpne.jp/svn/OpenPNE3/trunk $ cd trunk $ cp config/ProjectConfiguration.class.php.sample config/ProjectConfiguration.class.php $ sudo pear config-get php_dir /usr/share/php $ perl -pi -e 's!##SYMFONY_LIB_DIR##!/usr/share/php/symfony!g' config/ProjectConfiguration.class.php
$ mysqladmin -u root --default-character-set=utf8 create openpne3 $ ./symfony openpne:install Choose DBMS (mysql, pgsql or sqlite) mysql Type database username root Type database password (optional) Type database hostname localhost Type database name openpne3 Type database socket path (optional) ... >> autoload reloading autoloading Phing was run before and used many custom classes that might conflict with your model classes. In case of errors try running "propel:build-forms" and "propel:build-filters" alone. This is due to a PHP limitation that cannot be fixed in symfony. ... $ ./symfony propel:build-forms $ ./symfony propel:build-filters
ttp://example.com/frontend_dev.php にアクセス。500。↓Apacheのエラーログ
[wrapped: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'openpne3.sns_config' doesn't exist]
DBテーブルできてなかった。memory_limit を増やして再挑戦!
memory_limit = 32M ↓ memory_limit = 128M
$ ./symfony openpne:install ... >> autoload reloading autoloading Phing was run before and used many custom classes that might conflict with your model classes. In case of errors try running "propel:build-forms" and "propel:build-filters" alone. This is due to a PHP limitation that cannot be fixed in symfony. ... This command will remove all data in your database. Are you sure you want to proceed? (y/N) y ...
成功したっぽい。
ttp://example.com/pc_frontend_dev.php にアクセス。「sns@example.com / password」
文字化けた!mysqladmin 嫌い。
やり直し。
$ mysqladmin -u root drop openpne3 Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed. Do you really want to drop the 'openpne3' database [y/N] y Database "openpne3" dropped $ echo 'create database openpne3 default character set utf8' | mysql -u root $ ./symfony openpne:install
大成功!
忘れてた、data_dir/symfony/web/sf のシンボリックリンクをつくっておく。
$ sudo pear config-get data_dir /usr/share/php/data $ ln -s /usr/share/php/data/symfony/web/sf web