duanqiu3800 2013-09-05 08:23
浏览 79
已采纳

如何在Gwan和php上做phpinfo

On cent OS 6.4 , GWAN web/http server and php is installed. created file info.php in /csp

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

gives header

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

and output as

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' 

like plaint text no css nothing, how can i get regular phpinfo output ?

i am doing tests before migrating my php scripts over GWAN can i use GWAN webserver without modifying my php scripts ?

  • 写回答

2条回答 默认 最新

  • dongqijuan3786 2013-09-05 16:36
    关注

    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); tells G-WAN to generate HTTP headers with the status code 200 (that's the G-WAN response HTTP headers that your question is showing).

    If you ommit the exit(200), then G-WAN won't generate headers and your Internet browser won't know when to stop waiting for the server reply because the length of this reply was not specified (since there's no HTTP headers).

    As a result, the Internet browser (not G-WAN) will wait and then timeout.

    More details are available in the G-WAN FAQs and in the G-WAN PDF manual.

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

    G-WAN is serving what your PHP script has generated.

    This PHP script did not specify any HTML header, body and CSS.

    According to the PHP documentation: "phpinfo() outputs plain text instead of HTML when using the CLI mode."

    G-WAN could use PHP as a loaded module, like done for Java or C#, but so far our attempts failed to make the PHP runtime work in a thread-safe manner.

    If PHP experts have special advices about how to make this work or if PHP publicly releases a new thread-safe version then we will be glad to give it another try.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥50 易语言把MYSQL数据库中的数据添加至组合框
  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况