php-general Digest 27 Apr 2011 15:52:15 -0000 Issue 7285

Topics (messages 312490 through 312496):

Re: htaccess question
        312490 by: David Robley
        312491 by: Al

Re: Improve server HTTP GET server response - HTTP 1.1  ?
        312492 by: Ashley Sheridan
        312493 by: Eli Orr (Office)
        312494 by: Govinda
        312495 by: Ashley Sheridan

Newsgroup status
        312496 by: Al

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
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.
> 
> <Files *>
> Order Deny,Allow
> Deny from all
> Allow from xx.36.2.215
> </Files>
> 
> xx.36.2.215 is actual value IP
> 
> This file makes a captcha image and is called with
> <img src="makeScodeImg.php" alt="missing img file"  /> 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. 


--- End Message ---
--- Begin Message ---


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.

<Files *>
Order Deny,Allow
Deny from all
Allow from xx.36.2.215
</Files>

xx.36.2.215 is actual value IP

This file makes a captcha image and is called with
<img src="makeScodeImg.php" alt="missing img file"  />  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

--- End Message ---
--- Begin Message ---
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



--- End Message ---
--- Begin Message ---

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  
<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_

--- End Message ---
--- Begin Message ---
> 
> 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

--- End Message ---
--- Begin Message ---
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



--- End Message ---
--- Begin Message ---
Is this group off the air or just no topics being posted?

I've not seen it so quiet in years.

Al.........

--- End Message ---

Reply via email to