php-windows Digest 14 Jul 2003 18:17:33 -0000 Issue 1822

Topics (messages 20778 through 20782):

Re: need help with sessions
        20778 by: Miha Nedok
        20779 by: Donatas

Sessions
        20780 by: Miha Nedok

Re: php-windows Subject: How do I prevent double posts?
        20781 by: Neil Smith

Problem getting phpMyAdmin to work on localhost
        20782 by: Richard White

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:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---

You can use HTML:

<meta http-equiv="refresh" content="0; url=XXXXXXXX">


-Mike

On Thu, 10 Jul 2003, Donatas wrote:

> Date: Thu, 10 Jul 2003 19:25:46 +0200
> From: Donatas <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] need help with sessions
>
> Thanks Luis,
>
> I had this idea in mind, but still... maybe someone knows a way how to
> achieve same effect without using JavaScript? Not that I don't like it but
> that there should be some way.
>
>
> PS. Your english is just as great as mine :D
>
>
> -----Original Message-----
> From: Luis Ferro [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 10, 2003 4:56 PM
> To: [EMAIL PROTECTED]
>
> One of the things that can be happening is that the server is sending
> the "location:" before the session data in the header... and when the
> browser gets it, simply forgots the session data.
>
> I'm not sure of in which version of PHP there was a problem like the one
> i'm describing, but i remember very well that i've made a Javascript
> redirector to place in the end of the page (after the session
> manipulation) to force the current page to go to the browser whole and
> then in the browser be redirected to the new page where the session was
> needed...
>
> Hope to have been usefull (and perceptible, from my english ;) )
> Luis Ferro
>
> Donatas wrote:
>
> >First some data about my setup:
> >PHP 4.2.3 (I bet nothing has changed till PHP 4.3.2 regarding
> >sessions) running on Windows 2K server
> >
> >My PC:
> >Windows 98 SE
> >Browser:
> >IE 6.0.2600.0000
> >
> >Now, the problem occurs when using sessions and header
> >('Location: ...');
> >
> >test1.php
> >/**********************/
> ><?
> >  session_save_path ('c:/winnt/temp/'); //making sure that the path
> >is correct, I override any value set in php.ini
> >  session_start ();
> >
> >  $_SESSION ['someVar'] = 'Hello';
> >  session_write_close (); //saving session data and closing it
> >  header ("Location: http://hqserver/....../test2.php";);
> >
> >  //echo '<a href="http://hqserver/....../test2.php";>To
> >test2.php</a>';
> >?>
> >
> >test2.php
> >/**********************/
> ><?
> >  session_save_path ('c:/winnt/temp/');
> >  session_start ();
> >  var_dump ($_SESSION);
> >?>
> >
> >So, when I first open browser and go to test1.php I get redirected to
> >test2.php and see this output:
> >array(0) { }
> >When I edit the link in IE linkfield from test2.php (rememeber..
> >there was a redirect) to test1.php and open it once again, I get:
> >array(1) { ["someVar"]=> &string(5) "Hello" }
> >
> >If I comment out header in test1.php and uncomment the HTML hyperlink
> >and go to test2.php using it, it works from the first time.
> >
> >
> >Thanks for any help solving this issue.
> >
> >Cheers,
> >Donny
> >
> >PS. My php.ini settings regarding sessions:
> >
> >session.auto_start
> > Off Off
> >session.cache_expire
> > 180 180
> >session.cache_limiter
> > nocache nocache
> >session.cookie_domain
> > no value no value
> >session.cookie_lifetime
> > 0 0
> >session.cookie_path
> > / /
> >session.cookie_secure
> > Off Off
> >session.entropy_file
> > no value no value
> >session.entropy_length
> > 0 0
> >session.gc_maxlifetime
> > 1440 1440
> >session.gc_probability
> > 1 1
> >session.name
> > PHPSESSID PHPSESSID
> >session.referer_check
> > no value no value
> >session.save_handler
> > files files
> >session.save_path
> > c:/winnt/temp/ C:\php4.2.3\sessiondata
> >session.serialize_handler
> > php php
> >session.use_cookies
> > On On
> >session.use_trans_sid
> > 1 1
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Thanks, this is something I was looking for.

I now retested this very same code at home where I have PHP 4.3.2 running on
Windows 2003 Standart Server and it worked, now I just want to find out
whether it was windows or PHP related.

Cheers,
Donny

PS. Thanks everyone for help


-----Original Message-----
From: Miha Nedok [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 12, 2003 6:08 PM
To: Donatas
Cc: [EMAIL PROTECTED]



You can use HTML:

<meta http-equiv="refresh" content="0; url=XXXXXXXX">


-Mike

On Thu, 10 Jul 2003, Donatas wrote:

> Date: Thu, 10 Jul 2003 19:25:46 +0200
> From: Donatas <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] need help with sessions
>
> Thanks Luis,
>
> I had this idea in mind, but still... maybe someone knows a way how to
> achieve same effect without using JavaScript? Not that I don't like it but
> that there should be some way.
>
>
> PS. Your english is just as great as mine :D


--- End Message ---
--- Begin Message ---
I'm developing web apps written in PHP for quite a long time.
I would like to know your preferred way using sessions ( cookie or TRANS
SID ). I'm using Cookies. I would like to hear some pro et contras. :)

-Mike


--- End Message ---
--- Begin Message --- The unique ID I normally use is to log the session ID into the DB and check if there are records with that ID before accepting the submission.

I meant to say, this is what I would do client side to prevent them submitting the form twice initially - its more effective than a round trip to the server telling them what they already know (that they have a twitchy trigger finger :-)

Cheers - Neil.

At 09:44 12/07/2003 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
From: "Stephen" <[EMAIL PROTECTED]>
To: "Windows Helplist \(PHP\)" <[EMAIL PROTECTED]>
Date: Sat, 12 Jul 2003 10:44:55 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP-WIN] Re: php-windows Digest 11 Jul 2003 19:46:14 -0000 Issue 1820


This is a weak solution to the problem, as users without javascript enabled
(And possibly other browsers) will be able to send the form twice still.
Perhaps a better way would be to give a form a unique ID which PHP can then
check aganist a database of some sort. That would completely stop double
sending, and providing IDs which are "old" are deleted you should not have
any problem. As for making the unique ID, using the microtime() function to
get the time with miliseconds should work quite well.

Stephen

----- Original Message -----
From: "Neil Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 12, 2003 1:11 AM
Subject: [PHP-WIN] Re: php-windows Digest 11 Jul 2003 19:46:14 -0000 Issue
1820


> Usually I run some javascript to set the 'disabled' attribute for the > submit button, then check the attribute is set when the user trys to press > the submit button again. This works in IE cause the button is actually > disabled. It is not disabled in netscape, however the value dsaibleds is > set. Therefore, checking if submit.disabled=true allows you to trap this. > > Return 'false' to your form submit code and the form will not submit again. > > HTH > Cheers - Neil. > > At 19:46 11/07/2003 +0000, you wrote: > >From: "Matt Babineau" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Date: Thu, 10 Jul 2003 22:01:34 -0700 > >Message-ID: <[EMAIL PROTECTED]> > >MIME-Version: 1.0 > >Content-Type: multipart/alternative; > > boundary="----=_NextPart_000_0014_01C3472E.D4BA9050" > >Subject: How do I prevent double posts? > Using CURL + Authorize.NET > > > >I have a CURL+Authorize.net solution in place, how can I prevent double > >posts to authorize.net when I post the payment info to the page? What are > >some good solutions you have in place? > > > >Thanks, > > > >Matt Babineau > >www.criticalcode.com > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >


--- End Message ---
--- Begin Message ---
I have a couple of problems with newish MySQL database.

I am running WinXP-Pro, MySQL V 4.0.12-nt, Apache etc.  I previously got
this all working, but today (after a break of a couple of weeks) I can't get
"phpMyAdmin-2.5.0-rc1" to work.

I have configured {config.inc.php} exactly as per documentation, but when I
try to run the {index.php} file in IE6, I get a pause (nothing new
displayed) and then the address bar reverts to the currently displayed page.
(ie the page displayed in IE just before I tried {index.php})

I don't see any errors???   Is this a known/common problem, with a solution?
If not, how can I find out what the problem is?

** Please also see my Notes below. **

NOTES:
1. I have a web site, with MySQL and I can run that copy of phpMyAdmin
2. I do have PHP working *locally* in IE ok.
3. I do have MySQL working and can administer is from the windows program
MySQL Control Center v0.9.1.



--- End Message ---

Reply via email to