php-general Digest 29 Nov 2005 13:50:35 -0000 Issue 3822

Topics (messages 226565 through 226582):

Re: help avoid multiple login
        226565 by: Matt Monaco
        226567 by: mail.pmpa
        226568 by: mail.pmpa
        226569 by: Matt Monaco
        226578 by: Jochem Maas
        226579 by: Richard Heyes
        226582 by: Jochem Maas

Problem with Frames and Sessions
        226566 by: Shaun

Re: Can't use secure file wrappers - Windows
        226570 by: Chuck Anderson

php link question
        226571 by: Ron Zimmerman
        226572 by: Robert Cummings
        226573 by: jonathan

Re: Two version of PHP in single server
        226574 by: J.F.Kishor
        226581 by: Petr Smith

R: [PHP] Problem with Frames and Sessions
        226575 by: Sebastian \"En3pY\" Zdrojewski

Re: Database problem?
        226576 by: William Stokes
        226580 by: Ford, Mike

Re: PhpMailer vs Pear:Mail
        226577 by: Richard Heyes

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

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


----------------------------------------------------------------------
--- Begin Message ---
Create an object with the functionality of your choosing, in the destructor 
perform your cleanup operations.


""mail.pmpa"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Greetings
>
> I'm having some trouble on a members online script.
> I use a php script to track member login to avoid multiple logins on
> different ips etc.
> When a logged member closes the browser window I can't delete the table
> entry because I will not have access to some sort of "Session_OnEnd" 
> action
> on hosting.
> Is there a workaround for this?
>
> I'm using PHP 5.0.4 and IIS on win XP.
>
> Thanks in advance.
> Pedro. 

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

-----Mensagem original-----
De: Matt Monaco [mailto:[EMAIL PROTECTED] 
Enviada: terça-feira, 29 de Novembro de 2005 0:02
Para: php-general@lists.php.net
Assunto: [PHP] help avoid multiple login

Create an object with the functionality of your choosing, in the destructor 
perform your cleanup operations.


""mail.pmpa"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Greetings
>
> I'm having some trouble on a members online script.
> I use a php script to track member login to avoid multiple logins on
> different ips etc.
> When a logged member closes the browser window I can't delete the table
> entry because I will not have access to some sort of "Session_OnEnd" 
> action
> on hosting.
> Is there a workaround for this?
>
> I'm using PHP 5.0.4 and IIS on win XP.
>
> Thanks in advance.
> Pedro. 

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

--- End Message ---
--- Begin Message ---
>De: Matt Monaco [mailto:[EMAIL PROTECTED] 
>Create an object with the functionality of your choosing, in the destructor

>perform your cleanup operations.

The problem is I don't know when a member closes the browser window.
If I knew that i would automatically logout that member.

Thanks.

--- End Message ---
--- Begin Message ---
If you store your "login object" in a session, when the browser window is 
closed the object will automatically be destroyed, thus calling the 
destructor.

In response to the message you send directly to me, you would create a file 
called Login.class.php and at the top of each page include the file using 
require_once("Login.class.php");

Matt


""mail.pmpa"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>De: Matt Monaco [mailto:[EMAIL PROTECTED]
>Create an object with the functionality of your choosing, in the destructor

>perform your cleanup operations.

The problem is I don't know when a member closes the browser window.
If I knew that i would automatically logout that member.

Thanks. 

--- End Message ---
--- Begin Message ---
Matt Monaco wrote:
If you store your "login object" in a session, when the browser window is closed the object will automatically be destroyed, thus calling the destructor.

exactly what is it that triggers the object destruction??? since when is it
normal practice for a browser to do a request to tell a webserver that it is 
closing
[itself]???

you cannot do this at all with just php, HTTP is stateless!

it might be possible to use some browser plugin to hit the server
if it notices that it's window is being closed... although I have a sneaking
suspicion that Flash, for instance, has the same problem as javascript with
not being able to differentiate between the page unloading and the window 
closing.

**as far as I know there is NO WAY to tell when the user closes the window, 
unless
you give them a specific way of telling you (e.g. via a 'log off and close the 
window'
link) and they are nice enough to only use the mechanism you provide (fat 
chance :-).

the normal way of doing session 'closing' is by way of 'garbage collection' -
every now and then a script/process/function is run that 'closes' any sessions
which are (according to your criteria) inactive. php has stuff built it that 
will
do this for you to a degree.


In response to the message you send directly to me, you would create a file called Login.class.php and at the top of each page include the file using require_once("Login.class.php");

Matt


""mail.pmpa"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

De: Matt Monaco [mailto:[EMAIL PROTECTED]
Create an object with the functionality of your choosing, in the destructor


perform your cleanup operations.


The problem is I don't know when a member closes the browser window.
If I knew that i would automatically logout that member.

Thanks.

--- End Message ---
--- Begin Message ---
Jochem Maas wrote:

it might be possible to use some browser plugin to hit the server
if it notices that it's window is being closed... although I have a sneaking
suspicion that Flash, for instance, has the same problem as javascript with
not being able to differentiate between the page unloading and the window closing.

**as far as I know there is NO WAY to tell when the user closes the window, unless you give them a specific way of telling you (e.g. via a 'log off and close the window' link) and they are nice enough to only use the mechanism you provide (fat chance :-).

You could use the onunload event to make an AJAX style call...

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/events/onunload.asp

--
Richard Heyes
http://www.phpguru.org

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:
Jochem Maas wrote:

it might be possible to use some browser plugin to hit the server
if it notices that it's window is being closed... although I have a sneaking suspicion that Flash, for instance, has the same problem as javascript with not being able to differentiate between the page unloading and the window closing.

**as far as I know there is NO WAY to tell when the user closes the window, unless you give them a specific way of telling you (e.g. via a 'log off and close the window' link) and they are nice enough to only use the mechanism you provide (fat chance :-).


You could use the onunload event to make an AJAX style call...

but there in lies a problem ... the onunload event fires everytime a page
is unloaded (i.e. everytime you request a new page) as well as when you
close the window. which effectively makes it useless for trapping when someone
closes the browser.

on top of that the user may have a 100 windows open for the same site ... if 
they
close one then the session should remain active/valid - so in effect one would
have to trap each window close and check if its the last window that was closed 
...
this is the road to madness ...

not to mention the Opera browser functionality of being able to close the 
browser
and open it again _exactly_ where you left off (no doubt a feature other 
browsers
will start to emulate) which more than likely has some reliance on session 
cookies.

pity there isn't an onsiteleave event :-)


http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/events/onunload.asp


--- End Message ---
--- Begin Message ---
Hi,

I have a frameset with a left column and a main column. I have a login 
script with a form in the left column. When I log in I get a menu in the 
left column which targets to the main column. My problem is that when I 
click on links in the left column nothing appears in the main frame, however 
if I refresh the browser then the links work. I am sure this must be a PHP 
session problem but I don't have any experience using frames, does anyone 
have suggestions as to what the problem might be?

Thanks for your advice.

--- End Message ---
--- Begin Message ---
James Benson wrote:

Could use the xampp package or just the openssl & php from it,


http://www.apachefriends.org/en/xampp.html


Chuck Anderson wrote:
[I've had this posted in the php.windows group for a few days, but I got no replies there.]

I have been plugging away at this for some time now and I can not figure out how to get https and ftps as registered streams in my Windows installation of Php (4.4.0). My direct need is to use fopen on secure URLs - https.

(I've installed openssl - enabled the Php openssl extension - and verified that my copy of Php was compiled with the openssl module.)

The latest thing I have read says that I need a "special" copy of php4ts.dll in order to enable secure streams (https, ftps) in Php on Windows (XP, in my case).

The posts I read point to copies of php4ts.dll for Php 4.3.4.

I am running Php 4.4.0. Where can I find a copy of php4ts.dll for Php4.4.0 that enables secure streams?

(And is that really the solution in Php 4.4.0?)

Thanks in Advance
A followup: This is from a while back (two weeks ago), but I finally tried installing xampp. I installed it into c:\xampp and when I managed to get it working (independent of my other apache service) it did what I needed. I had https and ftps as registered streams. Soooooooo ... I copied the php in xampp into c:\php and the apache dll files into my existing apache folder and ultimately made a real mess of things. Since I had backed everything up, I put it all back the way it was, uninstalled xampp, and to my surprise, I now have https and ftps streams registered in my previous installation. I'm glad I can finally access secure sites from my Php scripts, but I have no idea what is that I managed to change to allow it.

(I have a guess. With things mixed up a bit I started getting an error message I'd never seen before when starting Apache (with Php as a module). A search on Google for the error message ... Function registration failed - duplicate name .... I got the advice to NOT register openssl in php.ini, if it was already statically linked in the binary. Hmmmmmmmmmmmm. This may have been my problem earlier, but for some reason I was not seeing any error messages.)

Oh well. At least it's Apache 2.0.55 OpenSSL/0.9.8a and Php 4.4.1, so I shouldn't need to upgrade any time soon (other than to eventually try out Php 5).

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Integrity is obvious.
The lack of it is common.
*****************************

--- End Message ---
--- Begin Message --- I need a function that links immediately to a different page - without waiting for the user to click on anything. I'm not sure if "link()" does that or some other function.

Thanks,
Ron Z

--- End Message ---
--- Begin Message ---
On Tue, 2005-11-29 at 00:28, Ron Zimmerman wrote:
> I need a function that links immediately to a different page - without 
> waiting for the user to click on anything.  I'm not sure if "link()" does 
> that or some other function.

header() in PHP:

    header( 'Location: http://www.domain.ext/absolute/url' );

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message --- not totally sure what you're asking but look at header ("location: .... ")


On Nov 28, 2005, at 9:28 PM, Ron Zimmerman wrote:

I need a function that links immediately to a different page - without waiting for the user to click on anything. I'm not sure if "link()" does that or some other function.

Thanks,
Ron Z

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




--- End Message ---
--- Begin Message ---
Hi,
        
Thanks.......!

Even the second is server-parsed not cgi

Some   more  suggestions   are  welcomed,   so  we   can   succeed  in
experimentation of Two version of PHP in same server.



> i haven't tried this since php3/4, but it used to be that you could
> install them both (as server parsed, not one as a cgi) and then use
> different file extensions (and appropriate apache entries) to direct
> which php version parsed the page. e.g., we used ".php3" to use the
> php3 install and ".php" for php4.
> 
> i have a sense that this may be harder (or potentially impossible)
> now, but you may want to look at the apache install documentation to
> see if it gives hints. there used to be information in, i believe,
> the apache source install documentation explaining how to do this.
> 
> as someone else has indicated, you can (or at least should be able
> to) install one version as server-parsed and the second as cgi,
> though that may not meet your needs.
> 
> 
> ------------ Original Message ------------
> > Date: Monday, November 28, 2005 12:07:02 PM +0530
> > From: "J.F.Kishor" <[EMAIL PROTECTED]>
> > To: php-general@lists.php.net
> > Subject: [PHP] Two version of PHP in single server
> > 
> > Hi,
> > 
> >     I have  a query, can we run  two versions of PHP  in linux 7.2
> >     server.
> > 
> >     I want  to use PHP 4.x  for one application and  PHP 5.1.0 for
> >     another application in the same server.
> > 
> >     Do  I need to  do some  configuration changes  to set  the php
> >     path. To  look up different  versions based on the  request of
> >     the application.
> > 
> >     
> >     
> > Regards,
> >                                                     - JFK
> > kishor
> > Nilgiri Networks
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> ---------- End Original Message ----------
> 

-- 
Regards,
                                                        - JFK
kishor
Nilgiri Networks

--- End Message ---
--- Begin Message --- Run two Apache servers, second (with old PHP version) on another port. Internally forward all requests to old PHP project to this second server.

We tested most methods but this was the best.

Petr

J.F.Kishor wrote:
Hi,
        
Thanks.......!

Even the second is server-parsed not cgi

Some   more  suggestions   are  welcomed,   so  we   can   succeed  in
experimentation of Two version of PHP in same server.




i haven't tried this since php3/4, but it used to be that you could
install them both (as server parsed, not one as a cgi) and then use
different file extensions (and appropriate apache entries) to direct
which php version parsed the page. e.g., we used ".php3" to use the
php3 install and ".php" for php4.

i have a sense that this may be harder (or potentially impossible)
now, but you may want to look at the apache install documentation to
see if it gives hints. there used to be information in, i believe,
the apache source install documentation explaining how to do this.

as someone else has indicated, you can (or at least should be able
to) install one version as server-parsed and the second as cgi,
though that may not meet your needs.


------------ Original Message ------------

Date: Monday, November 28, 2005 12:07:02 PM +0530
From: "J.F.Kishor" <[EMAIL PROTECTED]>
To: php-general@lists.php.net
Subject: [PHP] Two version of PHP in single server

Hi,

        I have  a query, can we run  two versions of PHP  in linux 7.2
        server.

        I want  to use PHP 4.x  for one application and  PHP 5.1.0 for
        another application in the same server.

        Do  I need to  do some  configuration changes  to set  the php
        path. To  look up different  versions based on the  request of
        the application.

        
        
Regards,
                                                        - JFK
kishor
Nilgiri Networks

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

---------- End Original Message ----------




--- End Message ---
--- Begin Message ---
Change the logon script. The cookies of each frame are loaded separately, so
if you want the session to be active in all the frames, at least once you
got to reload them. The easiest way, I think, is to change the logon script:
put it on a main page and once the user is logged in, create the frameset.
The session will be available in all the frames.

Cheers,

En3pY 


Sebastian Konstanty Zdrojewski 

________________________________

URL: http://www.en3py.net/
E-Mail: [EMAIL PROTECTED]

________________________________

Le informazioni contenute in questo messaggio sono riservate e
confidenziali. Il loro utilizzo è consentito esclusivamente al destinatario
del messaggio, per le finalità indicate nel messaggio stesso. Qualora Lei
non fosse la persona a cui il presente messaggio è destinato, La invito ad
eliminarlo dal Suo Sistema ed a distruggere le varie copie o stampe, dandone
gentilmente comunicazione. Ogni utilizzo improprio è contrario ai principi
del D.lgs 196/03 e alla legislazione Europea (Direttiva 2002/58/CE). 

-----Messaggio originale-----
Da: Shaun [mailto:[EMAIL PROTECTED] 
Inviato: martedì 29 novembre 2005 0.53
A: php-general@lists.php.net
Oggetto: [PHP] Problem with Frames and Sessions

Hi,

I have a frameset with a left column and a main column. I have a login
script with a form in the left column. When I log in I get a menu in the
left column which targets to the main column. My problem is that when I
click on links in the left column nothing appears in the main frame, however
if I refresh the browser then the links work. I am sure this must be a PHP
session problem but I don't have any experience using frames, does anyone
have suggestions as to what the problem might be?

Thanks for your advice.

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

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.8/184 - Release Date: 27/11/2005
 

Attachment: smime.p7s
Description: S/MIME cryptographic signature


--- End Message ---
--- Begin Message ---
"You should not generally code with a dependence on register_globals"

OK. I have to consider that. Apparently the, ISP's  production server has 
this setting "on". Don't know why...

-Will


"Jim Moseby" <[EMAIL PROTECTED]> kirjoitti 
viestissä:[EMAIL PROTECTED]
>>
>> Damn! It Worked. Thanks :)
>>
>
>
> Even so, John's excellent advice should still be taken.  You should not
> generally code with a dependence on register_globals, for reasons you have
> just seen.
>
> JM 

--- End Message ---
--- Begin Message ---
On 28 November 2005 19:28, Jim Moseby wrote:

> > Damn! It Worked. Thanks :)
> > 
> 
> 
> Even so, John's excellent advice should still be taken.  You should
> not generally code with a dependence on register_globals, for reasons
> you have just seen.

Also, it seems likely that register_globals will go away completely in PHP 6, 
so writing new code now that depends on it being on is just foolish.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 


To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

--- End Message ---
--- Begin Message ---
Petr Smith wrote:
Cabbar Duzayak wrote:

Could you please tell which one you recommend in terms of
stability/speed and share your experience in terms of these 2?

Thanks...


I tried all and ended with http://www.phpguru.org/static/htmlMimeMail5.html

fast, stable, usable.

A very good choice. ;-)

--
Richard Heyes
http://www.phpguru.org

--- End Message ---

Reply via email to