Webtrees: use PHP CLI for initial setup instead of curl to setup wizard - #14818
Conversation
dsfgorski
left a comment
There was a problem hiding this comment.
Hi.
This doesn't work properly for me with error:
[ERROR] in line 59: exit code 1 (General error / Operation not permitted): while executing command sudo -u www-data php /opt/webtrees/index.php user Admin --create --real-name="Administrator" --email="admin@example.com" --password="${WT_ADMIN_PASS}"
In Connection.php line 838:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'webtrees.wt_user' doesn't exist (Connection: default, Host: 127.0.0.1, Port: 3306, Database: webtrees, SQL: select * from wt_user where user_id > 0 order by real_name asc)
In Connection.php line 420:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'webtrees.wt_user' doesn't exist
|
It seems like command war run from wrong directory as after changing dir to /opt/webtrees it runs smoothly. |
✍️ Description
Replaced the fragile sleep 5 + curl POST setup wizard approach with php index.php config-ini, php index.php user Admin --create, and php index.php user-setting - as recommended by webtrees upstream author fisharebest.
🔗 Related Issue
Fixes #14733
✅ Prerequisites (X in brackets)
🛠️ Type of Change (X in brackets)
README,AppName.md,CONTRIBUTING.md, or other docs.