Re: How to start/stop XML-RPC server?

"Ken Almond" <[email protected]> Tue, 25 Dec 2012 03:35:52 -0800
Newsgroups gmane.comp.php.xml-rpc
Organization Almond Enterprises
Message-ID <[email protected]>
This is a multipart message in MIME format.

--===============8805420638842582687==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0427_01CDE250.F163E810"
Content-Language: en-us

This is a multipart message in MIME format.

------=_NextPart_000_0427_01CDE250.F163E810
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi

 

Apache (when configured) loads a php.so module - so PHP is 'loaded' (ready
to go) as part of apache startup.

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.    http://host/login.php
(login.php is a server.php file),   http://host/accounts.php,   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.

 

Bonus tip

We put 1st 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.

 

Good Luck

Ken

 

From: [email protected]
[mailto:[email protected]] On Behalf Of David Luu
Sent: Monday, December 24, 2012 10:35 PM
To: [email protected]
Subject: [phpxmlrpc] How to start/stop XML-RPC server?

 

I'm just looking into XML-RPC server with PHP, so have not much idea about
its implementation and design.

 

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.

 

With PHP, the PHP code is served by a web/application server. So wanted some
clarification:

 

* 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?

 

* 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.

 

David


------=_NextPart_000_0427_01CDE250.F163E810
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><META =
HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"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=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Hi<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Apache (when configured) loads a php.so module &#8211; so PHP is =
&#8216;loaded&#8217; (ready to go) as part of apache =
startup.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Yes, when HTTP hits Apache, the server.php file is loaded (on each =
HTTP request).&nbsp;&nbsp;&nbsp;&nbsp; Since php.so module is already =
running as part of apache startup &#8211; its &#8216;very fast&#8217; =
BUT you do want to keep server.php files smaller (1,000(s) of lines) =
instead of 50,000(s) of lines.&nbsp;&nbsp;&nbsp;&nbsp; We used a URL =
name space to have multiple server.php files &#8211; =
e.g.&nbsp;&nbsp;&nbsp; <a =
href=3D"http://host/login.php">http://host/login.php</a>&nbsp; =
(login.php is a server.php file),&nbsp;&nbsp; <a =
href=3D"http://host/accounts.php">http://host/accounts.php</a>,&nbsp;&nbs=
p; etc. -&nbsp; e.g. 1 &#8216;server.php&#8217; for grouping of web =
services.&nbsp;&nbsp; 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 &#8216;too =
large&#8217;.&nbsp;&nbsp;&nbsp;&nbsp; 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=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Bonus tip<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>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.&nbsp;&nbsp;&nbsp; Worked very well.&nbsp;&nbsp;&nbsp;&nbsp; =
Then as we grew, we used the reverse proxy to load balance &#8211; but =
apache also has other forms of load balance.<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Good Luck<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Ken<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>=
</b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> =
[email protected] =
[mailto:[email protected]] <b>On Behalf Of </b>David =
Luu<br><b>Sent:</b> Monday, December 24, 2012 10:35 PM<br><b>To:</b> =
[email protected]<br><b>Subject:</b> [phpxmlrpc] How to =
start/stop XML-RPC server?<o:p></o:p></span></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><p class=3DMsoNormal>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=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>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=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>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=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal>* =
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=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal>* =
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=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>David<o:p></o:p></p></div></div></body></html>
------=_NextPart_000_0427_01CDE250.F163E810--


--===============8805420638842582687==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
phpxmlrpc mailing list
[email protected]
http://lists.usefulinc.com/cgi-bin/mailman/listinfo/phpxmlrpc

--===============8805420638842582687==--