CONTENTS


Lastmodified 2023-01-26 (木) 13:04:07


OpenPNE server のPHPを74から80にUPすると・・・OpenPNEの更新ができなくなった

2023年1月時点の OpenPne3 最新版

openpne-OpenPNE3-OpenPNE-3.10.11-0-ge6f15fa.zip

# ./symfony openpne:migrate
PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /usr/local/www/OpenPNE_NEW/lib/vendor/symfony/lib/util/sfFinder.class.php on line 583

Fatal error: Array and string offset access syntax with curly braces is no longer supported in /usr/local/www/OpenPNE_NEW/lib/vendor/symfony/lib/util/sfFinder.class.php on line 583

# ./symfony plugin:publish-assets
PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /usr/local/www/OpenPNE_NEW/lib/vendor/symfony/lib/util/sfFinder.class.php on line 583

Fatal error: Array and string offset access syntax with curly braces is no longer supported in /usr/local/www/OpenPNE_NEW/lib/vendor/symfony/lib/util/sfFinder.class.php on line 583

OpenPNE 3.8.0 以上の全てのバージョンから OpenPNE 3.10.x へのバージョンアップ

https://raw.githubusercontent.com/openpne/OpenPNE3/OpenPNE-3.10.2/doc/ja/OpenPNE3_Version_Up_Guide.txt

データベースのバックアップ

OpenPNEが使用中のDBは、/usr/local/www/OpenPNE392/config/databases.yml に記述されているので、それをバックアップする。

databases.yml

all:
 doctrine:
   class: sfDoctrineDatabase
   param:
     dsn: 'mysql:host=localhost;dbname=PNE36fugafuga'
     username: pne36fugafuga
     password: hogehoge
cd /usr/local/www
mysqldump -v -u root -p PNE36fugafuga > dump_PNE36fugafuga.sql

OpenPNEのディレクトリもバックアップ

# tar cvfzp OpenPNE392_20210701.tar.gz OpenPNE392

OpenPNE 3.10 のソースファイルを設置

# unzip openpne-OpenPNE3-OpenPNE-3.10.5-0-g66a96d4.zip
drwxr-xr-x  14 root   www            512 Jul  1 16:55 openpne-OpenPNE3-66a96d4/
-rw-r--r--   1 root   www       10215012 Jul  1 15:35 openpne-OpenPNE3-OpenPNE-3.10.5-0-g66a96d4.zip
mv openpne-OpenPNE3-66a96d4 OpenPNE310
chown -R www:www OpenPNE310

設定ファイルの上書き

OpenPNE 3.10 付属の設定ファイルをコピー

cd /usr/local/www/OpenPNE310
cp config/ProjectConfiguration.class.php.sample config/ProjectConfiguration.class.php
cp config/OpenPNE.yml.sample config/OpenPNE.yml

※config/ProjectConfiguration.class.php に独自の設定を記述している場合は、古いファイルを参考に新しいファイルを変更してください。

OpenPNE.yml の設定値を環境に合わせて変更してください。特に base_url と mail_domain はメール投稿、メール配信の際に利用されるので必ず設定をおこなってください。

古いバージョンの config/databases.yml を新しいバージョンの config/databases.yml としてコピーします。

cp /usr/local/www/OpenPNE392/config/databases.yml /usr/local/www/OpenPNE310/config/databases.yml

プラグインディレクトリのコピー

独自で入れたプラグインや同梱されているプラグインのバージョンよりも新しいバージョンなどを新しい環境で用いるために、古いバージョンの plugins ディレクトリの中身をコピーします。

MacOSX や FreeBSD など、 cp コマンドに -u オプションがなく -n オプションがある場合。

cp -an /usr/local/www/OpenPNE392/plugins /usr/local/www/OpenPNE310/

モデルの再構築

プロジェクトのルートディレクトリで、以下のコマンドを実行します。

./symfony doctrine:build-model
./symfony cc

この手順は、次の「バージョンアップコマンドの実行」に必要となります。

バージョンアップコマンドの実行

 $ ./symfony openpne:migrate
 $ ./symfony plugin:publish-assets

以上でバージョンアップは完了です。


>> migrate   OpenPNE is now at revision 48.
>> migrate   opAlbumPlugin is not supporting migration.
>> migrate   opAshiatoPlugin is now at revision 3.
>> migrate   opAuthMailAddressPlugin is not supporting migration.


  migrating of opAuthMobileUIDPlugin encountered the following errors:
   Error #1 - Could not find migration class for migration step: 2



>> migrate   opAuthOpenIDPlugin is not supporting migration.
>> migrate   opBlogPlugin is now at revision 4.
PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function opCalendarPluginMigrationVersion2::up(), 0 passed in /usr/local/www/OpenPNE310/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Migration.php on line 507 and exactly 1 expected in /usr/local/www/OpenPNE310/plugins/opCalendarPlugin/data/migrations/v0.9.1/002_add_year_column.php:4
Stack trace:
#0 /usr/local/www/OpenPNE310/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Migration.php(507): opCalendarPluginMigrationVersion2->up()
#1 /usr/local/www/OpenPNE310/lib/migration/opMigration.class.php(109): Doctrine_Migration->_doMigrateStep('up', 2)
#2 /usr/local/www/OpenPNE310/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Migration.php(479): opMigration->_doMigrateStep('up', 2)
#3 /usr/local/www/OpenPNE310/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Migration.php(328): Doctrine_Migration->_doMigrate(11)
#4 /usr/local/www/OpenP in /usr/local/www/OpenPNE310/plugins/opCalendarPlugin/data/migrations/v0.9.1/002_add_year_column.php on line 4

Fatal error: Uncaught ArgumentCountError: Too few arguments to function opCalendarPluginMigrationVersion2::up(), 0 passed in /usr/local/www/OpenPNE310/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Migration.php on line 507 and exactly 1 expected in /usr/local/www/OpenPNE310/plugins/opCalendarPlugin/data/migrations/v0.9.1/002_add_year_column.php:4
Stack trace:
#0 /usr/local/www/OpenPNE310/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Migration.php(507): opCalendarPluginMigrationVersion2->up()
#1 /usr/local/www/OpenPNE310/lib/migration/opMigration.class.php(109): Doctrine_Migration->_doMigrateStep('up', 2)
#2 /usr/local/www/OpenPNE310/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Migration.php(479): opMigration->_doMigrateStep('up', 2)
#3 /usr/local/www/OpenPNE310/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Migration.php(328): Doctrine_Migration->_doMigrate(11)
#4 /usr/local/www/OpenP in /usr/local/www/OpenPNE310/plugins/opCalendarPlugin/data/migrations/v0.9.1/002_add_year_column.php on line 4

足跡プラグイン http://plugins.openpne.jp/package/opAshiatoPlugin/releases?version=3.10.5 がエラーする原因がこれ

SQLSTATE[HY000]: General error: 1826 Duplicate foreign key constraint name 'ashiato_member_id_to_member_id'.
Failing Query: "ALTER TABLE ashiato ADD CONSTRAINT ashiato_member_id_to_member_id FOREIGN KEY (member_id_to) REFERENCES member(id) ON DELETE SET NULL". 
Failing Query: 
  ALTER TABLE ashiato 
  ADD CONSTRAINT ashiato_member_id_to_member_id 
    FOREIGN KEY (member_id_to) 
    REFERENCES member(id) 
    ON DELETE SET NULL

https://www.programmersought.com/article/2380447155/

root@localhost [(none)]> select * from information_schema.table_constraints where constraint_schema = 'PNE36';

| def                | PNE36             | PRIMARY                              | PNE36        | ashiato                           | PRIMARY KEY     | YES      |
| def                | PNE36             | ashiato_member_id_from_member_id     | PNE36        | ashiato                           | FOREIGN KEY     | YES      |
| def                | PNE36             | ashiato_member_id_to_member_id       | PNE36        | ashiato                           | FOREIGN KEY     | YES      |

https://stackoverflow.com/questions/64322581/error-1826-duplicate-foreign-key-constraint-name


Total access 908:本日 2:昨日 0

Counter: 908, today: 2, yesterday: 0

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-01-26 (木) 13:04:07