Is there any particular reason you're using PHP via CGI? I have not seen PHP used this way in a very long time, as it's rather slow compared to FastCGI. The recommended approach is normally to use PHP via FastCGI (which Cherokee is able to set up for you).
________________________________ From: Rueyan Yeh <[email protected]> To: [email protected] Sent: Thu, 9 June, 2011 11:56:29 AM Subject: [Cherokee] Help for the PHP CGI program Hi, > > Sorry, if you have answer, please send to me directly, thanks! > my email: [email protected] > >Best regards, > > ruey-an > > > >2011/6/1 Rueyan Yeh <[email protected]> > >Hi, >> >> Could someone help to answer my question? Thanks! >> >> My system uses the Cherokee Web Server built by myself. >>--------------------------------------------------------------------------------------------------- >> >> >>Cherokee Web Server 1.0.20 (Feb 18 2011): Listening on port ALL:80, TLS >>disabled, IPv6 disabled, using epoll, 4096 fds system limit, max. 2041 >>connections, 5 threads, 408 connections per thread, standard scheduling policy >>---------------------------------------------------------------------------------------------------- >> >> >> >> When run (X86 browser) the program: (test.html) >>--------------------------------------------------------- >><html> >><form action="cgi-bin/phptest.cgi" method="get"> >>Name: <input type="text" name="fname" /> >>Age: <input type="text" name="age" /> >><input type="submit" /> >></form> >></html> >>------------------------------------------------------- >> The phptest.cgi program: >>-------------------------------------------------------- >>#!/usr/bin/php >><?php >>echo "Content-type:text/html\n\n"; >> >>echo "<html>\n"; >>echo "<head>\n"; >>echo "<title>CGI - PHP info return </title>\n"; >>echo "</head>\n"; >>echo "<body bgcolor=white>\n"; >> >>date_default_timezone_set("Asia/Taipei"); >>echo date("Y/m/d") . "<br />"; >>echo date("Y.m.d") . "<br />"; >>echo date("Y-m-d") . "<br />"; >> >>$myname=$_GET["fname"]; >>echo 'Hello ' . $_GET["fname"] . "<br />"; >>echo 'Hello ' . $_GET["age"] . "<br />"; >>echo 'myname ' . $myname . "<br />"; >> >>echo "</body>\n"; >>echo "</html>\n"; >> >>?> >>---------------------------------------------------------------------- >> >> My Browser shows: >>------------------------------------ >>http://192.168.1.198/cgi-bin/phptest.cgi?fname=ggg&age=ff >>2011/06/01 >>2011.06.01 >>2011-06-01 >>Hello >>Hello >>myname >>-------------------------------- >> >> My question is that why I cannot get the value of "fname" and "age" via >> the >>$_GET function. >> >> When using the PERL, I can get these values, so I think the Cherokee is >>working. >> >>Best regards, >> >> ruey-an >> > _______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
