[PHP] Re: PHP|Con insane pricing

2003-09-16 Thread Jeremy Brand, B.S.
Thanks again to all who at least had a mature answer.

Cheers :)
Jeremy
Jeremy Brand, B.S. wrote:
Does anyone know a way to attend the PHP|con west as an observer in 
Santa Clara, CA, US on Oct. 23rd without spending tons of ca$h?

The pricing seems insane, and geared towards people with lots of spare 
money...

I would love to hear specifically the Advanced track on Oct. 23 (Michael 
Radwin, Sterlin, Thies, George Schlossnagle and JimW), but I'm not going 
to shell out $495 (the cheapest non-student rate) for it.

Thanks,
Jeremy


--
Prediction is very difficult, especially of the future.
   Niels Bohr
http://www.nirvani.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP|Con insane pricing

2003-09-15 Thread Jeremy Brand, B.S.
Does anyone know a way to attend the PHP|con west as an observer 
in Santa Clara, CA, US on Oct. 23rd without spending tons of ca$h?

The pricing seems insane, and geared towards people with lots of 
spare money...

I would love to hear specifically the Advanced track on Oct. 23 
(Michael Radwin, Sterlin, Thies, George Schlossnagle and JimW), 
but I'm not going to shell out $495 (the cheapest non-student 
rate) for it.

Thanks,
Jeremy
--
Prediction is very difficult, especially of the future.
   Niels Bohr
http://www.nirvani.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP|Con insane pricing

2003-09-15 Thread Jeremy Brand, B.S.
Thanks to everyone for their responses, though I still have not 
found a way to get to the conference at a reasonable price (what I 
consider reasonable).

If anyone has any comments other than justifying the price of the 
conference, like a friends of php list I can get on so I can 
attend it would be greatly appreciated.  I feel like I would 
actually add value by being there, not only in supporting my 
friends who are doing speaking at the conference, but also in 
helping to evangelize php and help newbies with questions/fud/etc.

Thanks.
Jeremy
Jeremy Brand, B.S. wrote:
Does anyone know a way to attend the PHP|con west as an observer in 
Santa Clara, CA, US on Oct. 23rd without spending tons of ca$h?

The pricing seems insane, and geared towards people with lots of spare 
money...

I would love to hear specifically the Advanced track on Oct. 23 (Michael 
Radwin, Sterling, Thies, George Schlossnagle and JimW), but I'm not going 
to shell out $495 (the cheapest non-student rate) for it.

Thanks,
Jeremy


--
Prediction is very difficult, especially of the future.
   Niels Bohr
http://www.nirvani.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Quoted-Printable Encoding

2001-07-16 Thread jeremy brand

I think you will want to use the imap_8bit() function:
http://php.net/imap_8bit

But, I'm not sure if there is a version available in PHP without compiling
in c-client IMAP.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: +393485323988 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LINUX is obsolete  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Get your own Free, Private email at http://www.smackdown.com/

On Mon, 16 Jul 2001, the following spilled from the mind of Sheridan...:

 Date: Mon, 16 Jul 2001 14:23:00 -0500
 From: Sheridan Saint-Michel [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] Quoted-Printable Encoding

 I am trying to put together a script that e-mails web pages (similar to the send 
page functionality in IE).

 Is there a function that will convert HTML from plaintext into Quoted-Printable 
Encoding (ie = becomes =3D) so I can
 e-mail it?

 Or will one of the encodings available (ie rawurlencode) work in it's place?

 Any help or ideas would be greatly appreciated.

 Sheridan Saint-Michel
 Website Administrator
 FoxJet, an ITW Company
 www.foxjet.com





-- 
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] Multiple Host's with setcookie

2001-07-13 Thread jeremy brand

That is correct.  .domain.com is the correct way to do it.  (make sure you
have the leading dot.)  You are having some other problem.

Jeremy


On Fri, 13 Jul 2001, the following spilled from the mind of david jarvis:

 Date: Fri, 13 Jul 2001 09:36:14 -0400
 From: david jarvis [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] Multiple Host's with setcookie

 Hi, I was wondering if there was a way to set a cookie so that it would be 
accessible over multiple hosts, for instance, mail.webpage.com, forums.webpage.com, 
ect.  I tried setting the domain to .webpage.com, but when I read the cookie it says 
the domain is w ww.webpage.com, thus not being accessible by mail.webpage.com. Any 
thoughts would be greatly appreciated.


-- 
Jeremy Brand :: Sr. Software Engineer :: +393485323988 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LINUX is obsolete  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Get your own Free, Private email at http://www.smackdown.com/



-- 
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] Multiple Host's with setcookie

2001-07-13 Thread jeremy brand

for example this code:
setcookie('cookie_name', 'cookie_val', time()+3600, '/', '.domain.com');

results in this HTTP header:
Set-Cookie: cookie_name=cookie_val; expires=Fri, 13-Jul-01 15:14:25 GMT; path=/; 
domain=.domain.com

Jeremy Brand

Jeremy Brand :: Sr. Software Engineer :: +393485323988 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LINUX is obsolete  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Get your own Free, Private email at http://www.smackdown.com/

On Fri, 13 Jul 2001, the following spilled from the mind of jeremy brand:

 Date: Fri, 13 Jul 2001 16:08:06 +0200 (WEDT)
 From: jeremy brand [EMAIL PROTECTED]
 To: david jarvis [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Multiple Host's with setcookie

 That is correct.  .domain.com is the correct way to do it.  (make sure you
 have the leading dot.)  You are having some other problem.

 Jeremy


 On Fri, 13 Jul 2001, the following spilled from the mind of david jarvis:

  Date: Fri, 13 Jul 2001 09:36:14 -0400
  From: david jarvis [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: [PHP] Multiple Host's with setcookie
 
  Hi, I was wondering if there was a way to set a cookie so that it would be 
accessible over multiple hosts, for instance, mail.webpage.com, forums.webpage.com, 
ect.  I tried setting the domain to .webpage.com, but when I read the cookie it says 
the domain is w ww.webpage.com, thus not being accessible by mail.webpage.com. Any 
thoughts would be greatly appreciated.
 





-- 
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] GD help

2001-07-13 Thread jeremy brand

Hi Chad,

You can follow my example at:
http://www.nirvani.net/software/image_create/

Hope this helps.
Jeremy Brand

Jeremy Brand :: Sr. Software Engineer :: +393485323988 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LINUX is obsolete  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Get your own Free, Private email at http://www.smackdown.com/

On Fri, 13 Jul 2001, the following spilled from the mind of Angerer, Chad:

 Date: Fri, 13 Jul 2001 11:13:47 -0500
 From: Angerer, Chad [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: [PHP] GD help

 I am having some problems generating images with GD.  I am using GD 1.6.2
 and trying to create a .png image.  I know it works.  I have created just a
 generic graphic without trying to put variables into it and am hoping
 someone can help me on this one.  Here is some code snippet

 // here is my gd.php file to create the image

 ?

 Header ( Content-Type: image/png );

 $im  =  ImageCreate ( 10,  200 );
 $red  =  ImageColorAllocate ( $im,  255,  0,  0 );
 $white  =  ImageColorAllocate ( $im ,  255,  255,  255 );
 $blue  =  ImageColorAllocate ( $im ,  0 ,  0 ,  255 );
 $gray  =  ImageColorAllocate ( $im , 0xC0, 0xC0 , 0xC0 );

 ImageFill ( $im , 0 , 0 , $gray );
 ImageFilledRectangle ( $im , 0 ,$bluehg, 3, 200, $blue );
 ImageFilledRectangle ( $im , 6, $redhg, 10, 200, $red );

 // write the image
 ImagePNG( $im );

 // clean up the mess
 ImageDestroy($im);
 ?

 // here is the function that I use to determine the attributes of the image

 // create a function to call gd.php
 function graphic($blueval, $redval)
 {
   $pctrd = round($blueval*100, 1);
   $pctbl = round($redval*100, 1);
   $blueval = ($blueval * 200);
   $redval = ($redval * 200);

   echo table
   tr
   td
 align=\center\$pctbl%/td
   tdimg
 src=\gd.php?bluehg=$bluevalredhg=$redval\ height=\100\ //td
   td
 align=\center\$pctrd/td
   /tr
   /table;
 }

 On the page I get a broken image.  If I view the source I see the image is
 being called with params.

 Any help would be appreciated.

 Thanks.

 Chad






-- 
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] Memory usage question

2001-07-12 Thread jeremy brand

 Is there a way that I can reduce the memory usage of PHP4? Also, is it a
 good idea to configure a separate Apache that has PHP4 enabled and use it
 on only the PHP4 sites on the server, while the normal Apache has PHP4
 disabled and serves the non-PHP4 sites?

Hi Philip,

It's probably your SQL queries that are eating up your memory.

1) You can configure php.ini to use less memory per thread.

2) You can run my mbfree program in a crontab to free memory on a
schedule.  I currently do this.
http://www.nirvani.net/software/mbfree/

Jeremy Brand

-- 
Jeremy Brand :: Sr. Software Engineer :: +393485323988 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LINUX is obsolete  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Get your own Free, Private email at http://www.smackdown.com/



-- 
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] sessions and objects

2001-02-22 Thread jeremy brand

Don't store your object in the session, that is just bad design.
Store a lookup value, then grab your object from your DB only when you
need it.

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Thu, 22 Feb 2001, Kevin Beckford wrote:

 Date: Thu, 22 Feb 2001 12:36:29 -0500
 From: Kevin Beckford [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] sessions and objects
 
 Hello all,
 I've been away from php for a while, ( and I'm glad to be back) Last
 time I checked in, sessioning was kinda working - especially the sessioning
 of objecs. Is this feature robust enough for production now? I want to do
 basic sessioning, and I don't have a lot of development time. What I want to
 do is simply :
 - Log in
 -instantsiate an object that will contain the user information
 -save the data in session
 -allow me to recreate that object from page to page
 How would I do/find out how to do this?
 
 
 
 -- 
 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] Editor

2001-01-29 Thread jeremy brand

http://www.vim.org/

:set nu

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Tue, 30 Jan 2001 [EMAIL PROTECTED] wrote:

 Date: Tue, 30 Jan 2001 02:37:36 EST
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] Editor
 
 Hi,
 
 I know this has been asked before but I can`t seem to get the archive email 
 thingy to work, basically I`m looking for a free or cheap editor that has the 
 lines numbered so that it`s a bit easier for me to debug my scripts.
 
 TIA
 Ade
 
 -- 
 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] NT5 Sub Domains

2001-01-27 Thread jeremy brand

apache.org.  :)

 I can hear the answer already...  apache.com
 
 
 
 From: Rasmus Lerdorf [EMAIL PROTECTED]
 To: "[ rswfire ]" [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: Re: [PHP] NT5 Sub Domains
 Date: Sat, 27 Jan 2001 13:31:34 -0800 (PST)
 
 Why don't you just install the Windows version of Apache?  That way your
 development environment will be much closer to your production
 environment.
 
 -Rasmus
 
 On Sat, 27 Jan 2001, [ rswfire ] wrote:
 
   This is a little off topic, so I apologize, but I was hoping one of the
   computer gurus here could help me.
  
   When I go live with my network, I will be using sub-domains.  Such as:
   http://subdomain.domain.com/
  
   In order to test this on my NT5/IIS5 system, I need to be able to use 
 these
   subdomains.  I am programming locally, so there is no .com after my 
 name.
   It is my computer name:  http://si-exec-cio/
  
   Does anyone know how I can configure IIS5 to include
   http://subdomain.si-exec-cio/ ?
  
   I am using Win 2000 Professional.
  
   Again, I apologize for sending an off-topic message.  My network is
   primarily controlled by PHP so I hope you can understand.  =)
   _
   Get your FREE download of MSN Explorer at http://explorer.msn.com
  
  
   --
   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]
  
 
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com
 
 
 -- 
 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] POST headers

2001-01-23 Thread jeremy brand

You can get your answer from a program I wrote, in fact, feel free (as
in GLP) to use the POST function that I wrote.

http://www.nirvani.net/software/SmartBeep_PageIT_Plus/

See the "urlize_array" and "post_method" functions.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Wed, 24 Jan 2001, Tobias Talltorp wrote:

 Date: Wed, 24 Jan 2001 01:11:08 +0100
 From: Tobias Talltorp [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] POST headers
 
 What are the HTTP Headers performing a POST?
 
 I need to simulate a POST to a webpage.
 NOTE: I do not want to use curl or the post-to-host function, since these
 get the information.
 
 What I want to do is this:
 
 I enter the page "localhost/post.php" where there are a set of HTTP Headers
 for sending a post to "domain.com/result.php". From this point on,
 domain.com handles the displaying of the result. Just exactly the same
 process as a HTML-form, just without the form.
 
 Thanks,
 // Tobias
 
 
 
 -- 
 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] XOR data encryption

2001-01-20 Thread jeremy brand

Feel free (as in public domain) to use this function:
http://www.nirvani.net/software/misc/xor_string-1.0.0.inc.asc

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Sat, 20 Jan 2001, Steve Quezadas wrote:

 Date: Sat, 20 Jan 2001 13:41:20 -0800
 From: Steve Quezadas [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] XOR data encryption
 
 I am trying to store some credit card numbers in a database, along with the rest of 
the data (dangerous, I know). Unforunately, I am using a provider that doesn't have 
the mcrypt functions compiled into PHP, so I guess I am stuck using the swiss-cheese 
like XOR method of encryption. My client is too cheap to put a separate server to 
store the credit card numbers, so I am stuck using symmetrical encryption.
 
 NEvertheless, I want to implement XOR, but I can't find an example on the net that 
shows how to do it in PHP. I know the philosophy behind it, but hwo do you do it? Do 
you convert the letters in the passphrase and the credit card number into 0 1 binary 
and then XOR that? What commands are there iN PHP that converts from alphanumeric to 
binary? If someone could post an example, that would be great.
 
 - Steve
 
 


-- 
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] PHP Editors

2001-01-18 Thread jeremy brand

There is no recommended editor.  Use whatever you like, as long as it
stores the files in plain text.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer

On Thu, 18 Jan 2001, Karl J. Stubsjoen wrote:

 Date: Thu, 18 Jan 2001 08:02:44 -0700
 From: Karl J. Stubsjoen [EMAIL PROTECTED]
 To: PHP Mailing List [EMAIL PROTECTED]
 Subject: [PHP] PHP Editors
 
 So what editor is recommended?  I'm a little familiar with Emacs (kinda
 cool, but I'm use to keywords and such being colored - as in Interdev).
 
 Thanks!
 
 
 -- 
 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] decimal point movement...

2001-01-18 Thread jeremy brand

If you want to use the modulus, why not just use modulus (%) ?

But, instead of doing all that math, why not just use the
number_format() function?

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Thu, 18 Jan 2001, DanO wrote:

 Date: Thu, 18 Jan 2001 13:57:55 -0800
 From: DanO [EMAIL PROTECTED]
 To: "Php-General@Lists. Php. Net" [EMAIL PROTECTED]
 Subject: RE: [PHP] decimal point movement...
 
 
 why go thru the costly overhead of a regex when you can use math?
 
 
 ex:
 
 ?
 $number = '600';
 $new  = $number/100;
 $rem  = $new-$new%100;
 if ($rem == 0) {
   $new .= ".00";
 }
 
 print $number;
 print "\n";
 print $new;
 ?
 
 you divide the number by 100 to push the decimal back, and, if there is no
 remainder (by modulus division), you append .00 to the variable.
 
 DanO
 
 -Original Message-
 From: Robert Collins [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 18, 2001 1:05 PM
 To: 'Christopher Allen'; php
 Subject: RE: [PHP] decimal point movement...
 
 
 Christopher,
 
 try a regular expression somthing like this
 
 ?
 $temp = "007170";
 ereg ("([0-9]{2})([0-9]*)", $temp, $test);
 $changed_to_deicmal_form = $test[1].".".$test[2];
 echo "$changed_to_deicmal_form";
 ?
 
 Robert
 
 -Original Message-
 From: Christopher Allen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 18, 2001 11:35 AM
 To: php
 Subject: [PHP] decimal point movement...
 
 
 
 Greetings!
 
 I am looking for an efficeient way to assign a decimal to a number and store
 the new number.
 I wanto add a decimal point after the first 2 leading digitis..
 while ( query runs)
 {
 
 $temp=007170;
 $changed_to_deicmal_form;  // would store .7170
 }
 
 Furthermore I was using printf to round up numbers...has anyone found a
 different or better way?
 
 
 
 
 
 Christopher C. M. Allen
 
 
 --
 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]




RE: [PHP] decimal point movement...

2001-01-18 Thread jeremy brand

 my point is that math should be used instead of a regex as it is more
 efficient.

I totally agree.  :)

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/



-- 
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] How to participate from the digest?

2001-01-18 Thread jeremy brand

You can add a Re: to the "Subject:" header, then make sure that your 
"In-Reply-To:" header is in reply to the "Message-ID:" header of the
message you are replying to.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Thu, 18 Jan 2001 [EMAIL PROTECTED] wrote:

 Date: Thu, 18 Jan 2001 16:26:46 -0600
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] How to participate from the digest?
 
 Because of the high level of activity of this list, I receive the digest. 
 When I see items of interest I note their subject, and then look them up 
 from the archive at http://www.phpbuilder.com/mail/php-general/2001012/ 
 (for today's, for example). Sometimes I see an item I'd like to respond to 
 with helpful information or useful commentary. Is there a way I can easily 
 do this, and in such a way that my messages get properly slotted into the 
 thread? Thanks.
   --David
 
 
 Disclaimer: This message does not necessarily represent the opinion of
 RFD  Associates, Inc.Confidentiality: The sender intends this message
 for the exclusive use of the recipient. This message may include 
 confidential or privileged information you may not disclose to others.
 
 Protection: We protect mail content through the use of MIMEsweeper (tm).
 For more information contact RFD  Associates via http://www.rfdinc.com.
 



-- 
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] Quotes and Values

2001-01-18 Thread jeremy brand

Then you need to escape your double quotes:

$myVal = "form name=\"$name\" action=\"$action\" method=\"$method\"";

or use the single quote equivilant:

$myVal = 'form name="'.$name.'" action="'.$action.'" method="'.$method.'"';

or  (PHP4 only)

$myVal = EOT
form name="$name" action="$action" method="$method"
EOT;

Jeremy


Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Thu, 18 Jan 2001, Karl J. Stubsjoen wrote:

 Date: Thu, 18 Jan 2001 15:44:06 -0700
 From: Karl J. Stubsjoen [EMAIL PROTECTED]
 To: PHP Mailing List [EMAIL PROTECTED]
 Subject: [PHP] Quotes and Values
 
 Hello,
 
 I am trying to do this:
 
 $myVal = "form name="$name"" action="$action" method="$method""
 *trying to accomplish putting " qotes around my string values*
 
 Thanks!
 
 
 -- 
 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] Clearing a variable

2001-01-18 Thread jeremy brand

you can clear a string by doing this:

$string = '';

you can clear an array by doing this:

$array = array();

you can clear (or zero out rather) an integer or float by doing:

$int_or_float = 0;

or you can simply unset() the variable:

unset($any_of_the_above);

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Thu, 18 Jan 2001, Brandon Orther wrote:

 Date: Thu, 18 Jan 2001 14:44:56 -0800
 From: Brandon Orther [EMAIL PROTECTED]
 To: PHP User Group [EMAIL PROTECTED]
 Subject: [PHP] Clearing a variable
 
 Hello,
 
 How can I clear a variable?
 
 Thank you,
 
 
 Brandon Orther
 WebIntellects Design/Development Manager
 [EMAIL PROTECTED]
 800-994-6364
 www.webintellects.com
  
 
 -- 
 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] srtoring user selection on the database...

2001-01-18 Thread jeremy brand

 while(list($key, $val) = each($cb)) {
  if ($val == 1  $key != 0) {
   $acc = $key;
 } else {
   $acc = $acc.",".$key;
 }

This looks syntactically correct.

 }
 // by the way this: $acc=.$key would be a valid command? like the c++ $a =+
 $b

I usually use (for a string):
.=  
that would be:
$foo .= "old foo plus more stuff";
is the same as
$foo = $foo . "old foo plus more stuff";

in PHP you use += for mathimatics.

 
 in this solution I store all the indexes that have a value 1 or that are
 setted.. so let's say tha the user had click in 2,4,8,25 I would have
 $acc=2,4,8,25... later on I explode that and I will have the clicks...
 
 What do you think?

well, now you have the values.  You need to state them.  Either print
them to "hidden" HTML input tags or save and retrieve them from the
DB.

:)
Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/


-- 
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] $PHP_SELF truncated to 17 chars

2001-01-18 Thread jeremy brand

I'm not aware of this bug, but temporarily you might consider using
the $SCRIPT_NAME variable.  The same values is stored in it AFAIK.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Thu, 18 Jan 2001, Shawn Blaylock wrote:

 Date: Thu, 18 Jan 2001 15:03:39 -0800
 From: Shawn Blaylock [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] $PHP_SELF truncated to 17 chars
 
 I'm having a problem with $PHP_SELF being cut down to 17 characters, for
 instance 
 
 /Scripts/php/phpscript.php?value=123
 would be cut down to
 /Scripts/php/phps
 
 There was a bug opened up on bugs.php.net, id number 5380, but I can't
 find a solution in the comments listed there. I was wondering if anyone
 knew how to solve this problem?
 
 I'm using the Zeus web server and PHP is set up as an ISAPI module.
 Thanks!
 
 -- 
 
 Shawn Blaylock, ClipperNet Software Engineer
 [EMAIL PROTECTED]
 http://www.clipper.net/
 Eugene OR  541-431-3360 x406
 Toll Free  866-673-6260 x406
 
 -- 
 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] $PHP_SELF truncated to 17 chars

2001-01-18 Thread jeremy brand

Then it is something else, not those variables themselves.  Do you
have a configuration issue?  Are you running on Windows; do you need
to reboot?

check phpinfo(); and see if all your variables are truncated.

Just a few thought.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Thu, 18 Jan 2001, Shawn Blaylock wrote:

 Date: Thu, 18 Jan 2001 15:19:37 -0800
 From: Shawn Blaylock [EMAIL PROTECTED]
 To: jeremy brand [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] $PHP_SELF truncated to 17 chars
 
 Unfortunately, it's hacking off the last few characters in SCRIPT_NAME,
 too. 
 
 --Shawn
 
 jeremy brand wrote:
  
  I'm not aware of this bug, but temporarily you might consider using
  the $SCRIPT_NAME variable.  The same values is stored in it AFAIK.
  
  Jeremy
  
  Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
  http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 http://www.JEEP-FOR-SALE.com/ -- I need a buyer
Get your own Free, Private email at http://www.smackdown.com/
  
  On Thu, 18 Jan 2001, Shawn Blaylock wrote:
  
   Date: Thu, 18 Jan 2001 15:03:39 -0800
   From: Shawn Blaylock [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: [PHP] $PHP_SELF truncated to 17 chars
  
   I'm having a problem with $PHP_SELF being cut down to 17 characters, for
   instance
  
   /Scripts/php/phpscript.php?value=123
   would be cut down to
   /Scripts/php/phps
  
   There was a bug opened up on bugs.php.net, id number 5380, but I can't
   find a solution in the comments listed there. I was wondering if anyone
   knew how to solve this problem?
  
   I'm using the Zeus web server and PHP is set up as an ISAPI module.
   Thanks!
  
   --
  
   Shawn Blaylock, ClipperNet Software Engineer
   [EMAIL PROTECTED]
   http://www.clipper.net/
   Eugene OR  541-431-3360 x406
   Toll Free  866-673-6260 x406
  
   --
   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]
  
  
 
 -- 
 
 Shawn Blaylock, ClipperNet Software Engineer
 [EMAIL PROTECTED]
 http://www.clipper.net/
 Eugene OR  541-431-3360 x406
 Toll Free  866-673-6260 x406
 


-- 
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] date problem: some months have 5 weeks... how I discoverwhich ones?

2001-01-18 Thread jeremy brand

All months have more than 4 weeks except February (but only when it is
not a leap year).

I'm probably not understanding what exactly you are trying to do.

By your definition then, wouldn't this month only have 3 weeks?  
January 2001
Su Mo Tu We Th Fr Sa 
1  2  3  4  5  6
 7  8  9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

Yet there are 10 unaccounted days which is 1 and 3/7 more weeks.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Thu, 18 Jan 2001, Romulo Roberto Pereira wrote:

 Date: Thu, 18 Jan 2001 19:07:31 -0500
 From: Romulo Roberto Pereira [EMAIL PROTECTED]
 To: php-general [EMAIL PROTECTED]
 Subject: [PHP] date problem: some months have 5 weeks... how I discover which
ones?
 
 Hey!
 
 A little bit of definition:
 
 - a week start on sunday and ends on saturday;
 
 - a year has 365/7 ~= 52 weeks;
 
 How do I discover what months have 5 weeks and what have 4?
 
 Rom
 


-- 
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] date problem: some months have 5 weeks... how I discoverwhichones?

2001-01-18 Thread jeremy brand

 For a newspaper, a week start on sunday and ends in a saturday.
 
 Media planners divide ads in newspapers by monhs and than by weeks,
 respectively.

Well, this _seems_ contradictory to your original "definition", but I
got it.

 so let's say:
 
 january 2001 started in a monday
 
 Su Mo Tu We Th Fr Sa
 123   4   5   6  - 1st week
 7   89  10 11 12 13  - 2nd week
 14  15  16  17 18 19 20  - 3rd week
 21  22  23  24 25 26 27  - 4th week
  28  29  30  31 - 5th week

Well, get the timestamp of the first of the month:
$ts = mktime(0,0,0,1,1,2001);

then add 7 days worth of secnds to it until the month is no longer
January:

while ((int)date('m',$ts) == 1)
{
  //do stuff for this week

  $ts += (60*60*24*7);
}


 So january is a month that has 5 weeks for a newspaper, because if I would
 put an ad on a tuesday, january has 5 tuesdays.. got it?
 
 How do I do to calculate that?

I hope this help.  It should give you the general idea.  I don't
have time to write your whole application.  ;-)  Hopefully I gave you
enough to get you going in the right direction.  

Ultimately you are going to need to cutomize this for what you exactly
want to do.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/


-- 
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] RE: Ethics question...

2001-01-18 Thread jeremy brand

 Apache doesn't have threading (yet).
 If your business depends upon it, you may want to take a look at
 Solaris/Zeus if you are really getting heavy load high traffic.

We serve millions of hits a day off of a small farm of FreeBSD servers
running Apache+php for our dynamic content.  Thttpd for our static
pages (images, etc).

Our farm used to be linux, but FreeBSD has been better. Linux 2.2
would flake out under extreme load and not recover.  FreeBSD gets
stressed under extreme load as well, but it recovers.  If you know
redhat better and can't use Freebsd, that is fine.  It might save
_you_ more time to use redhat as the savings in administration could
easlily be overturned if you don't know freebsd better than redhat.
Don't get me wrong, on a personal note, I love linux (the most, I
might add).

I think the single most importand piece of software that saves us the
most money is thttpd.  That all runs in a single thread and uses
select to pump out content.  Since it is a single thread, it never
chews up tons of memory forking children.  I think our farm would need
to be twice as big if we tried to use apache for our static content.
I have nothing bad to say about apache, don't get me wrong.  This is
simply the way that works best for us. Our DB lives on a separate quad
sparc and all of our content is centralized and remotely NFS mounted.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/


-- 
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] RE: Ethics question...

2001-01-18 Thread jeremy brand

 I can't really do that since I have never tried it.

I plan on testing it under extreme load eventually.  If I do before
someone else does, I'll post my results.  But for the mean time, our
set up is working perfectly, so it may be a while.

I'm a big thttpd advocate, so I'd (for no better reason) love to run
thttpd+php instead of apache if it could provide = service under
pressure.  It most likely already does.  I know thttpd by itself is
the absolute best I have tested for high performance static content.
It kicks apache up and down the block on this regard.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/


-- 
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] Ethics question...

2001-01-17 Thread jeremy brand

 Soo true.
 
 But why would Microsoft be using PHP? =D

Why would Microsoft be using Solaris, or Linux even?  (hint, the same
reason -- their stuff works less good).

:)

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer


-- 
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] mail() question

2001-01-15 Thread jeremy brand

Your Return-Path: header should have that email address.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Mon, 15 Jan 2001, Robert Hough wrote:

 Date: Mon, 15 Jan 2001 15:13:42 -0500 (EST)
 From: Robert Hough [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] mail() question
 
 Sorry in advance for being redundant. I was unable to find the answer I
 needed, on the php.net site.
 
 We have a mailto form, which uses the mail() funciton. For the most part,
 it works as intended. All of my headers seem to be coming through intact
 (To, From, Reply-To, Return-Path, Error-To, etc).
 
 However, if the message should bounce, it always bounces back to nobody. 
 When we want it to bounce back to say, rch instead. Can any offer a
 possible solution here?
 
 TIA
 
 -- 
 Robert Hough ([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]




Re: [PHP] mail() question

2001-01-15 Thread jeremy brand

I understand.  So, does $sender_address have the email address that
you want it returned to?  You didn't specifically say this, that is
why I asked.

If you actually get the mail sent on the internet, and the headers
contain explicit instructions, then the mail has no choice but to
return to who you specify in the Return-Path:.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Mon, 15 Jan 2001, Robert Hough wrote:

 Date: Mon, 15 Jan 2001 15:27:06 -0500 (EST)
 From: Robert Hough [EMAIL PROTECTED]
 To: jeremy brand [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] mail() question
 
 On Mon, 15 Jan 2001, jeremy brand wrote:
  Your Return-Path: header should have that email address.
 
 Thanks, but as stated in my post, all of my headers
 Return-Path included, are coming through correctly. Here is what I am
 using for my headers, is there something missing here?
 
   $headers .= "From: $sender_name $sender_address\n";
   $headers .= "X-Sender: $sender_address\n";
   $headers .= "X-Mailer: $version\n";
   $headers .= "Return-Path: $sender_address\n";
   $headers .= "Error-To: $sender_address\n";
 
 
 -- 
 Robert Hough ([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]




Re: [PHP] mail() question

2001-01-15 Thread jeremy brand

Well, I don't know exactly what you mean by a bounce.  But, an
undelivered email will return to the Return-Path address.  

Why don't you forward the actuall email headers to the list and I can
look at them.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Mon, 15 Jan 2001, Robert Hough wrote:

 Date: Mon, 15 Jan 2001 15:53:01 -0500 (EST)
 From: Robert Hough [EMAIL PROTECTED]
 To: jeremy brand [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] mail() question
 
 On Mon, 15 Jan 2001, jeremy brand wrote:
  So, does $sender_address have the email address that you want it
  returned to?  You didn't specifically say this, that is why I asked.
 
 Sorry, yes it does. The message, if delivered properly, is fine. The
 receiver can hit "Reply" and that works as intended. The From field also
 displays correctly.
 
 The problem happens when the message bounces. For whatever reason, if the
 message bounces, it returns to nobody. Which, of course is what the web
 server is running as.
 
 -- 
 Robert Hough ([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]




Re: [PHP] BC Math

2001-01-15 Thread jeremy brand

They do just what they say.
see:
http://php.net/bc

One drawback is that PHP can't natively handle these big numbers, so
the return values from these functions are of type string.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Mon, 15 Jan 2001, Nathan Cook wrote:

 Date: Mon, 15 Jan 2001 14:19:55 -0700
 From: Nathan Cook [EMAIL PROTECTED]
 To: Php List [EMAIL PROTECTED]
 Subject: [PHP] BC Math
 
 BC Math, Arbitrary Precision Numbers?
 
 Can someone shed some light on these functions for me?
 Thanks.
 ---
 .:: Nathan Cook- Network/Security Admin
 office:  208.343.3110   - Web Programmer
 email:   [EMAIL PROTECTED] - Qmail Admin
 pager:  208.387.9983   - MIS Admin
 ---
 
 
 -- 
 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] Array...

2001-01-15 Thread jeremy brand

for ($i=100; $i0; $i++)
  print "OPTION VALUE=\\\"$i\\\"/OPTION\n";

But, I presume you would rather do this:
for ($i=100; $i0; $i++)
  print "OPTION VALUE=\"$i\"/OPTION\n";

because I can't imagine why you would want to escape double quotes in
HTML.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Mon, 15 Jan 2001, WreckRman2 wrote:

 Date: Mon, 15 Jan 2001 16:48:21 -0500
 From: WreckRman2 [EMAIL PROTECTED]
 To: "'Php-General@Lists. Php. Net'" [EMAIL PROTECTED]
 Subject: [PHP] Array...
 
 
 How can I do an array like below 100-1?
 
 OPTION VALUE=\"100\"/OPTION
 OPTION VALUE=\"99\"/OPTION
 OPTION VALUE=\"98\"/OPTION
 OPTION VALUE=\"97\"/OPTION
 
 to
 
 OPTION VALUE=\"3\"/OPTION
 OPTION VALUE=\"2\"/OPTION
 OPTION VALUE=\"1\"/OPTION
 
   WreckRman2
   Combat Flight Center
   http://www.combatfs.com
 
 -- 
 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] checkboxes into MySQL

2001-01-15 Thread jeremy brand

What I see is that the below is not an array of checkboxes (that would
be input type="checkbox" ..., not option ...).  Option ... are
part of a select

But, to make a checkbox be checked, you simply do this:
input type="checkbox" ... checked

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Mon, 15 Jan 2001, Jerry Lake wrote:

 Date: Mon, 15 Jan 2001 14:03:00 -0800
 From: Jerry Lake [EMAIL PROTECTED]
 To: "'Php-General@Lists. Php. Net'" [EMAIL PROTECTED]
 Subject: [PHP] checkboxes into MySQL
 
 I know this has been discussed,
 but it messing with me.
 
 in a script I'm working on
 I pull out an array of checkboxes
 from a database,
 
 how do I store what people select
 back to the DB
 
 all I end up with is the last selection
 of the array.
 
 Jerry Lake 
 
 -Original Message-
 From: jeremy brand [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 15, 2001 1:57 PM
 To: WreckRman2
 Cc: 'Php-General@Lists. Php. Net'
 Subject: Re: [PHP] Array...
 
 
 for ($i=100; $i0; $i++)
   print "OPTION VALUE=\\\"$i\\\"/OPTION\n";
 
 But, I presume you would rather do this:
 for ($i=100; $i0; $i++)
   print "OPTION VALUE=\"$i\"/OPTION\n";
 
 because I can't imagine why you would want to escape double quotes in
 HTML.
 
 Jeremy
 
 Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
 http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
 Get your own Free, Private email at http://www.smackdown.com/
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com
 
 On Mon, 15 Jan 2001, WreckRman2 wrote:
 
  Date: Mon, 15 Jan 2001 16:48:21 -0500
  From: WreckRman2 [EMAIL PROTECTED]
  To: "'Php-General@Lists. Php. Net'" [EMAIL PROTECTED]
  Subject: [PHP] Array...
  
  
  How can I do an array like below 100-1?
  
  OPTION VALUE=\"100\"/OPTION
  OPTION VALUE=\"99\"/OPTION
  OPTION VALUE=\"98\"/OPTION
  OPTION VALUE=\"97\"/OPTION
  
  to
  
  OPTION VALUE=\"3\"/OPTION
  OPTION VALUE=\"2\"/OPTION
  OPTION VALUE=\"1\"/OPTION
  
  WreckRman2
  Combat Flight Center
  http://www.combatfs.com
  
  -- 
  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]




Re: [PHP] checkboxes into MySQL(trying again)

2001-01-15 Thread jeremy brand

Hi Jerry,

Feel free (as in GPL) to use my libHtmlForm functions.  This should
solve your problem.

http://www.nirvani.net/software/libHtmlForm/

See: html_input_checkbox() specifically.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Mon, 15 Jan 2001, Jerry Lake wrote:

 Date: Mon, 15 Jan 2001 14:11:18 -0800
 From: Jerry Lake [EMAIL PROTECTED]
 To: "'Php-General@Lists. Php. Net'" [EMAIL PROTECTED]
 Subject: [PHP] checkboxes into MySQL(trying again)
 
 sorry about that,
 I forgot to erase the old post
 info
 
 here is a chunk of the code I am using
 snip
 //inclusion of pizza toppings from DB
 $query = ("SELECT * FROM toppings");
 $result2 = mysql_db_query($DBName, $query) or
 die("Error in MySQL query");
 
 echo "table border='1' cellpadding='2' cellspacing='2'";
 echo "tr bgcolor=" . $colors[ $i ++ % count( $colors ) ] . "";
 
 $colors = array( '#e4e4e4', '#ff' );
  
 $i = 0;
 
 while($myrow =  mysql_fetch_array($result2)) {
   $counter++;
   if ($counter  "4") {
  $counter = "1";
   echo "/trtr bgcolor=" . $colors[ $i ++ % count( $colors ) ] . "";
   }
 $name = $myrow["name"];
 $personal_cost = $myrow["personal_cost"];
 $small_cost = $myrow["small_cost"];
 $medium_cost = $myrow["medium_cost"];
 $large_cost = $myrow["large_cost"];
 $category = $myrow["category"];
 /snip
 
 snip
 echo "td valign=top align=left\r\n";
 echo "input type=checkbox name=".$name." value=".$cost."".$name."/td";
 echo "/td\r\n";
 }
 if ($counter  3) {
 while ($counter  3) {
   echo "tdnbsp;/td";
   $counter++;
 }
 }
 echo "/tr";
 
 echo "/table";
 // memory flush
 mysql_free_result($result2);
 //end topping section
 /snip
 
 Jerry Lake- [EMAIL PROTECTED]
 Web Designer
 Europa Communications - http://www.europa.com
 Pacifier Online   - http://www.pacifier.com
 
 
 
 -- 
 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] Running a php script at a giveb time

2001-01-15 Thread jeremy brand

Sure.  I would use cron.  see crontab(5).  You could also use any
other type of scheduling software.

In case you didn't know, you can run PHP scripts without a web server.
Simply compile php without apache.  Then you can run your script like
this:
/usr/bin/php your_script.php
(if you install the php binary in /usr/bin)

Hope this helps.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer

On Tue, 16 Jan 2001, Shimon Dekel wrote:

 Date: Tue, 16 Jan 2001 09:16:36 +0200
 From: Shimon Dekel [EMAIL PROTECTED]
 To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED]
 Subject: [PHP] Running a php script at a giveb time
 
 Hi,
 I need to run a PHP script or a PHP page, few times every morning, say
 10 times between 7am and 8am every morning to see if a cretin database
 condition is met.
 Is it possible?
 
 
 
 ==
 Shimon Dekel  Israeli Vegetable Board
 Information System Manager
 2 Karlibach St Tel-Aviv 67132
  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 http://www.yerek.co.il www.yerek.co.il
 ==
 
 -- 
 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] load balancing with php/apache?

2001-01-14 Thread jeremy brand

Like I said, we use our own.  It is home grown, but not opensource --
sorry, if it was my choice it would be ;)

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Sun, 14 Jan 2001, [EMAIL PROTECTED] wrote:

 Date: Sun, 14 Jan 2001 09:49:03 +0530 (IST)
 From: "[EMAIL PROTECTED]" [EMAIL PROTECTED]
 To: jeremy brand [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] load balancing with php/apache?
 
 On Sat, 13 Jan 2001, jeremy brand wrote:
 
  Oh, BTW, we don't use PHP sessions, we use our own.  
 That has got me hooked - what do you use?
 do you mean you dont use 
 1) PHP4 sessions 
 OR
 2) don't use PHP for session handling at all?
 
 Tarique
 
 -- 
 =
B2B Application Providers
 http://www.sanisoft.com
  Vortal for Nagpur http://nagpurcity.net
 =
 
 


-- 
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] load balancing with php/apache?

2001-01-14 Thread jeremy brand

unfortunately not because it is not opensource.  I did want to make it
clear that sessions is a gereric word.  Thus, when it is said, it
shouldn't be mis-understood as to be PHP Sessions, which obviously is
not a generic word.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Sun, 14 Jan 2001, Cal Evans wrote:

 Date: Sun, 14 Jan 2001 08:26:46 -0600
 From: Cal Evans [EMAIL PROTECTED]
 To: [EMAIL PROTECTED], jeremy brand [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] load balancing with php/apache?
 
 I agree. You've piqued my curiosity.  Can you go into details?
 
 Cal
 http://.calevans.com
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, January 13, 2001 10:19 PM
 To: jeremy brand
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] load balancing with php/apache?
 
 
 On Sat, 13 Jan 2001, jeremy brand wrote:
 
  Oh, BTW, we don't use PHP sessions, we use our own.  
 That has got me hooked - what do you use?
 do you mean you dont use 
 1) PHP4 sessions 
 OR
 2) don't use PHP for session handling at all?
 
 Tarique
 
 -- 
 =
B2B Application Providers
 http://www.sanisoft.com
  Vortal for Nagpur http://nagpurcity.net
 =
 
 
 -- 
 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] load balancing with php/apache?

2001-01-13 Thread jeremy brand

We have a centralized DB server.  Sessions are handled by us, the
programmers, not the cluster.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Sat, 13 Jan 2001, Cal Evans wrote:

 Date: Sat, 13 Jan 2001 11:51:01 -0600
 From: Cal Evans [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] load balancing with php/apache?
 
 How does it deal with sessions? Or do use store sessions in the database?
 
 Cal
 
 -Original Message-
 From: Joe Stump [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, January 13, 2001 11:22 AM
 To: Rasmus Lerdorf
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] load balancing with php/apache?
 
 
  http://www.linuxvirtualserver.org/
 
 We use LVS on our website - it works great! We have 2 load balancers with
 the
 HA package and 6 PHP webservers running behind it (with a central DB
 server).
 
 In short, it's possible and works quite well. BTW We user FreeBSD for
 webservers
 if that's any help (though linux, NT, solaris, etc would all work)
 
 --Joe
 
 
 
 
  http://linas.org/linux/load.html
 
  -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]
 
 --
 
 Joe Stump, PHP Hacker
 [EMAIL PROTECTED]
 http://www.miester.org/
 
 
 --
 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]




RE: [PHP] load balancing with php/apache?

2001-01-13 Thread jeremy brand

we store the sessions in the DB.

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Sat, 13 Jan 2001, Cal Evans wrote:

 Date: Sat, 13 Jan 2001 14:43:19 -0600
 From: Cal Evans [EMAIL PROTECTED]
 To: jeremy brand [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] load balancing with php/apache?
 
 When you say "handled by us" do you mean you:
 
 1) Write the sess_* files to a shared drive
 2) Store them in the database
 3) ignore them totally, who needs users anyhow?
 4) some other option?
 
 Cal
 http://www.calevans.com
 
 
 -Original Message-
 From: jeremy brand [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, January 13, 2001 2:20 PM
 To: Cal Evans
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] load balancing with php/apache?
 
 
 We have a centralized DB server.  Sessions are handled by us, the
 programmers, not the cluster.
 
 Jeremy
 
 Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
 http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
 Get your own Free, Private email at http://www.smackdown.com/
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com
 
 On Sat, 13 Jan 2001, Cal Evans wrote:
 
  Date: Sat, 13 Jan 2001 11:51:01 -0600
  From: Cal Evans [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: RE: [PHP] load balancing with php/apache?
 
  How does it deal with sessions? Or do use store sessions in the database?
 
  Cal
 
  -Original Message-
  From: Joe Stump [mailto:[EMAIL PROTECTED]]
  Sent: Saturday, January 13, 2001 11:22 AM
  To: Rasmus Lerdorf
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] load balancing with php/apache?
 
 
   http://www.linuxvirtualserver.org/
 
  We use LVS on our website - it works great! We have 2 load balancers with
  the
  HA package and 6 PHP webservers running behind it (with a central DB
  server).
 
  In short, it's possible and works quite well. BTW We user FreeBSD for
  webservers
  if that's any help (though linux, NT, solaris, etc would all work)
 
  --Joe
 
 
 
 
   http://linas.org/linux/load.html
  
   -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]
 
  --
 
  Joe Stump, PHP Hacker
  [EMAIL PROTECTED]
  http://www.miester.org/
 
 
  --
  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]
 
 


-- 
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] load balancing with php/apache?

2001-01-13 Thread jeremy brand

Oh, BTW, we don't use PHP sessions, we use our own.  

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Sat, 13 Jan 2001, jeremy brand wrote:

 Date: Sat, 13 Jan 2001 13:44:18 -0800 (PST)
 From: jeremy brand [EMAIL PROTECTED]
 To: Cal Evans [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] load balancing with php/apache?
 
 we store the sessions in the DB.
 
 Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
 http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
 Get your own Free, Private email at http://www.smackdown.com/
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com
 
 On Sat, 13 Jan 2001, Cal Evans wrote:
 
  Date: Sat, 13 Jan 2001 14:43:19 -0600
  From: Cal Evans [EMAIL PROTECTED]
  To: jeremy brand [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] load balancing with php/apache?
  
  When you say "handled by us" do you mean you:
  
  1) Write the sess_* files to a shared drive
  2) Store them in the database
  3) ignore them totally, who needs users anyhow?
  4) some other option?
  
  Cal
  http://www.calevans.com
  
  
  -Original Message-
  From: jeremy brand [mailto:[EMAIL PROTECTED]]
  Sent: Saturday, January 13, 2001 2:20 PM
  To: Cal Evans
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] load balancing with php/apache?
  
  
  We have a centralized DB server.  Sessions are handled by us, the
  programmers, not the cluster.
  
  Jeremy
  
  Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
  http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
  Get your own Free, Private email at http://www.smackdown.com/
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com
  
  On Sat, 13 Jan 2001, Cal Evans wrote:
  
   Date: Sat, 13 Jan 2001 11:51:01 -0600
   From: Cal Evans [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: RE: [PHP] load balancing with php/apache?
  
   How does it deal with sessions? Or do use store sessions in the database?
  
   Cal
  
   -Original Message-
   From: Joe Stump [mailto:[EMAIL PROTECTED]]
   Sent: Saturday, January 13, 2001 11:22 AM
   To: Rasmus Lerdorf
   Cc: [EMAIL PROTECTED]
   Subject: Re: [PHP] load balancing with php/apache?
  
  
http://www.linuxvirtualserver.org/
  
   We use LVS on our website - it works great! We have 2 load balancers with
   the
   HA package and 6 PHP webservers running behind it (with a central DB
   server).
  
   In short, it's possible and works quite well. BTW We user FreeBSD for
   webservers
   if that's any help (though linux, NT, solaris, etc would all work)
  
   --Joe
  
  
  
  
http://linas.org/linux/load.html
   
-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]
  
   --
  
   Joe Stump, PHP Hacker
   [EMAIL PROTECTED]
   http://www.miester.org/
  
  
   --
   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]
  
  
 
 
 -- 
 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] problem using flock()

2001-01-13 Thread jeremy brand

Hello 10,000 Screaming Monkeys,
(Sorry, I couldn't resist!)

You should test the return value of flock(), not just run it.  It is
designed to tell you whether or not something is safe to do, and since
you are not testing the result, you are simply ignoring what it is
trying to tell you.

I have a small script that uses flock():
http://www.nirvani.net/software/dr-fun/

As you can see, I am testing the result, and taking an action (in this
case, sleeping, then trying again).

Hope this helps.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Sat, 13 Jan 2001, 10,000 Screaming Monkeys wrote:

 Date: Sat, 13 Jan 2001 17:54:31 -0600
 From: "10,000 Screaming Monkeys" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] problem using flock()
 
 Hi,
 
 I'm having a problem with one of the PHP scripts I've written and I'm
 hoping someone can point me in the right direction.  The portion of
 the script that is giving me trouble is the locking of, and writing to,
 a logfile (plain text).  I'm using flock() as I understand it and have
 looked at the online manual page for it to no avail...
 
 What's happening is, under "high" traffic conditions on the website I
 wrote the script for, the logfile is occasionally getting clobbered. I
 tried one of the suggestions on the man page (the one by
 [EMAIL PROTECTED]), but it resulted in the logfile being appended to,
 rather than properly updated as I want.  (better than being clobbered,
 but rather confusing to cleanup after later...)
 
 Here is an example snippit of the script.  Can anyone tell me what I
 might be doing wrong, or suggest a better/more efficient way to write
 this?
 
 BEGIN CODE SNIP
 if (@fopen($dlfile, "r")) {
 
$log_entries = file($download_log);
$total = count($log_entries);
$dl_time = time();
 
for ($i=0; $total$i; $i++) {
   $split = explode("||", $log_entries[$i]);
 
   if ($stats_url == $split[1]) {
  // If the file being downloaded is already in the logfile,
  // increment the download count and update the $dl_time
 
  $fp = fopen($download_log, "r");
  flock($fp,1);
  $x = fread($fp, filesize($download_log));
  fclose($fp);
 
  $fp = fopen($download_log, "w");
  flock($fp,2);
 
  // Increment download counter
  $add = $split[0]+1;
 
  // Do the actual update of the download count  latest dl time
  $x = str_replace("$split[0]||$split[1]||$split[2]||$split[3]||$split[4]||", 
"$add||$split[1]||$split[2]||$dl_time||$split[4]||", $x);
 
  fwrite($fp, $x); 
 
  fclose($fp);
  $write = 1;
   }
 
}
if ($write != 1) {
 
   // The file being downloaded is not in the logfile --
   // add it now and start its counter at 1
 
   $fp = fopen($download_log, "a");
   flock($fp,2);
   $fw = fwrite($fp, 
"1||$stats_url||$dl_time||$dl_time||dir2=$dir2file=$urlfile||\n");
   fclose($fp);
 
}
 }
 END CODE SNIP
 
 Thanks...I'm desperate...
 
 - Jamie
 
 --
 The sweetest cherry in an apple pie
 [EMAIL PROTECTED]  (Single purpose Email address)
 
 -- 
 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] looking for a PHP editor

2001-01-10 Thread jeremy brand

 Now only if a php-tidy existed ...

Agreed.  I've often thought about hacking 'indent' to recognice PHP
syntax, but I never get around to it.  Does anyone know if someone has
done this already?

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "body"   -- Quoted from Yahoo! homepage, http://www.yahoo.com


-- 
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]