[PHP] concurrent fopen fwrite fclose

2003-02-11 Thread Frederick L. Steinkopf
Hi,
How does php handle multiple concurrent fopen fwrite fclose calls?  I have a
website that gets 7 million page views a month and we have created a custom
log file using fopen fwrite and fclose.  When running this concurrently with
the apache log we notice significantly lower page hits with the php logger. 
My guess is that we're losing data when the requests come in concurrently. 
Any advice would be appreciated.
Fred Steinkopf

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




Re: [PHP] longitude/latitude function

2002-11-16 Thread Frederick L. Steinkopf
Just a note to keep in the back of your mind.  Unless I'm mistaken MapQuest
prints out road miles to a location.  The formula prints out direct (or as
the crow flies) miles.  There will almost always be differences between the
two.
Fred Steinkopf
- Original Message -
From: "Aaron Gould" <[EMAIL PROTECTED]>
To: "Edward Peloke" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, November 15, 2002 11:49 AM
Subject: Re: [PHP] longitude/latitude function


> I got that from http://freshmeat.net/projects/zipdy/?topic_id=66.  It's a
> program called Zipdy that does these calculations.  There's also a similar
> function on the US government census site (can't remember where though),
but
> I liked Zipdy's better.
>
> --
> Aaron Gould
> [EMAIL PROTECTED]
> Web Developer
> Parts Canada
>
>
> - Original Message -
> From: "Edward Peloke" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, November 15, 2002 11:55 AM
> Subject: RE: [PHP] longitude/latitude function
>
>
> > Thanks Aaron,
> >
> > If you don't mind me asking, where did you get it?  It seems to give a
> > better answer than my function.
> >
> > Thanks!
> > Eddie
> >
> > -Original Message-
> > From: Aaron Gould [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 15, 2002 11:04 AM
> > To: Edward Peloke; [EMAIL PROTECTED]
> > Subject: Re: [PHP] longitude/latitude function
> >
> >
> > Try this snippet... I can't vouch for its accuracy since I am not a
> > mathematician:
> >
> >  > // Function takes latitude and longitude  of two places as input
> > // and prints the distance in miles and kms.
> > function calculateDistance($lat1, $lon1, $lat2, $lon2)
> > // Convert all the degrees to radians
> > $lat1 = deg2rad($lat1);
> > $lon1 = deg2rad($lon1);
> > $lat2 = deg2rad($lat2);
> > $lon2 = deg2rad($lon2);
> >
> > // Find the deltas
> > $delta_lat = $lat2 - $lat1;
> > $delta_lon = $lon2 - $lon1;
> >
> > // Find the Great Circle distance
> > $temp = pow(sin($delta_lat / 2.0), 2) + cos($lat1) * cos($lat2) *
> > pow(sin($delta_lon / 2.0), 2);
> >
> > $EARTH_RADIUS = 3956;
> >
> > $distance = ($EARTH_RADIUS * 2 * atan2(sqrt($temp), sqrt(1 - $temp))
*
> > 1.6093);
> >
> > return $distance;
> > }
> > ?>
> >
> >
> > --
> > Aaron Gould
> > [EMAIL PROTECTED]
> > Web Developer
> > Parts Canada
> >
> >
> > - Original Message -
> > From: "Edward Peloke" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, November 15, 2002 11:20 AM
> > Subject: [PHP] longitude/latitude function
> >
> >
> > > Has anyone ever written a php function to take the longitude and
> latitude
> > of
> > > two destinations and calculate the distance?
> > >
> > > I am working on one but the output is just a little off.
> > >
> > > Thanks,
> > > Eddie
> > >
> > >
> > > --
> > > 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
>
>
> --
> 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] PHP and Apache authorization: how to logout. Help!

2002-02-02 Thread Frederick L. Steinkopf

While I've never done this before,
 couldn't you use a session and have session variables tied to the user name
and password and then have the logout function kill the session?

- Original Message -
From: "Rodolfo Gonzalez" <[EMAIL PROTECTED]>
To: "Matthew Walker" <[EMAIL PROTECTED]>
Cc: "Aras Kucinskas" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, February 02, 2002 8:26 PM
Subject: RE: [PHP] PHP and Apache authorization: how to logout. Help!


> On Fri, 1 Feb 2002, Matthew Walker wrote:
> > Does anyone have the answer for this question? I need it too...
>
> As I learnt before, it's not possible without closing the user's browser.
>
> > My site is in directory which is protected with .htaccess file.
> > I want to develope a logout function, which can reset Apache
> > authorization.
>
>
> --
> 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] how to reinitialise an MySQL_fetch_array

2001-12-16 Thread Frederick L. Steinkopf

Use the function mysql_data_seek(result variable, row number)
so in your case it would be: mysql_data_seek($result2, 0);
You should also consider suppressing the warning for an empty set by placing
a '@' in front of the function

- Original Message -
From: "Ivan Carey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 15, 2001 7:32 AM
Subject: [PHP] how to reinitialise an MySQL_fetch_array


Hello,
I would like to reinitialise an MySQL_fetch_array. That is, once it has gone
through I would like to be able to go back to the start again.

for eg
while ($myrow=MySQL_fetch_array($result2))
{
 $befid=$myrow["beforeid"];

 while($myrow5=MySQL_fetch_array($result5))
 {
  $aftid=$myrow["afteridid"];
  if ( $befid == aftid)
  {
  do something;
  }
 } //while($myrow5=MySQL_fetch_array($result5))

//now that the inner loop has finished I would like to be able to
restart the inner loop by reinitailsing the MySQL_fetch_array

} //while ($myrow=MySQL_fetch_array($result2))

Regards,
Ivan





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] The future of PHP

2001-08-29 Thread Frederick L. Steinkopf

Manuel,
Rather than whining about the future of PHP, why don't you be proactive and
take on the goal of raising the $100,000 for the project?
Fred Steinkopf

- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Manuel Lemos" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, August 29, 2001 12:11 AM
Subject: Re: [PHP] The future of PHP


> > These guys resort to these marketing tricks to promote Python as hell,
> > and the PHP people just sits and waits doing almost nothing in
> > comparision to promote PHP as hard as they can even when they lives
> > depend on the acceptance of PHP as a wide spread language!
>
> Manuel, please, give this tirade a rest.  Nobody associated with Python
> development was involved in this "amazing" marketing trick you are
> referring to.  Somebody just decided to do this on their own.  And now you
> are criticizing the PHP developers for not having the same foresight as
> the Python developers?
>
> It says so right in their FAQ
> (http://software-carpentry.codesourcery.com/faq.html)
>
> "And in answer to some of the more virulent postings on Usenet and in
>  other venues, neither Guido van Rossum nor anyone else associated with
>  Python development was involved in setting up this project, choosing the
>  language, or defining the terms of the competition. Guido was only asked
>  to be a judge after the decision to use Python had been made. If we
>  had decided to use Perl or Tcl, we would obviously have invited Larry
>  Wall or John Ousterhout to join the panel."
>
> If somebody wants to put up $100,000 for a PHP software contest, perfect,
> great, we will be every bit as cooperative as the Python developers.
>
> -Rasmus
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PC MAG article - what a crap!

2001-05-09 Thread Frederick L. Steinkopf

What's truly amazing is that they apparently are unaware of the Nusphere
distro.  Even a total dolt can install apache, mysql, perl, and php on a
windows box in minutes.  I've done it on three (98 and NT) so far and it is
as simple as put the CD in the machine, fire it up, click on a couple of
boxes and you're done.  About 15 minutes  total vs 60 minutes for my last
windows upgrade.  We install it the old fashioned way at work and it does
take longer, but you can customize the install.
Fred Steinkopf

- Original Message -
From: "Maxim Maletsky" <[EMAIL PROTECTED]>
To: "'Tyrone Mills'" <[EMAIL PROTECTED]>; "PHP List"
<[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2001 11:35 PM
Subject: RE: [PHP] PC MAG article - what a crap!


> http://www.zdnet.com/pcmag/stories/reviews/0,6755,2711724,00.html
>
> ...this is a total crap.
>
> I could not stop going from hysteric laughs to schizophrenetic smiles
> reading this...
>
> Really, the technology is not the same and finds it's best users in
> appropriate fields. Apparently these editors love Windowz for wizards and
> are of a conservative idea that 'paid' things are better because who sold
> them is responsible for the support.
>
> bull[\.]*t!
>
> I don't think all these M$ things will survive for longer then 3 more
years.
> Nobody thinks, nor even Billy. I personally met him a month ago on a press
> conference in Tokyo - he was here because of X-Box, but many think his
point
> is the inability of keeping the monopoly any further, so he now expands
> Microsoft's area of expertise. I truly believe Gates would have some long
> thoughts answering why he thinks Microsoft Windows will stay 'hard'
against
> Linux Mandrake (or other well developed Open Source OS) in future.
>
> And then, only then, when Linux and other Open (and some not-open) Sources
> will get into a monopoly balance, the publications will start comparing a
> larger number of Servers, Platforms and programming technologies giving
the
> right credit to PHP rather then say to $COLD FUSION$ because of it got
> 'WYSIWIYG tool for front-end interface'.
>
> They said you have to be an expert to set PHP on Linux, SURE YOU HAVE
TO!!!
> After all, you need a root password!!! Who, in the name of god, will ever
> give you the superuser password for production server if you know a
d[\.]*k
> of Apache/Linux???
>
> On windowz is the same: an MCSE knows how to set server's environment, and
I
> think he'd make the SAPI working!
>
> So only PHP beginners remain in trouble.
> Well, not exactly. As soon as they discover the mailing lists, forums,
> online tutorials and join the community they soon become more sure in
> themselves and go wild with development, becoming something more then
> webmasters in a very few time.
> Is that possible with CF, ASP?
>
> These writers are just too stupid to understand and cover this technology.
> They need an extended and capable to discover the alternatives
understanding
> of the web technologies.
>
> Cheers,
> Maxim Maletsky,
> PHPBeginner.com
>
>
>
> -Original Message-
> From: Tyrone Mills [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 10, 2001 9:53 AM
> To: PHP List
> Subject: RE: [PHP] PC MAG article
>
>
> If you can stand to read the whole article (I barely could), BEA declined
to
> participate. The article is nothing but worthless tripe, BEA is probably
> better off for having been mentioned only in passing.
>
> -Original Message-
> From: Mark Charette [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 09, 2001 5:55 PM
> To: PHP List
> Subject: Re: [PHP] PC MAG article
>
>
> Considering Websphere/EJB was mentioned ...
>
> Where's the BEA Weblogics review 
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]