Re: [PHP] Sessions, Expire-headers and Firefox's back button

2005-12-05 Thread Peter Brodersen
rivate_no_expire') can get rid of the Expires header as well, but it doesn't seem to be an issue here. It could still be relevant for other reasons though. -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Why do Sessions use Cookies?

2005-12-02 Thread Peter Brodersen
a user. A client can still open multiple HTTP connections to the same host even when using keepalive. Furthermore we would like the session to survive the smallest hickups (e.g. disconnects, TCP RSTs, ...). -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] Sessions, Expire-headers and Firefox's back button

2005-12-02 Thread Peter Brodersen
ng. > I don't really fault Firefox for abiding by the no-store directive, nor > do I fault Internet Explorer for ignoring it. Agreed. Furthermore, the change in cache_limiter makes very good sense in this context and doesn't seem like "just a hack". > Hope that help

[PHP] Sessions, Expire-headers and Firefox's back button

2005-12-02 Thread Peter Brodersen
nd that would reduce the number of requests and make Firefox use the cached page (or cache the page in the first place). -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re[2]: [PHP] Japanese with UTF-8 and mysql

2005-06-03 Thread Peter Brodersen
TF-8 is a charset, not a Content-type. A quick test shows that the HTTP header output from Apache would contain: Content-Type: UTF-8 The correct way - if one wants utf-8 as charset - is: header("Content-Type: index/html; charset=utf-8"); -- - Peter Brodersen -- PHP General Mailing List (h

Re: [PHP] .INC files

2005-06-03 Thread Peter Brodersen
he latter case a lot of assumptions could cause damage. Poorly implemented high security could be worse than moderate, application based security. -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How to make a script sleep for 5 seconds?

2005-05-30 Thread Peter Brodersen
t step should be (more) imprecision. Maybe read /proc/cpuinfo and perform n steps of simple loop where n is calculated from the cpu type, mhz and current load. Maybe a PEAR project? -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Retrieving client SSL info

2005-05-30 Thread Peter Brodersen
On Thu, 26 May 2005 21:32:27 +0200, in php.general [EMAIL PROTECTED] (Peter Brodersen) wrote: >A phpinfo() only shows that $_SERVER['HTTPS'] has been set to "on". >The mod_ssl-refrence shows though that a lot of other environment >variables should be present: &g

[PHP] Re: fopen for http://

2005-05-27 Thread Peter Brodersen
ss might still be the one of a network interface Try to create a page on the second web site (that you want to access thorugh fopen() ) that outputs the client's IP address. You'll probably see that your source IP address is not 127.0.0.1. -- - Peter Brodersen -- PHP General Mailing Li

[PHP] Re: Retrieving client SSL info

2005-05-26 Thread Peter Brodersen
On Thu, 26 May 2005 21:32:27 +0200, in php.general [EMAIL PROTECTED] (Peter Brodersen) wrote: >I have searched the web, in php.general and comp.lang.php without >success. The closest info was a reply from Christ Shiflett: >http://marc.theaimsgroup.com/?l=php-general&m=10382868382882

[PHP] Retrieving client SSL info

2005-05-26 Thread Peter Brodersen
Shiflett: http://marc.theaimsgroup.com/?l=php-general&m=103828683828825&w=2 Notice that it is my own site that is running under SSL. I am not trying to connect to a SSL-enabled site using PHP; my users are connecting to my site (with their browsers and certificates). I don't think the opens

Re: [PHP] Zend PHP Certification test

2004-09-30 Thread Peter Brodersen
day on this list, for posts regarding mysql. -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How does work shorten url services?

2004-09-19 Thread Peter Brodersen
nother dirty method include using a 404-document for handling requests to files that do not exist: ErrorDocument 404 /404handler.php (one could still set a 200 OK-returncode) .. but all this is out of PHP-scope. -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Parsing HTML files

2004-09-10 Thread Peter Brodersen
ributes']['VALUE']; // or, out of curiousity: var_dump($array); ?> (and why preg_replace? $1 wouldn't even be set since no capturing parenthesises are used) -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session variables does not get sent

2004-09-05 Thread Peter Brodersen
'foo .. as user_name. In that case the attacker could login as other_user. -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Bug with mktime??

2004-08-30 Thread Peter Brodersen
to 31. october For $i ==3, you are setting the date to 31. november => 1. december For $i ==4, you are setting the date to 31. december .. and so on. Since you only look at the month, you would get october, october, december, december, etc. -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Problem sending mail

2004-08-30 Thread Peter Brodersen
ly working in /, so it's looking for "text.inc" in: >/text.inc and in all include-paths. ... it would also check /var/www/html/scripts/text.inc -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Get Value

2004-08-26 Thread Peter Brodersen
t ""; print ""; var_dump($array); print ""; ?> But look at $array[0]['attributes']['HREF'] for the link. -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: exploding

2004-08-25 Thread Peter Brodersen
string(1) "b" [6]=> string(1) "a" [7]=> string(1) "r" [8]=> string(0) "" [9]=> string(0) "" [10]=> string(1) "b" [11]=> string(1) "a" [12]=> string(1) "z" [13]=> string(0) "" } I would still suggest str_split() if available, otherwise preg_split(). -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: exploding

2004-08-25 Thread Peter Brodersen
http://php.net/preg_split - example 2. Or, a possible faster method, using str_split() (only available in PHP5): http://php.net/str_split -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Securing Forms???

2004-08-18 Thread Peter Brodersen
d I can see that you have grown stronger since our last encounter!" -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Securing Forms???

2004-08-18 Thread Peter Brodersen
x27;s incorrect. An MD5 is a hexadecimal number. Ah, damn you, parenthesis :) I read it as: md5(uniqid(rand()), true); My bad - sorry! -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Securing Forms???

2004-08-18 Thread Peter Brodersen
>> ought to be sufficient - and works with PHP4 :) >Using entropy with uniqid() simply returns a more unique value to md5(), >so what's the difference. Err... the only difference is that I removed the second argument, making md5() return a simple hex-encoded string. -- - Pete

Re: [PHP] Securing Forms???

2004-08-18 Thread Peter Brodersen
eby messing up the form. $token = md5(uniqid(rand() )); ought to be sufficient - and works with PHP4 :) -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] FW: Help with PHP 5 - code not working since upgrade

2004-08-17 Thread Peter Brodersen
On Tue, 17 Aug 2004 12:40:00 -0700 (PDT), in php.general you wrote: >I didn't have to look much further than this. You have a class that was >designed in PHP3 and suddenly you're wondering why it work in PHP5? Actually, I too would wonder why it worked :) -- - Peter Brodersen

[PHP] Re: apache htaccess mod rewrite with php querystring urls

2004-08-12 Thread Peter Brodersen
ture), I do think some Apache mailing lists would be of more help for you. -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: preg_match_all but no preg_replace_all?

2004-08-10 Thread Peter Brodersen
number of times possible, follow the quantifier with a "?". Note that the meanings don't change, just the "greediness": There really is a common mix-up between these two words, as you have just proved :) (I'm pretty sure that we all agree of the actual behaviou

[PHP] Re: preg_match_all but no preg_replace_all?

2004-08-10 Thread Peter Brodersen
that quantifiers actually are used :) So, the "greedy"-terminology simply relates to quantifiers. -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: preg_match_all but no preg_replace_all?

2004-08-10 Thread Peter Brodersen
ge of matches should be expanded to as long as possible, e.g.: pattern: /<.*>/ string: one two three .. wil match " two " and not just "". .*? on the other hand (or the U pattern modifier) makes the capture ungreedy. ... just trying to clear up a common mix-up in terms

Re: [PHP] SQL Join query

2004-08-10 Thread Peter Brodersen
Hi, On Mon, 9 Aug 2004 18:12:42 +, in php.general you wrote: >* Thus wrote Jonathan Haddad: >> The only problem there is when you group the LEFT JOIN pictures that >> have a count of 0 return a count of 1. Unfortunately there's no single >> query that I figured out when I did this same pro

Re: [PHP] Protecting database passwords

2004-07-01 Thread Peter Brodersen
On Thu, 01 Jul 2004 06:55:38 -0700, [EMAIL PROTECTED] (Bob Hockney) wrote: >What I am concerned about is a local user on the server machine, not access through >the web server. It sounds like it can be done if there is a separate user or group >for the >web server process, but this site specif