在 PHP.ini 中启用 XML-RPC

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1460644/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 02:41:41  来源:igfitidea点击:

Enable XML-RPC in PHP.ini

phpxml-rpc

提问by cimnine

I have Joomla and a component called MyBlog (azrul.com) installed.

我安装了 Joomla 和一个名为 MyBlog (azrul.com) 的组件。

To enable pinging of Technorati I must enable xml-rpc.

要启用 Technorati 的 ping,我必须启用 xml-rpc。

By default this is disabled on my Shared Hosting account and cannot be changed. However, DreamHost says you can create your own custom advanced php5 installation.

默认情况下,这在我的共享主机帐户上被禁用并且无法更改。但是,DreamHost 说您可以创建自己的自定义高级 php5 安装。

Instructions here: http://wiki.dreamhost.com/Advanced_PHP_configuration

这里的说明:http: //wiki.dreamhost.com/Advanced_PHP_configuration

I followed those and now I can change my custom php.ini file.

我遵循了这些,现在我可以更改我的自定义 php.ini 文件。

On this line in that file:

在该文件的这一行上:

;extension=php_xmlrpc.dll

;扩展=php_xmlrpc.dll

I removed the ;

我删除了;

hoping to uncomment that line and turn on that functionality before updating the php.

希望在更新 php 之前取消注释该行并打开该功能。

Since I believe DreamHost is not Windows server, instead of .dll should it be .so?

因为我相信 DreamHost 不是 Windows 服务器,而不是 .dll 应该是 .so 吗?

Still no luck. Can someone point me in the right direction?

仍然没有运气。有人可以指出我正确的方向吗?

Thank you!

谢谢!

Christopher Beckwith

克里斯托弗·贝克威斯

回答by drAlberT

You are right, it is a Centos server:

你是对的,它是一个 Centos 服务器:

Apache/2.2.3 (CentOS) Server at azrul.com Port 80
  • the extension as to be a .so
  • you have to restart apache
  • the extension has to be installed on the server
  • the extension has to be not disabled (its functions and/or classes)
  • 扩展名为 .so
  • 你必须重新启动apache
  • 扩展必须安装在服务器上
  • 扩展必须不被禁用(它的功能和/或类)

You can have a lot of info looking to phpinfo()output:

你可以有很多信息寻找phpinfo()输出:

<?php phpinfo() ?>

回答by cimnine

Create a blank file with this content:

使用以下内容创建一个空白文件:

<?php var_dump(get_loaded_extensions()) ?>

You'll seee if your extension is loaded or not. As already two times mentioned: You have to restart at least the Apache daemon.

您将查看您的扩展程序是否已加载。正如已经两次提到的:您必须至少重新启动 Apache 守护进程。

回答by iborodikhin

You can use dl() if it's enabled for your account to use custom extensions without restarting web-server. See PHP manual.

如果您的帐户已启用 dl() 以使用自定义扩展程序而无需重新启动网络服务器,则您可以使用 dl()。请参阅 PHP 手册。