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 adb连接不到手机是怎么回事?
  • ¥15 vs2022无法联网
  • ¥15 TCP的客户端和服务器的互联
  • ¥15 VB.NET操作免驱摄像头
  • ¥15 笔记本上移动热点开关状态查询
  • ¥85 类鸟群Boids——仿真鸟群避障的相关问题
  • ¥15 CFEDEM自带算例错误,如何解决?
  • ¥15 有没有会使用flac3d软件的家人
  • ¥20 360摄像头无法解绑使用,请教解绑当前账号绑定问题,
  • ¥15 docker实践项目