Re: [PHP] Improve server HTTP GET server response - HTTP 1.1 ?

2011-04-26 Thread Ashley Sheridan
On Tue, 2011-04-26 at 14:45 -0400, Govinda wrote:

> > 
> > Dear Ash,
> > 
> > I could not follow on how it can be faster using your advise.
> > Seems you focus on how it could be slower using a random suffix each call 
> > to assure no caching is involved.
> > 
> > Any practical advise or references/example how to make it faster for the 
> > initial call ?
> > Any methods from the enhanced HTTP of V1.1 ?
> > 
> > Thanks
> > 
> > Eli
> > 
> 
> Eli,
>  (Ash will correct me if I am wrong).. but think the point of Ash's suggested 
> test was to first determine *what* is causing the slowness.. and THEN fix it 
> (turn it off, or alter it).
> How are you going to fix it if you do not even know what is the cause?  
> 
> -Govinda


I was trying to show how the slower responses could be normal. As there
are no specific times given from request to response, there could be any
number of places where something is slowed down. However, first you need
to get a baseline, and to do that you need to eliminate the cache speed
advantages from the equation.

>From there, look at a plugin for Fx called Firebug, which will show you
the time it takes to make requests.
-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Improve server HTTP GET server response - HTTP 1.1 ?

2011-04-26 Thread Govinda
> 
> Dear Ash,
> 
> I could not follow on how it can be faster using your advise.
> Seems you focus on how it could be slower using a random suffix each call to 
> assure no caching is involved.
> 
> Any practical advise or references/example how to make it faster for the 
> initial call ?
> Any methods from the enhanced HTTP of V1.1 ?
> 
> Thanks
> 
> Eli
> 

Eli,
 (Ash will correct me if I am wrong).. but think the point of Ash's suggested 
test was to first determine *what* is causing the slowness.. and THEN fix it 
(turn it off, or alter it).
How are you going to fix it if you do not even know what is the cause?  

-Govinda
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Improve server HTTP GET server response - HTTP 1.1 ?

2011-04-26 Thread Eli Orr (Office)


Dear Ash,

I could not follow on how it can be faster using your advise.
Seems you focus on how it could be slower using a random suffix each 
call to assure no caching is involved.


Any practical advise or references/example how to make it faster for the 
initial call ?

Any methods from the enhanced HTTP of V1.1 ?

Thanks

Eli


On 26/04/2011 21:00, Ashley Sheridan wrote:

On Tue, 2011-04-26 at 12:37 +0300, Eli Orr (Office) wrote:

Dear PHP Gurus,

I have wrote a service that respond to a client HTTP GET request with
BLOB of data:
http://mimmage.com/cms/client_initialize1.php?OPERATOR=MIRS&ID=23412341234&OS=RIM  


The first time I call the HTTP GET it works very slow.. next calls it
works much faster.
Please advise how can I enhance the server response in the first call.
Any method for the client to initialize a standby like service with the
server ahead of the specific request ?

Is there any way HTTP 1.1 operation fashion can speed it up ?
e.g.http://www8.org/w8-papers/5c-protocols/key/key.html

Looking forward for your wise and experienced advise for this heavy issue.

Thanks

Eli
eliorr.com




Could it be that there is some mechanism which is caching the response 
(which is fine for GET requests as they are intended to be cached) on 
the server?


Caching can be done in PHP (a lot of frameworks contain rudimentary 
caching functionality) or by Apache itself, so there are a few places 
you can check. To test for caching, have the client-side part of the 
request add a random suffix like ?t=timestamp so that the server 
thinks this request is unique. If each request comes back slow, it's 
likely that the subsequent ones being faster is the result of caching.


--
Thanks,
Ash
http://www.ashleysheridan.co.uk





--
Best Regards,

*Eli Orr*
CTO & Founder
*LogoDial Ltd.*
M:+972-54-7379604
O:+972-74-703-2034
F: +972-77-3379604

Plaut 10, Rehovot, Israel
Email: _Eli.Orr@LogoDial.com_
Skype: _eliorr.com_


Re: [PHP] Improve server HTTP GET server response - HTTP 1.1 ?

2011-04-26 Thread Ashley Sheridan
On Tue, 2011-04-26 at 12:37 +0300, Eli Orr (Office) wrote:

> Dear PHP Gurus,
> 
> I have wrote a service that respond to a client HTTP GET request with 
> BLOB of data:
> http://mimmage.com/cms/client_initialize1.php?OPERATOR=MIRS&ID=23412341234&OS=RIM
> 
> The first time I call the HTTP GET it works very slow.. next calls it 
> works much faster.
> Please advise how can I enhance the server response in the first call.
> Any method for the client to initialize a standby like service with the 
> server ahead of the specific request ?
> 
> Is there any way HTTP 1.1 operation fashion can speed it up ?
> e.g.  http://www8.org/w8-papers/5c-protocols/key/key.html
> 
> Looking forward for your wise and experienced advise for this heavy issue.
> 
> Thanks
> 
> Eli
> eliorr.com
> 
> 


Could it be that there is some mechanism which is caching the response
(which is fine for GET requests as they are intended to be cached) on
the server?

Caching can be done in PHP (a lot of frameworks contain rudimentary
caching functionality) or by Apache itself, so there are a few places
you can check. To test for caching, have the client-side part of the
request add a random suffix like ?t=timestamp so that the server thinks
this request is unique. If each request comes back slow, it's likely
that the subsequent ones being faster is the result of caching.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




[PHP] Re: htaccess question

2011-04-26 Thread Al



On 4/26/2011 5:54 AM, David Robley wrote:

Al wrote:


I want to restrict access to all files except one on my site and in parent
dir. Thought this should work; but it doesn't.


Order Deny,Allow
Deny from all
Allow from xx.36.2.215


xx.36.2.215 is actual value IP

This file makes a captcha image and is called with
  in file
/dir/control.php

makeScodeImg.php is=>  /dir/includes/makeScodeImg.php

Works fine if "allow all" just for testing

Thanks


Seems like more of a question for an apache group than a php group. Or you
might check the apache docs at:

http://httpd.apache.org/docs/2.2/howto/htaccess.html
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow


Cheers


You're correct, thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: htaccess question

2011-04-26 Thread David Robley
Al wrote:

> I want to restrict access to all files except one on my site and in parent
> dir. Thought this should work; but it doesn't.
> 
> 
> Order Deny,Allow
> Deny from all
> Allow from xx.36.2.215
> 
> 
> xx.36.2.215 is actual value IP
> 
> This file makes a captcha image and is called with
>  in file
> /dir/control.php
> 
> makeScodeImg.php is=> /dir/includes/makeScodeImg.php
> 
> Works fine if "allow all" just for testing
> 
> Thanks

Seems like more of a question for an apache group than a php group. Or you
might check the apache docs at:

http://httpd.apache.org/docs/2.2/howto/htaccess.html
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow


Cheers
-- 
David Robley

To be, or not to be, those are the parameters.
Today is Sweetmorn, the 43rd day of Discord in the YOLD 3177. 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Improve server HTTP GET server response - HTTP 1.1 ?

2011-04-26 Thread Eli Orr (Office)

Dear PHP Gurus,

I have wrote a service that respond to a client HTTP GET request with 
BLOB of data:

http://mimmage.com/cms/client_initialize1.php?OPERATOR=MIRS&ID=23412341234&OS=RIM

The first time I call the HTTP GET it works very slow.. next calls it 
works much faster.

Please advise how can I enhance the server response in the first call.
Any method for the client to initialize a standby like service with the 
server ahead of the specific request ?


Is there any way HTTP 1.1 operation fashion can speed it up ?
e.g.  http://www8.org/w8-papers/5c-protocols/key/key.html

Looking forward for your wise and experienced advise for this heavy issue.

Thanks

Eli
eliorr.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php