[PHP] FTP functions
I am trying to get a directory listing over ftp with the ftp_nlist() function. The problem is that the directory name has spaces in it and it looks like ftp_nlist() chops the string at each space and performs a separate listing for each word, which fails. I have tried quoting, urlencoding and rawurlencoding the string but nothing works. However, ftp_chdir() works when given the directory name with spaces. Is this a bug in ftp_nlist() or is it an undocumented feature? -- 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
> 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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]
Re: [PHP] variables not being passes between php pages
This is true, but not complete. You can also do > Well if you aren't posting to your add.php page (ie method="post" > action="add.php") then you need to pass them via the add.php?var=foo&varb=bar > method. > > --Joe > > > On Wed, Jan 10, 2001 at 12:02:54PM -0800, jeff fitzmyers wrote: > > I am working on the nice tutorial at > > http://designmagick.50megs.com/postgresql-tutorial/ > > > > I have my test.php and add.php pages created and just > > can't seem to pass variables to the add.php page > > -- not even simple things like $user! > > > > phpinfo() shows HTTP_POST_VARS["firstname"] = Jeff so > > php knows about the vaariables but > > doesn't seem to tell the new page. > > > > What am I doing wrong?? > > > > __ > > Do You Yahoo!? > > Yahoo! Photos - Share your holiday photos online! > > http://photos.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] > > --- > Joe Stump > PHP Programmer > www.Care2.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] constants inside of a string
> define(MAX,2); > print "the max is MAX"; > > this obv does not work print "the max is " . MAX; -- 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] constants inside of a string
No. 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Wed, 10 Jan 2001, jeff saenz wrote: > Date: Wed, 10 Jan 2001 12:21:01 -0800 > From: jeff saenz <[EMAIL PROTECTED]> > To: Joe Stump <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] constants inside of a string > > what about inside of a here doc > > print << this is the MAX > HERE > > Joe Stump wrote: > > > print "the max is ".MAX; > > > > --Joe > > > > On Wed, Jan 10, 2001 at 12:12:08PM -0800, jeff saenz wrote: > > > how do you use defines inside of a string... > > > > > > e.g. > > > > > > define(MAX,2); > > > print "the max is MAX"; > > > > > > this obv does not work > > > > > > jeff > > > > > > > > > -- > > > 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 Programmer > > www.Care2.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] pause
You could use custom HTML meta content refresh tags. This is not a PHP think, but an HTML thing. 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Wed, 10 Jan 2001, Robert Ludvik wrote: > Date: Wed, 10 Jan 2001 21:18:38 +0100 > From: Robert Ludvik <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [PHP] pause > > hi > i know i've noticed somewhere something about how to implement a Pause in PHP - > I mean, if ie.a user inputs a wrong number, the script says "Oh no, it's > wrong", waits a few seconds and redirects her back to input form. i know i could > say to him "hit a Back button...", just wondering if something lika Pause > exists. i've searched php.net and zend.com but found nothing useful. > thanks > Bobe > > -- > 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] pause
Funny, I would say forget javascript; I don't trust client side validation. :) Just my two cents. 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- Quoted from Yahoo! homepage, http://www.yahoo.com > don't forget javascript! > > you could validate the form before posting to php. > > DanO > > > -----Original Message- > From: jeremy brand [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 10, 2001 1:18 PM > To: Robert Ludvik > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] pause > > > You could use custom HTML meta content refresh tags. This is not a > PHP think, but an HTML thing. > > 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/ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >"" -- Quoted from Yahoo! homepage, http://www.yahoo.com > > On Wed, 10 Jan 2001, Robert Ludvik wrote: > > > Date: Wed, 10 Jan 2001 21:18:38 +0100 > > From: Robert Ludvik <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > Subject: [PHP] pause > > > > hi > > i know i've noticed somewhere something about how to implement a Pause in > PHP - > > I mean, if ie.a user inputs a wrong number, the script says "Oh no, it's > > wrong", waits a few seconds and redirects her back to input form. i know i > could > > say to him "hit a Back button...", just wondering if something lika Pause > > exists. i've searched php.net and zend.com but found nothing useful. > > thanks > > Bobe > > > > -- > > 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] php binary?
> > I would like to have a serer with static pages and recreate them using xml/html >every time there is a change... /. :) Yes, just compile PHP4 into your cgi binary. If you have php 3 on your system, name the binary php4 (for no better reason that so you don't over write your php 3 binary). You would just run it like this: /usr/local/bin/php4 -q your_script.php > your_output_file.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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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]
Re: [PHP] PHP3 vs PHP4?
PHP3's strenghts: GPL'ed (or PHP3 license -- at your choice) PHP4's strengths: Faster (way faster) Garbage collection that works More functions -- bigger language Actively being developed These are just of the top of my head... 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Thu, 11 Jan 2001, ncook wrote: > Date: Thu, 11 Jan 2001 14:15:56 -0700 > From: ncook <[EMAIL PROTECTED]> > To: Php List <[EMAIL PROTECTED]> > Subject: [PHP] PHP3 vs PHP4? > > Which is better php3 or php4? Why? Are there pluses and minuses to each? > > Does php4 offer features that are useful for everyday web scripting? > > --- > .:: Nathan Cook > office: 208.343.3110 > email: [EMAIL PROTECTED] > pager: 208.387.9983 > --- > > > -- > 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?
> > 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). > > Yes, I have heard very good things about LVS. Haven't had a chance to set > it up myself yet. Definitely something for the TODO list. LVS with linux-ha is a win-win situation. Even if you loose a LVS, the failover is transparent. The connections hang for about 5-15 seconds, then transfer over to the other machine. With the traffic that we have, we opted to use direct routing, this way there is no translation (thus no additional CPU on the LVS machine) needed for the answers; the web servers talk directly back to the client themselves. We were planning on using Local Directors, then cost became a major issue. I'm actually glad we did it this way, because personally I like envesting my knowledge in open solutions rather than learning proprietary OSs and strategies. 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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]
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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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?
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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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/ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >"" -- 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?
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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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/ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >"" -- 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/ > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > >"" -- 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/) > > &
Re: [PHP] problem using flock()
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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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? > > > 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=$dir2&file=$urlfile||\n"); > fclose($fp); > >} > } > > > 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] load balancing with php/apache?
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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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?
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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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] mail() question
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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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
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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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
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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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] mail() question
I think that you answered your own question. I know that PHP sends Return-Path: headers, I do it all the time. But, I use qmail. All I can say is good luck with sendmail.cf (I hope you have enough system memory to open it in a text editor ) 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, Robert Hough wrote: > Date: Mon, 15 Jan 2001 16:08:18 -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: > > Why don't you forward the actuall email headers to the list and I can > > look at them. > > Well, after checking the headers myself, it doesn't look like sendmail is > accepting my return-path, or php isn't sending it. Headers below: > > > Received: (from nobody@localhost) > by trinity.solveinteractive.com (8.11.1/8.11.1) id f0FKhQQ84040; > Mon, 15 Jan 2001 15:43:26 -0500 (EST) > (envelope-from nobody) > Date: Mon, 15 Jan 2001 15:43:26 -0500 (EST) > Message-Id: <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Test message from PHP Test Mailer v1.1.1a > From: Robert Hough <[EMAIL PROTECTED]> > X-Sender: <[EMAIL PROTECTED]> > X-Mailer: PHP Test Mailer v1.1.1a > Error-To: <[EMAIL PROTECTED]> > Content-Type: text > X-UIDL: 21fbef1b63923735e759e4f52ab267bd > Status: RO > X-Status: > X-Keywords: > X-UID: 6 > > -- > 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
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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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...
for ($i=100; $i>0; $i++) print "\n"; But, I presume you would rather do this: for ($i=100; $i>0; $i++) print "\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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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? > > > > > > > to > > > > > > 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
What I see is that the below is not an array of checkboxes (that would be , not ). ... are part of a But, to make a checkbox be checked, you simply do this: 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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; $i>0; $i++) > print "\n"; > > But, I presume you would rather do this: > for ($i=100; $i>0; $i++) > print "\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/ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >"" -- 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? > > > > > > > > > > > > > > to > > > > > > > > > > > > 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] Array...
*laughs* Yes. :) It is only 2:07 PM.. forgive me. 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, Johannes Janson wrote: > Date: Mon, 15 Jan 2001 23:08:33 +0100 > From: Johannes Janson <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Array... > > > for ($i=100; $i>0; $i++) > > shouldn't it be $i--? this loop would run forever... > > > print "\n"; > > > > But, I presume you would rather do this: > > for ($i=100; $i>0; $i++) > > print "\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/ > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > >"" -- 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? > > > > > > > > > > > > > > > > > > > > > to > > > > > > > > > > > > > > > > > > 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)
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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "" -- 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 > > //inclusion of pizza toppings from DB > $query = ("SELECT * FROM toppings"); > $result2 = mysql_db_query($DBName, $query) or > die("Error in MySQL query"); > > echo ""; > echo ""; > > $colors = array( '#e4e4e4', '#ff' ); > > $i = 0; > > while($myrow = mysql_fetch_array($result2)) { > $counter++; > if ($counter > "4") { > $counter = "1"; > echo ""; > } > $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"]; > > > > echo "\r\n"; > echo "".$name.""; > echo "\r\n"; > } > if ($counter < 3) { > while ($counter < 3) { > echo "Â "; > $counter++; > } > } > echo ""; > > echo ""; > // memory flush > mysql_free_result($result2); > //end topping section > > > 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
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] Ethics question...
> There are no restrictions on that. In fact the license on PHP is > explicitly not the GPL for this very purpose. How does the license of PHP have anything to do whith the code that Shane has written (unless he is distributing his software with PHP, much as like an embeded system)? This hits back to a point that I raised that never got much attention from this list. http://marc.theaimsgroup.com/?l=php-general&m=97803110406749&w=2 (emphasis on the last 4 paragraphs) Shane, you should license your code how you feel fit. However, since PHP isn't a compiled language (yet) you will have to find a license that fits your needs while keeping in mind that your code has no choice but to be opensource. I forsee (hope), eventually (as happened with C and Java) other companies and groups (other than php/zend) to have interperters and compilers for PHP as a language. I would love to see this happen. I would love for it to be legal to free distribute machine code that was originally written in a language of my choice (PHP) and not be bound to Zend's licensing agreement. C eventually became open. Even (to some extent) Java has become open because there are enough choices of virtual machines -- not just Sun's any more. I would love to see openness (other than in source -- but yet a restrictive license) in PHP. My main point that I'm trying to make is that PHP is wonderful language. It is an okay technology. I say okay because it is bound under a restrictive license completely controlled by a single party. I want to see the language grow and flourish and the interpreters be many and great. > As for restricting the demo. I would suggest restricting it via a > license. Any serious customer is not going to violate a license in order > to save a couple of hundred bucks. I agree. 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 -- 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...
> 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] Ethics question...
> > > Why would Microsoft be using Solaris, or Linux even? (hint, the same > > > reason -- their stuff works less good). Www.microsoft.com used to be served off of Solaris (where else could you run a high performance installation of Oracle? ;). Hotmail was (is) FreeBSD. Anyone would be stupid to not be using linux in their interprise somewhere. 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 -- 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
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...
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...
> 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] srtoring user selection on the database...
Yes you can. I hate to say it, but there isn't any one answer. You are going to need to keep track of the user (using most any form of sessions). Once you can track the user, then use that tracking code to store the data. You will have to decide how you want to store it in your DB. You could use serialized values (yuck!) or spend some time with your friend that has taken database class and come up with some rational, normalized tables to represent your data. Then store your data in these tables. Retrieve them, etc. Of course, if you don't need to store them more than past the next page, you could just print them out as elements. while(list($key, $val) = each($cb)) print '' . "\n"; 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 17:18:15 -0500 > From: Romulo Roberto Pereira <[EMAIL PROTECTED]> > To: php-general <[EMAIL PROTECTED]> > Subject: [PHP] srtoring user selection on the database... > > hello! > > I have a form and in this form I have 48 checkboxes. is there a way that my program >could remember which ones were selected? > > looks like this:: > > > > > > > > ... > > > > > > I would lke to remember which ones the user clicked on... > > Thank you! > > 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] How to participate from the digest?
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
Then you need to escape your double quotes: $myVal = ""; or use the single quote equivilant: $myVal = ''; or (PHP4 only) $myVal = << 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 = " > *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
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...
> 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
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
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?
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] (PHP+Linux+Apache+MySQL)+(Windows+Explorer)
you can also, very easily, dual boot. (you said same machine). I have had IE 5 working (for the most part) under wine in debian about 6 months ago. It would crash every now and again, and the widgets looked wierd, but it was useable. If I were you, it might make more sense to just spend the whpping cash on a 486 or pentium and use that as your linux server (apache+php+mysql) for development. That is probably still cheaper than VMware and it is always nice to have a server around that can just stay up chugging along. 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, Ignacio Vazquez-Abrams wrote: > Date: Thu, 18 Jan 2001 19:11:33 -0500 (EST) > From: Ignacio Vazquez-Abrams <[EMAIL PROTECTED]> > To: Andrés de la Varga <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] (PHP+Linux+Apache+MySQL)+(Windows+Explorer) > > On Thu, 18 Jan 2001, Andrés de la Varga wrote: > > > Can I have (PHP+Linux+Apache+MySQL)+(Windows+Explorer) in the same machine > > to develope stand alone? > > > > Andrés de la Varga > > > > http://www.vmware.com/ > > -- > Ignacio Vazquez-Abrams <[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] date problem: some months have 5 weeks... how I discoverwhichones?
> 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...
> 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...
> By the way, there is a PHP module for thttpd. Thank you. I know. I haven't had a chance to spend time testing it. Would anyone recommend it for mission critical environments? 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...
> 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] Downloads, headers and binary data
your script is probably timing out. Try doing: set_time_limit(0); at the top of your script. 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 Fri, 19 Jan 2001, Juan Germano wrote: > Date: Fri, 19 Jan 2001 05:38:48 -0300 > From: Juan Germano <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [PHP] Downloads, headers and binary data > > Hi. I'm trying to write a script to download a mp3 file. I did this: > > $filesize=filesize($filename); > header("Content-disposition: attachment;filename=".basename($filename)); > header("Content-type: application/octetstream"); > header("Content-Transfer-Encoding: binary"); > header("Pragma: no-cache"); > header("Expires: 0"); > header("Content-Length: $filesize"); > readfile($filename,$filesize); > > I began with the first two headers but the problem is that the script works > fine with > text files but I get shorter files than the originals with mp3s, so I added > the rest trying to solve the problem. > So I tryied > > $fp=fopen($filename,"r"); > fread($fp,filesize($filename)); > fclose($fp); > > and > > $fp=fopen($filename,"r"); > fpassthru($fp); > > None of above worked. > But I tryied using the php.exe and I got exactly what I want. > So, perhaps it is a problem with the headers. I tryied both Netscape and IE, > and also diferents content-type (audio/mpeg). > Anyone has ideas? > > Juan Germano > [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] Another Guru's Help Needed...
You are going to have to research the query string for each search engine that you intend to support, and then parse it out. for example: go to google. search for [jeremy brand], notice the REQUEST_URI: /search?q=jeremy+brand In google's case, since they always use q=, you can parse this out. You'll need to do this and write a module for each search engine (since they all will have their own behavior). Maybe someone has done this work, but you always have to keep curent because search engines are free to chenge their own code any time they want. 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 Fri, 19 Jan 2001, Dallas Kropka wrote: > Date: Fri, 19 Jan 2001 20:06:27 -0600 > From: Dallas Kropka <[EMAIL PROTECTED]> > To: Michael Kimsal <[EMAIL PROTECTED]> > Cc: PHP LIST <[EMAIL PROTECTED]> > Subject: RE: [PHP] Another Guru's Help Needed... > > Most likely but how do I strip it to determine the string of keywords? > > Note to list: I cant depend on site logs. > > -Original Message- > From: Michael Kimsal [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 19, 2001 7:33 PM > To: Dallas Kropka > Cc: PHP LIST > Subject: Re: [PHP] Another Guru's Help Needed... > > > Isn't this info in the HTTP_REFERER field normally? > > > Dallas Kropka wrote: > > > I need to grab the referring search engines keywords used in the search. I > > need to be able to determine what the keywords were, and what the engine > > was... (Lycos, AltaVista etc...). > > > > How can I do this, where can I find info on this, or is there something > that > > will do this already that I can integrate into my code? > > > -- > 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
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] how to escape
$string = ''; If you use single quotes, then you don't need to escape them. 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 Mon, 22 Jan 2001, Hrishi wrote: > Date: Mon, 22 Jan 2001 16:00:53 +0530 > From: Hrishi <[EMAIL PROTECTED]> > To: PHP General Discussion <[EMAIL PROTECTED]> > Subject: [PHP] how to escape > > Hello all, > > I'm working on a script that processes and returns a php script. > i need to know how to escape the in the string constants that > make up the script. > > thanks, > Hrishi > > > -- > 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] What "PHP" Stands For....
That is what I have heard as well, "Personal Home page". It has also been come to be known as "People hate perl". And of course the (AFAIK) official "PHP: Hypertext Preprocessor". 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, 23 Jan 2001, Brian White wrote: > Date: Tue, 23 Jan 2001 10:20:49 +1100 > From: Brian White <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [PHP] What "PHP" Stands For > > > From the preface of the manual: > > 'PHP, which stands for "PHP: Hypertext Preprocessor" ...' > > I frankly don't beleive that "PHP" started life as a recursively > defined acronym - I remember reading somewhere that it stood for > "Personal Home Page" which makes more sense to me. > > Anybody know the truth? > > Regs > > Brian White > - > Brian White > Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy > > http://www.steptwo.com.au/ > [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] What "PHP" Stands For....
> > It has also been come to be known as "People hate perl". > > Hey now. I'll deny to my grave I ever said that in public. ;) I never claimed you said it. ;) I will deny that I ever heard it from you. :) 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 does PHP accept multiple selection
Feel free (as in GPL) to use my libHtmlForm functions available here: http://www.nirvani.net/software/libHtmlForm/ 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 Tue, 23 Jan 2001, david klein wrote: > Date: Tue, 23 Jan 2001 21:48:52 - > From: david klein <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [PHP] How does PHP accept multiple selection > > Hello, > > I have some codes like: > >Page 1 >Page 2 >Page 3 > > > > If I selected item 1 and item 3 both, how can I get my multiple selection in > the PHP codes? (it seems to me it always give me the last selection only). > > Thank you very much in advance. > > Regards, > David > _ > 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
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] Help: Google like page functions
Basically, in your SQL, just use "LIMIT" Select * from foo where something = 'something_else' limit 0, 10; Select * from foo where something = 'something_else' limit 10, 10; Select * from foo where something = 'something_else' limit 20, 10; Select * from foo where something = 'something_else' limit 30, 10; Select * from foo where something = 'something_else' limit 40, 10; etc... 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, 23 Jan 2001, Shane McBride wrote: > Date: Tue, 23 Jan 2001 20:59:03 -0500 > From: Shane McBride <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Help: Google like page functions > > I found a great little snippet by accident that does the "Previous 123 Next" > links. If anyone is interested, here's the link to it: > > http://www.phpbuilder.net/snippet/detail.php?type=snippet&id=21 > > > - Original Message - > From: "Shane McBride" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, January 23, 2001 6:35 PM > Subject: [PHP] Help: Google like page functions > > > I thought this had been addressed earlier, but I could not find the thread. > > If I have a MySQL DB that has 50 records in it and I want to display 5 per > page. How do I do this. Also, 50 was just a nice round number, the number > will change constantly. > > All the search engines are doing this type of thing. I just can't seem to > figure out what I should search for. > > - Shane > > > > -- > 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] RE: Zend Store products questions
Hello Andrew, Thank you for contacting Zend and your interest in our products. Regarding your questions, the answers are: 1. YES. The Encoder Plugins are perpetual and have no time limitation. 2. You will receive all the prducts at nce, and you are entitled to all major S/W upgrades within this period. 3. If your H/W fails or need to be replaced, please contact Zend and we will provide you with a substitute license. Best regards, Adi J. Brand VP International Sales Zend Technologies Voice: +972 (0)3 613 9665, x.116 Cell: +972 (0)56 505 005 www.zend.com -- Visit the Zend Store at http://www.zend.com/store/ -Original Message- From: Andrew Sitnikov [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 12:57 AM To: [EMAIL PROTECTED] Subject: Zend Store products questions Hello , I have some questions about new products from Zend. 1. After the my "Commercial Subscription Plan" expire, will scripts coded with "Zend Encoder SE" working ? (if it work in users servers with "Zend Encoder SE Runtime plugins"). 2. If I shall choose payment 12 months, I shall receive products at once or in 12 months? 3. When I install the "Zend IDE", " Zend Encoder SE " ... On one The computer also I receive the licenses (FLEXlm) for it, when I will need to make upgrade hardware or change IP or move all software to other computer, I can receive The new license? Best regards, Andrew Sitnikov e-mail : [EMAIL PROTECTED] GSM: (+372) 56491109 -- 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] easy question.
if ($fname && $lname && $email) echo "test"; If by easier you mean typing less. ;) 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, Nathan Cook wrote: > Date: Wed, 24 Jan 2001 16:27:12 -0700 > From: Nathan Cook <[EMAIL PROTECTED]> > To: Php List <[EMAIL PROTECTED]> > Subject: [PHP] easy question. > > I have always wrote code this like: > > if(($fname) && ($lname) && ($email)) > { echo "test"; } > > Is there an easier way to write the IF line? > > Thank You > > .:: Nathan Cook [ [EMAIL PROTECTED] ] ::. > Systems & Network Administrator :: Programmer > [ phone - 208.343.3110 ][ pager - 208.387.9983 ] > > > -- > 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] I give - Whats wrong
I don't think you need the \=, just the = should 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/ On Wed, 24 Jan 2001, Karl J. Stubsjoen wrote: > Date: Wed, 24 Jan 2001 16:34:41 -0700 > From: Karl J. Stubsjoen <[EMAIL PROTECTED]> > To: PHP Mailing List <[EMAIL PROTECTED]> > Subject: [PHP] I give - Whats wrong > > I've tried and tried to figure out what is wrong with this function, but I > can't. Could you please have a look. This function reconstructs the > querystring values passed in the querystring: > > function PassOnGetVars() { > global $HTTP_GET_VARS; > #initialize retrn value > $retrn = "?"; > > #loop through each Get Var > reset ($HTTP_GET_VARS); > while (list($VariableName, $VariableValue) = each ($HTTP_GET_VARS)) > { > retrn =. "$VariableName\=$VariableValue"; > retrn =. "&"; > } > > #return the value > return($retrn); > } > > I've tried both versions of =. and .= (struggling to remember which is > correct. But this isn't the error, I get the same error regardles of the .= > The error I get is line 60 (which is) > > retrn .= "$VariableName=$VariableValue"; > > Thanks! Karl > > > -- > 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] Search for the documentation
The PHP manual online is searchable. If you are reading the HTML version on your local machine, doesn't your browser have "find"? 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, 25 Jan 2001, Jamie wrote: > Date: Thu, 25 Jan 2001 12:50:44 +0800 > From: Jamie <[EMAIL PROTECTED]> > To: PHP <[EMAIL PROTECTED]> > Subject: [PHP] Search for the documentation > > I'm one of those ppl who find it hard to sit and read documentation > especially manuals like the PHP one - presented HTML with no inbuilt search > functions. Being a fairly novice programmer and more of a designer I'm not > even that familiar with the programming terms to figure out what sections to > find what I'm looking for. > Sooo > -has anyone written a PHP search script for the documentation. I'd like to > be able to be able to do it similar to the windows (or most other) find box > where it will sort through all the pages until it hits the string I'm after > then if that's not it I can hit next and go onto the next matching string > that it finds... I guess what I'm thinking of would have to run in a framed > html [search at top and manual at bottom] but any other suggestions would be > welcomed. > > Jamie > > > -- > 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] multiple function returns
$array[0] will be the lang_pref and $array[1] will be the currency_pref. 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, 25 Jan 2001, Jamie wrote: > Date: Thu, 25 Jan 2001 13:04:27 +0800 > From: Jamie <[EMAIL PROTECTED]> > To: PHP <[EMAIL PROTECTED]> > Subject: [PHP] multiple function returns > > Can anyone help me I'm trying to read two results from a function by passing > them out via an array but I'm not sure how to access them once I have done > that. In the PHP manual it shows a list call which I can't seem to even find > what the hell it does the code below runs without any errors but does not > seem to work. > > here the function gest passed the language and currency preference and a > variable (1,0) to decide what it will do with them - update the preferences > of the user or read out and define the preferences. (once updated I want it > to read out the prefs aswell) > > function PrefChange($lang,$curry,$state){ > global $DB_Server, $HTTP_Host, $DB_Login, $DB_Password, $DB_Name, $DocRoot ; > > if ($state){//read preferences from page > if (!($result = mysql_db_query($DB_Name,"SELECT language_pref, > currency_pref FROM users WHERE user_id ='$cookie_user'"))){ >DisplayErrMessage(sprintf("internal error %s %s %s %d:%s\n",$DB_Server, > $DB_Login, $DB_Password, > mysql_errno(), mysql_error())); >while ($row = mysql_fetch_array($results)){ > $lang_pref = $row["language_pref"]; > $currancy_pref = $row["currency_pref"]; > return array($lang_pref,$currancy_pref); > } >} > } else {///update preferences from page > if (!($result = mysql_db_query($DB_Name,"UPDATE users SET > language_pref='$lang' AND currency_pref='$curry' WHERE > user_id='$cookie_user'"))){ >DisplayErrMessage(sprintf("internal error %s %s %s %d:%s\n",$DB_Server, > $DB_Login, $DB_Password, > mysql_errno(), mysql_error())); >PrefChange(0,0,1) ; >} > } > } > > > an example of what I'd like to do when calling the function (here I'm only > reading the prefrences from the DB ), a select box that is showing the > preference that is chosen with the preference read from the above function > and the list created by the function below > > > list ($form_language_pref, $form_currency_pref) = PrefChange(0,0,1); > > $select_id = $form_language_pref; > $db = mysql_connect("$DB_Server", "$DB_Login, $DB_Password"); > mysql_select_db("$DB_Name",$db); > $results = mysql_query("SELECT * FROM language ORDER BY language > ",$db); > > while ($row = mysql_fetch_array($results)){ > $rowid = $row["language_id"]; > $name = $row["language"]; > if ($rowid == $select_id) { > echo("$name\n"); > } else { > echo("$name\n"); > } > // endwhile; > } > echo(""); > ?> > -- 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] Flash/PHP
You can use premade flash movies just as you would in HTML. Therefore everything that is normally available is available in PHP, plus if you want, you get to use the wonderful libswf! :) 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, 25 Jan 2001, Kent Wang wrote: > Date: Thu, 25 Jan 2001 22:22:29 -0600 > From: Kent Wang <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [PHP] Flash/PHP > > What kind of integration exists for Flash/MySQL/PHP system? The only thing > I've seen so far is PHP code that will write flash movies, but it was > really complex code. > > Kent Wang > > > -- > 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] sessions and objects
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] Memory usage question
> 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] 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. > -- 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
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
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 " > >align=\"center\">$pctbl% >src=\"gd.php?bluehg=$blueval&redhg=$redval\" height=\"100\" /> >align=\"center\">$pctrd > > "; > } > > 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] Quoted-Printable Encoding
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] NT5 Sub Domains
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] Editor
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]
[PHP] PHP|Con insane pricing
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
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
[PHP] Re: PHP|Con insane pricing
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