<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Apache (when configured) loads a php.so module – so PHP is ‘loaded’ (ready to go) as part of apache startup.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Yes, when HTTP hits Apache, the server.php file is loaded (on each HTTP request).     Since php.so module is already running as part of apache startup – its ‘very fast’ BUT you do want to keep server.php files smaller (1,000(s) of lines) instead of 50,000(s) of lines.     We used a URL name space to have multiple server.php files – e.g.    <a href="http://host/login.php">http://host/login.php</a>  (login.php is a server.php file),   <a href="http://host/accounts.php">http://host/accounts.php</a>,   etc. -  e.g. 1 ‘server.php’ for grouping of web services.   The login.php and account.php, and x.php and y.php can call into shared library.php(s) but again, overall, keep the #includes smaller so each server.php is not ‘too large’.     We achieved average 10ms (where php called MSSQL inside) response time for 1,000(s) of simultaneous users on single apache server.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Bonus tip<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>We put 1<sup>st</sup> apache server in DNZ zone (publically available for URL) and then used apache reverse proxy over to internal apache that that actually called the server.php(s) for very strong protection.    Worked very well.     Then as we grew, we used the reverse proxy to load balance – but apache also has other forms of load balance.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Good Luck<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Ken<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> phpxmlrpc-bounces@lists.usefulinc.com [mailto:phpxmlrpc-bounces@lists.usefulinc.com] <b>On Behalf Of </b>David Luu<br><b>Sent:</b> Monday, December 24, 2012 10:35 PM<br><b>To:</b> phpxmlrpc@lists.usefulinc.com<br><b>Subject:</b> [phpxmlrpc] How to start/stop XML-RPC server?<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>I'm just looking into XML-RPC server with PHP, so have not much idea about its implementation and design.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>With other language implementations, it's easy to understand, as you can start/stop the server from command line (or other interface like UI, XML-RPC call for stop, etc.) as all the server functionality can be combined with the XML-RPC server itself as a single self contained binary/application.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>With PHP, the PHP code is served by a web/application server. So wanted some clarification:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>* how do you start the server? Start up the web/application server (Apache, IIS, etc.), then hit the URL to the PHP script that creates the server instance? Are the XML-RPC requests (different XML-RPC method calls) going to same URL or different one?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>* how do you stop the PHP XML-RPC server? Stop the web/application server itself? (e.g. Apache, IIS, etc.) Or is there a way to stop it w/o turning off the whole web/application server or say killing PHP.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>David<o:p></o:p></p></div></div></body></html>