Re: [users@httpd] Number of concurrent connections to apache

2013-12-09 Thread Kumar Bijayant
I used below command to get the number of established sessions on the
server.

netstat -an|grep x.x.x.x:80|grep ESTABLISHED

To my surprise, it gave me total number as 728. 128 connections more what I
have set up in my Apache. In apache I have set up max clients as 600. I
want to know what is this extra 128 connections? How it is possible when
Apache is configured to spawn only 600 child?




On Sat, Dec 7, 2013 at 3:32 AM, tejas sarade wrote:

> You can use netstat command to see the current concurrent connections to
> server.
>
> http://linuxers.org/howto/how-find-out-active-connections-or-which-ports-are-openlistening-linux
>
>
> On Fri, Dec 6, 2013 at 3:01 PM, Kumar Bijayant wrote:
>
>> Hello All,
>>
>> The below setting is configured in one of our apache  webserver
>>
>>   ServerLimit  600
>>   StartServers 5
>>   MinSpareServers  5
>>   MaxSpareServers  15
>>   MaxClients   600
>>
>>
>> There are 2 virtual servers are hosted on this instance. So as per my
>> understanding this max connections at any point of time to this apache will
>> be 600 and this will be shared by both virtual webserver?
>>
>> How could I know that how many current connections are open or how many
>> unique requests this apache instance is handling? I know through
>> server-status we can achieve this kind of info but sadly that option is not
>> enabled.
>>
>> Is there any other way, like through some command if I can achieve this?
>> I googled for this answer but nothing specific I could find. So, thought to
>> check it here.
>>
>> Thanks & Regards,
>> Bijayant Kumar.
>>
>
>


[users@httpd] Using SessionMaxAge without setting Max-Age in cookies?

2013-12-09 Thread Niels Harremoes
Hi!
I am using apache 2.4, mod_auth_form and mod_session with cookie based sessions.
I would like my sessions to expire after 15 minutes of inactivity - so I set
SessionMaxAge 900

However, I also need my sessions to expire when the user closes the browser. 
Unfortunately, the cookie header sent looks like
Set-Cookie: 
session=Private-user=someUser&Private-pw=thePassword&expiry=1386227882551049;Max-Age=900;path=/;HttpOnly

I have temporarily turned off SessionCryptoPassphrase for debugging - I know 
that I must turn it back on for production.
The problem is the ";Max-Age=900". This makes the cookie persistent in the 
browser, so that even if the browser is closed, the session will still be valid 
if a new browser session is started within 15 minutes. The requirement is that 
closing the browser will end the session.

Can I avoid the "Max-Age=900" and still have server-side session expiration?

I have tried using mod_headers to rewrite the set-cookie header:

Header edit Set-Cookie ;Max-Age=900; ;

This will rewrite the Set-Cookie header to
Set-Cookie: 
session=Private-user=someUser&Private-pw=thePassword&expiry=1386227882551049;path=/;HttpOnly
as desired - but only the last one

But mod_session_cookie sends the set-cookie header twice - and apparently only 
the last header is being rewritten by mod_rewrite?
It seems like recent versions of Internet Explorer and Chrome will use the last 
definition, but I'm not sure I can rely on that.




Re: [users@httpd] Number of concurrent connections to apache

2013-12-09 Thread Jeff Trawick
On Mon, Dec 9, 2013 at 4:02 AM, Kumar Bijayant wrote:

> I used below command to get the number of established sessions on the
> server.
>
> netstat -an|grep x.x.x.x:80|grep ESTABLISHED
>
> To my surprise, it gave me total number as 728. 128 connections more what
> I have set up in my Apache. In apache I have set up max clients as 600. I
> want to know what is this extra 128 connections? How it is possible when
> Apache is configured to spawn only 600 child?
>
>
a connection can be ESTABLISHED but not yet serviced by httpd (the
connection will wait for a free httpd thread to process it)

if your connections are over loopback or a local interface, such as with
you running ab, you might be catching the same connection twice in the
netstat output


>
>
> On Sat, Dec 7, 2013 at 3:32 AM, tejas sarade wrote:
>
>> You can use netstat command to see the current concurrent connections to
>> server.
>>
>> http://linuxers.org/howto/how-find-out-active-connections-or-which-ports-are-openlistening-linux
>>
>>
>> On Fri, Dec 6, 2013 at 3:01 PM, Kumar Bijayant wrote:
>>
>>> Hello All,
>>>
>>> The below setting is configured in one of our apache  webserver
>>>
>>>   ServerLimit  600
>>>   StartServers 5
>>>   MinSpareServers  5
>>>   MaxSpareServers  15
>>>   MaxClients   600
>>>
>>>
>>> There are 2 virtual servers are hosted on this instance. So as per my
>>> understanding this max connections at any point of time to this apache will
>>> be 600 and this will be shared by both virtual webserver?
>>>
>>> How could I know that how many current connections are open or how many
>>> unique requests this apache instance is handling? I know through
>>> server-status we can achieve this kind of info but sadly that option is not
>>> enabled.
>>>
>>> Is there any other way, like through some command if I can achieve this?
>>> I googled for this answer but nothing specific I could find. So, thought to
>>> check it here.
>>>
>>> Thanks & Regards,
>>> Bijayant Kumar.
>>>
>>
>>
>


-- 
Born in Roswell... married an alien...
http://emptyhammock.com/


[users@httpd] Single quotes in ajax POST data getting prefixed with backslash

2013-12-09 Thread Tim Streater
I run an instance of apache under OS X which I use to pass data to PHP scripts 
using ajax. If I have a string such as "O'Toole" (without the double-quotes), 
then when the string (which I pass through encodeURIComponent in the browser) 
arrives in the PHP script, the single-quote is prefixed with a backslash. That 
is, the string above becomes "O\'Toole".

I want my app to run under Win7, and I observe that there, the backslash is 
*not* inserted. This difference is a bit irritating, especially as I am having 
trouble discovering which component (browser, apache, PHP) is adding the 
backslash. On the whole, I'd rather not have it, but I'd settle for both 
platforms adding it. Then at least code common to both platforms can remove it.

Any guidance as to where to look would be appreciated.

--
Cheers  --  Tim


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Re: [users@httpd] Single quotes in ajax POST data getting prefixed with backslash

2013-12-09 Thread Yehuda Katz
That is a PHP configuration option called Magic Quotes (
http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc)
that used to be on by default and is now off by default in recent PHP
releases.

- Y

Sent from a gizmo with a very small keyboard and hyperactive autocorrect.
On Dec 9, 2013 4:57 PM, "Tim Streater"  wrote:

> I run an instance of apache under OS X which I use to pass data to PHP
> scripts using ajax. If I have a string such as "O'Toole" (without the
> double-quotes), then when the string (which I pass through
> encodeURIComponent in the browser) arrives in the PHP script, the
> single-quote is prefixed with a backslash. That is, the string above
> becomes "O\'Toole".
>
> I want my app to run under Win7, and I observe that there, the backslash
> is *not* inserted. This difference is a bit irritating, especially as I am
> having trouble discovering which component (browser, apache, PHP) is adding
> the backslash. On the whole, I'd rather not have it, but I'd settle for
> both platforms adding it. Then at least code common to both platforms can
> remove it.
>
> Any guidance as to where to look would be appreciated.
>
> --
> Cheers  --  Tim
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>


Re: [users@httpd] Re: Error 404 Not Found

2013-12-09 Thread Robert

Good Guy,

Files have been unzipped to directory c:\php-120913.

Robert

- Original Message - 
From: "Good Guy" 

To: 
Sent: Sunday, December 08, 2013 8:22 PM
Subject: [users@httpd] Re: Error 404 Not Found



On 08/12/2013 02:59, Robert wrote:

Hi Good Guy,

When I loaded test.php into the browser with localhost/test.php it 
only echoed the contents of test.php back.  If I do the same thing 
with any .php file I have in htdocs the result is the same - echoes 
back the content of the file.  If I type localhost/test I get the 404 
error message... "The requested URL /test was not found on this server."


Robert




OK this suggests that you have not installed php on your machine; ALSO 
after installing the php files, you need to configure the apache so that 
it knows where the php engine is.


1) First I suggest download the php files from this link:



 2) Unzip the files tp a specific folder such as c:\php

3) Post back when you have done this so that I can post some rudimentary 
instructions how to configure apache server so that it can process php 
files.





--
Good Guy
Website: http://mytaxsite.co.uk
Website: http://html-css.co.uk
Email: http://mytaxsite.co.uk/contact-us



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Re: Error 404 Not Found

2013-12-09 Thread Good Guy

OK do the following adjustments:

1)Browse the php folder and look for the file called:
"php.ini-production" and change its name to:

php.ini

2)Open this php.ini file in a text editor and change the following:

short_open_tag = Off
To
short_open_tag = On

3)Change
;session.save_path = "/tmp"
To
session.save_path = "/tmp"

Also make sure you have a c:\tmp folder for temporary session files.  
Make sure the folder name is exactly as I have shown above.  Windows 
uses a different folder names but do exactly as I have stated above.

4) Save the file and close it.

Configure Apache Server: This  Section requires changing the apache 
configuration settings:
1)Stop the apache server so that you can change the config file; the 
config file is called httpd.conf and it is in a folder:

/apache/conf
2) Open it and make these changes:
Search for section of the file that has a series of "LoadModule" 
statements. Statements prefixed by the hash "#" sign are regarded as 
having been commented out. Add the following at the end of the section:

LoadModule php5_module "c:/php-120913/php5apache2_2.dll"
Make sure the folder name id#s for the  php folder where you have 
extracted the files.  Also, the folder names in apache is as shown above 
not as in windows.  For example folder in apache should be c:/php-120913 
NOT c:\php-120913.  You get the idea.


3) Next, search for "AddType" in the file, and add the following line 
after the last "AddType" statement. For Apache 2.2.x, you can find the 
"AddType" lines in the  section. Add the line just 
before the closing  for that section.


AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml

4) Finally, you will need to indicate the location of your PHP ini file. 
Add the following line to the end of your httpd.conf file.

PHPIniDir "c:/php-120913"
Again the folder should be your folder for php files you have extracted to.

This should enable you to process php files.  Always test the 
configuration by loading the phpinfo file I gacvve you earlier in the 
thread.  I hope you still have it otherwise go back to the bgeginning of 
the thread and recreate the file and load it to test it.  It should give 
you the information about your php settings.


Good luck and post back so that something else can be suggested such as 
"Running PHP 5 as a CGI Binary"




On 10/12/2013 02:55, Robert wrote:

Good Guy,

Files have been unzipped to directory c:\php-120913.

Robert



--
Good Guy
Website: http://mytaxsite.co.uk
Website: http://html-css.co.uk
Email: http://mytaxsite.co.uk/contact-us



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Re: Error 404 Not Found

2013-12-09 Thread Good Guy
After making the changes, you will need to restart the apache server so 
that the new configuration settings takes effect.  Either re-boot the 
machine or simply restart the service using the apache button in the 
taskbar.



On 10/12/2013 02:55, Robert wrote:

Good Guy,

Files have been unzipped to directory c:\php-120913.

Robert





--
Good Guy
Website: http://mytaxsite.co.uk
Website: http://html-css.co.uk
Email: http://mytaxsite.co.uk/contact-us



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org