MediaWiki安装脚本不会创建表(MediaWiki installation script does not create tables)

首先 - 我不确定这是否是发布我的问题的正确位置因此,如果我在这里做错了,请告诉我,我会在其他地方重新发布。 我整个周末都试图用谷歌找出我的问题的答案 - 没有运气。

我正在尝试让MediaWiki在我的服务器上运行。 我希望通过UNIX套接字使用postgresql。 我将我的套接字存储在/ run下,我曾经通过PHP输入这样的东西连接到数据库:

$db_connection = pg_connect("host='/run' user='user_name' password='some_password' dbname='database_name');

所以当通过他们的安装脚本配置MediaWiki时,我只需在'server'输入框中输入'/ run',希望它将它插入到连接字符串中。 所以一切正常,直到我到达最后一步(脚本实际完成所有工作)并且我得到一个信息,表示创建表时最后一个条目在尝试写入数据库时​​显示错误。 所以我使用psql连接到数据库,发现没有脚本创建的表...

这就是我在安装脚本终止时得到的结果:

Could not insert main page: A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: SELECT nextval('externallinks_el_id_seq') Function: DatabaseBase::query Error: 42P01 ERROR: relation "externallinks_el_id_seq" does not exist LINE 1: .../* DatabaseBase::query 188.220.126.122 */ nextval('externall... ^

所以这是一个问题 - 有没有人通过UNIX套接字使用过postgresql的MediaWiki? 如果是这样,那么请问如何将这些信息提供给MediaWiki?

First - I'm not sure if that's the correct place to post my question hence if I'm wrong doing it here please just let me know and I'll re-post somewhere else. Also I spent whole weekend trying to find out answer to my question with google - no luck.

I'm trying to get MediaWiki working on my server. I wanted to have it working with postgresql through UNIX sockets. I store my socket under /run and I used to connect to database through PHP typing something like this:

$db_connection = pg_connect("host='/run' user='user_name' password='some_password' dbname='database_name');

So when configuring MediaWiki through their installation script I just typed '/run' into 'server' input box hoping it will plug it into connection string. So everything works fine until I reach last step (where script actually does all the work) and I get an information that tables are created with last entry showing an error when trying to write into database. So I connected to database using psql and found no tables created by the script...

That's what I get when installation script terminates:

Could not insert main page: A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: SELECT nextval('externallinks_el_id_seq') Function: DatabaseBase::query Error: 42P01 ERROR: relation "externallinks_el_id_seq" does not exist LINE 1: .../* DatabaseBase::query 188.220.126.122 */ nextval('externall... ^

So here is the question - have anybody ever used MediaWiki with postgresql through UNIX socket? If so then may I kindly ask how to feed that information into MediaWiki?

最满意答案

潜入我的http堆栈设置后,我注意到我的权限太受限制了。 放松它们并允许“其他人”小组阅读“维基媒体”目录后,事情看起来似乎正常。 我不确定这是否是对这个问题的“正确”解决方案,如果有人提出更好的想法,我会很感激,但暂时我的问题已经解决了。

要完成它可能很重要,即使我使用UNIX套接字我仍然保持默认端口值不变。

After diving into my http stack setup I noticed my permissions have been too restricted. After relaxing them and allowing 'others' group to read 'wikimedia' directory things seem to be working as they should. I'm not sure if that's 'proper' solution to that problem and would appreciate if anybody would come up with better idea however for the time being my issue is solved.

To finish out it might be important that even though I'm using UNIX socket I still left default port value untouched.

更多推荐