Re: [PHP] Thread Safe?

2010-02-15 Thread Robert Cummings

Hi David,

Install the non-thread safe version and run it in conjunction with 
FastCGI. You may also be interested in looking into WinCache for PHP. 
Non-thread safe works best with FastCGI, running PHP as an ISAPI module 
is NOT recommended.


Cheers,
Rob.


David Stoltz wrote:
Hi all, 
 
I'm installing 5.3.1 on my Windows Server with IIS6.
 
Should I choose VC9 x86 Thread Safe or "non-thread safe" ?
 
What is the difference?
 
Thanks!




--
http://www.interjinn.com
Application and Templating Framework for PHP

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



[PHP] Thread Safe?

2010-02-15 Thread David Stoltz
Hi all, 
 
I'm installing 5.3.1 on my Windows Server with IIS6.
 
Should I choose VC9 x86 Thread Safe or "non-thread safe" ?
 
What is the difference?
 
Thanks!


[PHP] Thread Safe?

2009-11-20 Thread David Stoltz
Forgot to ask:

On the Windows download page, there are options like:

VC9 Thread Safe
VC9 Non-Thread Safe
VC6 Thread Safe
...etc

What is the VC, and what is thread safe?

Thanks!

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



Re: [PHP] Thread safe

2002-05-29 Thread Ed Gorski

Yeah but if you get a higher load of users that can get REALLY uglyif 
it is strictly an update (editing of an already existing element) then 
locking that record should be fine but if it's an insert or delete you 
shouldn't lock the table.

ed

At 07:15 PM 5/28/2002 -0500, Miguel Cruz wrote:
>If you use the database mechanism to lock the table during the
>transaction, then the second simultaneous invocation of your PHP program
>will wait (a tiny fraction of a second) until the first one is done.
>
>miguel
>
>On Wed, 29 May 2002, r wrote:
> > since only my one program was accessing the table the database was safe,
> > My question stands at what happens if 2 or more people access
> > "enterdetails.php", click on the submit  button to enter info into the same
> > table at the same time?
> > since I will be returning a valid ID no for each of them...Its 
> basically
> > the old chopsticks puzzle and  would like to know how does PHP handle it?
> > -Ryan.
> >
> > - Original Message -
> > From: "Miguel Cruz" <[EMAIL PROTECTED]>
> > To: "r" <[EMAIL PROTECTED]>
> > Sent: Tuesday, May 28, 2002 12:52 PM
> > Subject: Re: [PHP] Thread safe
> >
> >
> > > Well, that's not a thread safety issue if you're trying to lock a record
> > > in a database. If it was handled entirely within Java, then there was no
> > > guarantee of database referential integrity. Only the database can do
> > > that.
> > >
> > > miguel
> > >
> > > On Wed, 29 May 2002, r wrote:
> > > > Nope its not more like a database issue as this was clearly 
> addressed in
> > > > java and so the "synchronised" keyword was made and you have to
> > implement a
> > > > "synchronised block" of code to make it thread safe.
> > > > is this possible in PHP or does PHP itself take care to make all 
> scripts
> > > > thread safe?
> > > >
> > > > Cheers,
> > > > -Ryan.
> > > >
> > > > - Original Message -
> > > > From: "Miguel Cruz" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, May 28, 2002 11:44 AM
> > > > Subject: Re: [PHP] Thread safe
> > > >
> > > >
> > > > > On Mon, 27 May 2002, r wrote:
> > > > > > In java servlets I used to use a "synchronised" block of code to
> > make
> > > > sure
> > > > > > it was thread safe...how do i do this in PHP?
> > > > > >
> > > > > > Heres what should be thread safe
> > > > > >
> > > > > > {
> > > > > > $r=select max(cno)+1 from MyTable;
> > > > > > (then i insert into the table the new cno plus my name)
> > > > > > insert into mytable ($r,'myname');
> > > > > > }
> > > > > > How to do this and make sure its thread safe?
> > > > >
> > > > > More of a database issue. "select ... for update" is a good starting
> > point
> > > > > as you search the manual of your particular database platform.
> > > > >
> > > > > miguel
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > >
> > > >
> > >
> >
> >
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP] Thread safe

2002-05-28 Thread Miguel Cruz

If you use the database mechanism to lock the table during the 
transaction, then the second simultaneous invocation of your PHP program 
will wait (a tiny fraction of a second) until the first one is done. 

miguel

On Wed, 29 May 2002, r wrote:
> since only my one program was accessing the table the database was safe,
> My question stands at what happens if 2 or more people access
> "enterdetails.php", click on the submit  button to enter info into the same
> table at the same time?
> since I will be returning a valid ID no for each of them...Its basically
> the old chopsticks puzzle and  would like to know how does PHP handle it?
> -Ryan.
> 
> - Original Message -
> From: "Miguel Cruz" <[EMAIL PROTECTED]>
> To: "r" <[EMAIL PROTECTED]>
> Sent: Tuesday, May 28, 2002 12:52 PM
> Subject: Re: [PHP] Thread safe
> 
> 
> > Well, that's not a thread safety issue if you're trying to lock a record
> > in a database. If it was handled entirely within Java, then there was no
> > guarantee of database referential integrity. Only the database can do
> > that.
> >
> > miguel
> >
> > On Wed, 29 May 2002, r wrote:
> > > Nope its not more like a database issue as this was clearly addressed in
> > > java and so the "synchronised" keyword was made and you have to
> implement a
> > > "synchronised block" of code to make it thread safe.
> > > is this possible in PHP or does PHP itself take care to make all scripts
> > > thread safe?
> > >
> > > Cheers,
> > > -Ryan.
> > >
> > > - Original Message -
> > > From: "Miguel Cruz" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, May 28, 2002 11:44 AM
> > > Subject: Re: [PHP] Thread safe
> > >
> > >
> > > > On Mon, 27 May 2002, r wrote:
> > > > > In java servlets I used to use a "synchronised" block of code to
> make
> > > sure
> > > > > it was thread safe...how do i do this in PHP?
> > > > >
> > > > > Heres what should be thread safe
> > > > >
> > > > > {
> > > > > $r=select max(cno)+1 from MyTable;
> > > > > (then i insert into the table the new cno plus my name)
> > > > > insert into mytable ($r,'myname');
> > > > > }
> > > > > How to do this and make sure its thread safe?
> > > >
> > > > More of a database issue. "select ... for update" is a good starting
> point
> > > > as you search the manual of your particular database platform.
> > > >
> > > > miguel
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> > >
> >
> 
> 
> 


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




Re: [PHP] Thread safe

2002-05-28 Thread Miguel Cruz

On Mon, 27 May 2002, r wrote:
> In java servlets I used to use a "synchronised" block of code to make sure
> it was thread safe...how do i do this in PHP?
> 
> Heres what should be thread safe
> 
> {
> $r=select max(cno)+1 from MyTable;
> (then i insert into the table the new cno plus my name)
> insert into mytable ($r,'myname');
> }
> How to do this and make sure its thread safe?

More of a database issue. "select ... for update" is a good starting point 
as you search the manual of your particular database platform.

miguel


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




[PHP] Thread safe

2002-05-27 Thread r

Hi,
In java servlets I used to use a "synchronised" block of code to make sure
it was thread safe...how do i do this in PHP?

Heres what should be thread safe

{
$r=select max(cno)+1 from MyTable;
(then i insert into the table the new cno plus my name)
insert into mytable ($r,'myname');
}
How to do this and make sure its thread safe?

Any help appreciated,
-Ryan


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