duanqiu3800 2013-09-05 08:23
浏览 79


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


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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 关于CPLEX的问题,请专家解答
  • ¥15 cocos的点击事件 怎么穿透到 原生fragment上。
  • ¥20 基于相关估计的TDOA算法中的加权最小二乘拟合法matlab仿真
  • ¥20 基于相关估计的TDOA算法中的自适应加权广义互相关法。
  • ¥15 abaqus CAE 2024软件启动问题
  • ¥20 基于相关估计的TDOA算法中的局部互相关函数滤波matlab仿真
  • ¥15 CDH6.0.1 hue报错
  • ¥15 javaFX利用scene builder的fxml文件进行开发时的label setText方法未生效问题
  • ¥15 notepad++ 自动补全提示,如输入汉字"人名",就会出现"张三","李四"
  • ¥15 如何用matlab实现PSO算法与两种智能优化算法在30维和50维问题上的性能比较?