php - 如何在 Gwan 和 php 上执行 phpinfo

标签 php centos g-wan

在 Cent OS 6.4 上,GWAN web/http 服务器和 php 已安装。 创建的文件 /csp 中的 info.php

<?php
phpinfo();
exit(200);
?>

给出标题

HTTP/1.0 200 OK =>
Server => G-WAN
Date => Thu, 05 Sep 2013 08:21:11 GMT
Last-Modified => Thu, 05 Sep 2013 08:21:11 GMT
ETag => "abc3657a-52283ef8-44d6"
Vary => Accept-Encoding
Accept-Ranges => bytes
Content-Type => text/html; charset=UTF-8
Content-Length => 17622
Connection => close

并输出为

phpinfo() PHP Version => 5.3.3 System => Linux torrent.ms 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 Build Date => Jul 12 2013 20:33:25 Configure Command => './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/lib64/mysql/mysql_config' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' 

就像纯文本没有CSS什么都没有,我怎样才能获得常规的phpinfo输出?

我正在通过 GWAN 迁移 php 脚本之前进行测试 我可以在不修改 php 脚本的情况下使用 GWAN 网络服务器吗?

最佳答案

G-WAN gives the output as plain text (no style nothing), and if i remove the exit(200), it gives "The connection was reset" error

exit(200); 告诉 G-WAN 生成状态代码为 200 的 HTTP header (这是您的问题显示的 G-WAN 响应 HTTP header )。

如果您省略 exit(200),则 G-WAN 将不会生成 header ,并且您的 Internet 浏览器将不知道何时停止等待服务器答复,因为未指定此答复的长度(因为没有HTTP header )。

因此,互联网浏览器(不是 G-WAN)将等待,然后超时。

更多详细信息请参阅 G-WAN 常见问题解答和 G-WAN PDF 手册。

But it's plaint text, no css, nothing, how can i get a regular phpinfo output ?

G-WAN 正在为您的 PHP 脚本生成的内容提供服务。

此 PHP 脚本未指定任何 HTML header 、正文和 CSS。

根据PHP documentation :“使用 CLI 模式时,phpinfo() 输出纯文本而不是 HTML。”

G-WAN 可以使用 PHP 作为加载模块,就像 Java 或 C# 所做的那样,但到目前为止,我们的尝试未能使 PHP 运行时以线程安全的方式工作。

如果 PHP 专家对如何实现此功能有特殊建议,或者 PHP 公开发布新的线程安全版本,那么我们将很乐意再试一次。

关于php - 如何在 Gwan 和 php 上执行 phpinfo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18631267/

相关文章:

javascript - 从 foreach 输出中单独选择多个选择的最佳方法

php - 上传文件后更新数据库的问题

php - 如何在我的 crontab 中使用查询字符串?

php - 商店 Facebook 应用引荐来源网址

centos - 如何在 centos 9 流上安装 python2?

jenkins - 如何限制 Jenkins 用户查看用户信息,如 : id, 名称等

linux - bash 脚本将字符串视为命令

java - 是否有可能(以及如何)改变 G-WAN 处理请求的方式?

c++ - 有没有可以用来代替脚本的低级语言?

webserver - 有人真的使用 G-WAN 网络服务器吗?