WordPress:Finding Server Info

来自站长百科
Fludlen讨论 | 贡献2008年4月21日 (一) 16:41的版本
跳转至: 导航、​ 搜索

What version of PHP are you using? What server software is your site host using? What version of MySQL do you have? What operating system does your site host use?

你正在使用的PHP是什么版本的?你的站点的主机使用的是什么服务器软件?你拥有的MySQL是什么版本的?你的站点的主机使用的是什么操作系统?

Top of PHP Info test file results|thumbThese are questions often asked by WordPress users as they prepare to install WordPress. Other times, these questions are asked while troubleshooting a problem with a WordPress installation. But don't spend at lot of time searching your site, or your host's site, for the answers--there's a very easy way to get that information.

Top of PHP Info test file results|thumb这些是WordPress用户在准备安装WordPress时,通常所提出的问题。其它的时候,通常在WordPress安装过程中,发现并解决一个问题时,用户也会问到这些问题。但是不要花太多的时间在你的站点或者你的主机的站点上搜索答案—因为有非常简单的方法能够得到信息。

The easiest way to collect the information is to make use of a pHp function called phpinfo(). The phpinfo() function will query your (or your host's) server and generate a report with a long list of data. Note: Remember to bookmark this page, because, in the future, a volunteer in the WordPress Support Forum may ask you to use this method to get information to assist them in troubleshooting a question you asked on the Support Forum.

收集信息的最简单的方法是利用一个叫做phpinfo()的pHp功能。phpinfo()功能会询问你的(或者你的主机的)服务器,并且产生一个带有很长的数据列表的报告。注意:给这个网页加上书签,因为,在将来,WordPress 支持论坛中的一个志愿者会叫你使用这种方法来得到信息,以帮助他们发现并解决你在支持论坛上提出的一个问题。

In a text editor, copy and paste the following command: 在一个文本编辑器上,复制并且粘贴一下的命令:

<?php phpinfo(); ?>


<?php phpinfo(); ?>


Make sure there are no spaces before or after the command, just the command, and save the file as something like testinfo.php or phpinfotest.php. Use a name that reminds you of this file's purpose, because you may need to use it again.

确定命令行之前和之后都没有空格,只有命令行,将文件以testinfo.php or phpinfotest.php保存。使用一个名称,这个名称会提醒你这个文件的目的,因为你可能需要再次使用这个文件。

Upload the file to the root directory of your site. Then type in the address to the file in your browser: 将文件上传到你的站点的根目录上。让后对于你的浏览器上的文件输入地址:

http://example.com/testphp.php


http://example.com/testphp.php

The result will be several pages long and it will contain a ton of information. Though your data may be in a different order, for the most part, you just need the summary items that lists things like this:

结果可能有几页纸那么长,包括许多信息。虽然你的数据可能顺序不同,对于大多数数据而言,你需要总结的条目列出像以下的内容:

PHPVersion 4.3.10
SystemWindows NT FRONTIER 5.2 build 3790
Build DateApr 14 2004 17:17:11
Server APICGI/FastCGI
Apache VersionApache/1.3.31 (Unix) mod_log_bytes/0.3 FrontPage/5.0.2.2635 PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/0.9.7d
Apache Release10331100
Under MySQL: Client API version3.23.49


PHPVersion 4.3.10
SystemWindows NT FRONTIER 5.2 build 3790
Build DateApr 14 2004 17:17:11
Server APICGI/FastCGI
Apache VersionApache/1.3.31 (Unix) mod_log_bytes/0.3 FrontPage/5.0.2.2635 PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/0.9.7d
Apache Release10331100
Under MySQL: Client API version3.23.49


That's it. Again, keep the file where you can find it, because you might need this information again. That way, it can be run any time from your browser.

就这么多。再一次地,将文件保存到你可以找到的位置,因为你还可能需要这个信息。这样的话,文件在任何时候都可以在你的浏览器上运行。

Information and Resources

信息和资源