|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Wed Aug 08 2001 - 15:19:29 CDT
php-general Digest 8 Aug 2001 20:19:29 -0000 Issue 804
Topics (messages 61768 through 61903):
Re: user's ip]
61768 by: Renze Munnik
Re: user's ip
61769 by: Renze Munnik
Re: SSL encryption type in PHP?
61770 by: Dr. Evil
61807 by: Sean C. McCarthy
Re: Passing HTTP_POST from one script to another
61771 by: Renze Munnik
61772 by: A.T.Z.
Re: Bug?
61773 by: Maxim Maletsky
61774 by: ReDucTor
61775 by: Vitali Falileev
61776 by: Renze Munnik
61777 by: ReDucTor
61778 by: Darius Ivanauskas
61781 by: ReDucTor
61784 by: Darius Ivanauskas
61786 by: Renze Munnik
61851 by: Bjorn Van Simaeys
PHP 4 released date
61779 by: Deependra B. Tandukar
61783 by: ReDucTor
61835 by: Mark Roedel
Re: Apache Directives
61780 by: Tom Carter
Re: IP security check
61782 by: Tom Carter
Re: WAP/WML Size
61785 by: Tom Carter
Re: not null
61787 by: Slavomir Slizik
blank form
61788 by: David Ovens
61789 by: David Ovens
61858 by: Bjorn Van Simaeys
Upload of files gives Mimetype on header
61790 by: Thomas Mejer Hansen
Detecting browser language
61791 by: Jeroen Geusebroek
61828 by: Don Read
How to post unknown amount of data ?
61792 by: vz
61796 by: Tom Carter
61797 by: Bruin, Bolke de
61800 by: Bruin, Bolke de
Non english european character conversion
61793 by: Tom Carter
61804 by: Yasuo Ohgaki
PHP Editor
61794 by: Nic Skitt
61795 by: Henrik Hansen
61799 by: B. van Ouwerkerk
61817 by: Richard Baskett
61831 by: B. van Ouwerkerk
associative arrays in html forms and javascript
61798 by: Daniel James
61803 by: Taylor, Stewart
61818 by: Tim McGuire
61843 by: Colin Viebrock
Re: close browser
61801 by: kath
installation on windows
61802 by: legal.HEROCYCLES.COM
61810 by: Phil Driscoll
61812 by: karthik
Re: [PHP-WIN] installation on windows
61805 by: Arjen van Efferen
Time problem
61806 by: pierre-yves
61808 by: Gianluca Baldo
61838 by: pierre-yves
Re: splitting text after 25 words
61809 by: Justin French
61825 by: Robert V. Zwink
61840 by: jose d lopez
code to see files in directories
61811 by: Eduardo Kokubo
61813 by: Henrik Hansen
61832 by: Karl Phillipson
Re: MySQL connection
61814 by: BRACK
61815 by: BRACK
61816 by: BRACK
61865 by: Bjorn Van Simaeys
61875 by: Attila Strauss
61897 by: Matthew Loff
Archives
61819 by: Andrew Hill
Re: Session problem
61820 by: Chad Day
61834 by: Brian Dunworth
61837 by: Chad Day
61867 by: Bjorn Van Simaeys
61882 by: Chad Day
61884 by: Johnson, Kirk
61886 by: Chad Day
61887 by: Chad Day
61891 by: Johnson, Kirk
61902 by: Johnson, Kirk
Alternate way of calling php scripts
61821 by: Evan Nemerson
61833 by: Jean-Arthur Silve
61844 by: Tim
SNMP OID translation
61822 by: Peter Hicks
Regular expressions
61823 by: Marc Davenport
61826 by: ReDucTor
Re: selecting words
61824 by: bill
61829 by: Robert V. Zwink
Test
61827 by: By Proxy
Strange session problems. Please help.
61830 by: By Proxy
61845 by: Tim
parse and fatal errors don't seem to touch my handler
61836 by: Darius Ivanauskas
61839 by: Thies C. Arntzen
Re: array + checkbox
61841 by: Colin Viebrock
61869 by: Bjorn Van Simaeys
61874 by: Colin Viebrock
Re: 3rd include
61842 by: Mark Roedel
61857 by: Johnson, Kirk
61866 by: Drew P. Vogel
61868 by: Mark Roedel
61893 by: Drew P. Vogel
61894 by: Mark Roedel
61899 by: Drew P. Vogel
61900 by: Mark Roedel
61903 by: Matthew Loff
Newsgroup / Mailing list
61846 by: Soeren Nielsen
Re: Images
61847 by: Bjorn Van Simaeys
Re: Newbie: Simple site search >> To bit more Complex...
61848 by: Inércia Sensorial
require using url
61849 by: Nigel_Soon.advanis.ca
61850 by: Tyler Longren
61854 by: Nigel_Soon.advanis.ca
61856 by: Bruin, Bolke de
61859 by: Nigel_Soon.advanis.ca
Re: checking for null form fields fails
61852 by: Bjorn Van Simaeys
Image Generation Library
61853 by: ignacio.estrada.cfe.gob.mx
61855 by: Bruin, Bolke de
Is there a debugger ???
61860 by: Peter Dowie
61870 by: Matthew Loff
61872 by: J Smith
61873 by: Alexander Wagner
61895 by: Kurt Lieber
RANDOM MOVIE?
61861 by: Kyle Smith
61863 by: Tim
newbie
61862 by: Jeremy Morano
61864 by: Tim
61876 by: Attila Strauss
session problems when calling within a class.
61871 by: Mark Garcia
61878 by: Sean C. McCarthy
include, chmod, password files
61877 by: David Hill
61880 by: Johnson, Kirk
61881 by: David Hill
61888 by: David Serrano
Re: Solaris/Apache/PHP load problem (solved)
61879 by: Peter Ostry
Act NOW -- The whole world will want this!
61883 by: orbit
form validataion?
61885 by: Kurth Bemis
61890 by: J Smith
61898 by: Matthew Loff
PHP in corporate settings?
61889 by: Jeff Lewis
International PHP Conference: all sessions
61892 by: Björn Schotte
RANDOM
61896 by: Kyle Smith
you might like this
61901 by: Steve Wright
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
On Wed, Aug 08, 2001 at 12:52:42AM +0100, Andreas D. Landmark wrote:
> 1) proxies should cache dynamic content
> 2) proxies should not retrieve from cache if the request is a force-refresh
> 3) proxies should not cache any content which URL includes "?"
>
> Sounds like you've got yourself a poor proxy there, I've certainly never
> seen any problem with developing through my proxy, apart from those pesky
> doubleclick ads seem to disappear.... wonder why...
Main word here is 'should'. Because they do. Ever searched for
headers you can sent for forcing no caching. The one thing you
always find is things like 'they should use this header, but they
don't' or 'one proxy only looks at the headers, others only look at
the contents'. I know how proxies _should_ work, but it turn's out
that there are -to quote you- many "poor proxies". And I won't say
that mine isn't one of 'm. But hey... I'm a programmer, not a
system-administrator and stuff like the proxy isn't realy my thing.
I know how they should work and I know we have one. But I also know
(out of experience and theory) that proxies (just like browsers btw)
don't always stick to the standards.
And ehhh... I hardly use URL's including "?". You know... that's the
beauty of sessionhandling. You don't need those ugly URL's anymore.
But... besides proxies one also uses a browser for
Internet-applications. And eventhough you can disable caching and
history and stuff, those damn things _do_ remember things from the
past and they think it's realy convenient to use that. It's quicker
dude! Yeah, well: fuck it! I don't want it to be quicker... I want
it to be right.
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
On Wed, Aug 08, 2001 at 12:45:32PM +1000, Chris Birmingham wrote: > I would use > > $HTTP_SERVER_VARS["REMOTE_ADDR"] > or > $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"] > > to return the IP address.. > > I have seen, people using if($ip == $REMOTE_ADDR) { // do whatever } > but in some configurations of PHP this can be a bad thing.. > > index.php?REMOTE_ADDR=10.0.0.1 would override the variable $REMOTE_ADDR (in > SOME configurations) > > Its probably alot harder for a malicious user to fake the HTTP_SERVER_VARS > array than just a normal variable. > > Just my .02c :) > > Regards > > Chris
You could not be more right!
Always use stuff like $HTTP_SERVER_VARS, $HTTP_POST_VARS, etc. It's the savest/best way!
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
> You can tell it using the variables from the server. Using Apache you > can access the variables specs at: > > http://www.apache-ssl.org/docs.html > > With Apache SSL is SSL_CIPHER returns the variable about SSL/TLS > ciphersuite.
Do you know how I would access that variable from PHP? Is that possible? I know how to configure apache to reject conections based on encryption settings, but instead of rejecting them, I would like to accept them but warn the user: "You should upgrade your browser". Is this possible?
Thanks
attached mail follows:
Hi,
Use getenv() since it is a CGI variable. Look at the manual.
Sean C. McCarthy SCI, S.L. (www.sci-spain.com)
"Dr. Evil" wrote:
>
> > You can tell it using the variables from the server. Using Apache you
> > can access the variables specs at:
> >
> > http://www.apache-ssl.org/docs.html
> >
> > With Apache SSL is SSL_CIPHER returns the variable about SSL/TLS
> > ciphersuite.
>
> Do you know how I would access that variable from PHP? Is that
> possible? I know how to configure apache to reject conections based
> on encryption settings, but instead of rejecting them, I would like to
> accept them but warn the user: "You should upgrade your browser". Is
> this possible?
>
> Thanks
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Tue, Aug 07, 2001 at 11:27:51PM +0500, Vikram Vaswani wrote:
> Hi,
>
> 'nother question: if I have a form which submits data in POST to script
> "a.php", and I now want to pass this POSTed data to "b.php" - how do I do
> this?
>
> I have tried the technique of iterating through $HTTP_POST and
> concatenating the key-value pairs into a GET URL, which works perfectly.
> However, I would like to pass the data from a.php to b.php as POST data, in
> the HTTP_POST array itself - is this possible, and how do I do it?
>
> Thanks!
>
> Vikram
> --
> I wouldn't recommend sex, drugs, and insanity for everyone, but it works
> for me.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
Try using sessions. Put the values/variables from $HTTP_POST_VARS into the session and then U can use 'm again on b.php.
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
>Try using sessions. Put the values/variables from $HTTP_POST_VARS >into the session and then U can use 'm again on b.php.
Or.. put the post vars into hidden textfields.. these do get posted to the next page..
If you run out of luck and have to deal with PHP3.. sessions doesn't seem to work very well on PHP3.. But this alternative also runs great on PHP4..
Bye,
B.
attached mail follows:
good point.
...and try this out:
echo (int)((8.85-8)*100).'<br>'; echo ((8.85-8)*100).'<br>';
Kinda weird, can anyone explain?
Thanks, Maxim Maletsky
-----Original Message-----
From: [Intent A/S] Tais M. Hansen [mailto:tmh
intent.dk]
Sent: Wednesday, August 08, 2001 4:49 PM
To: php-general
lists.php.net
Subject: [PHP] Bug?
Hi!
I just came across this weird thing. Bug? You tell me!
print (int)((8.85-8)*100);
I would think the line above would print "85". But for some reason, it prints "84"?? Can anyone tell me why that is?
-- Intent A/S Tais M. Hansen Web Developer-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
you must use float not int :D
----- Original Message -----
From: "Maxim Maletsky" <maxim
japaninc.com>
To: "'[Intent A/S] Tais M. Hansen'" <tmh
intent.dk>;
<php-general
lists.php.net>
Sent: Wednesday, August 08, 2001 7:01 PM
Subject: RE: [PHP] Bug?
> good point.
>
> ...and try this out:
>
>
> echo (int)((8.85-8)*100).'<br>';
> echo ((8.85-8)*100).'<br>';
>
>
> Kinda weird,
> can anyone explain?
>
>
> Thanks,
> Maxim Maletsky
>
>
>
> -----Original Message-----
> From: [Intent A/S] Tais M. Hansen [mailto:tmh
intent.dk]
> Sent: Wednesday, August 08, 2001 4:49 PM
> To: php-general
lists.php.net
> Subject: [PHP] Bug?
>
>
> Hi!
>
> I just came across this weird thing. Bug? You tell me!
>
> print (int)((8.85-8)*100);
>
> I would think the line above would print "85". But for some reason, it
> prints "84"?? Can anyone tell me why that is?
>
> --
> Intent A/S
> Tais M. Hansen
> Web Developer
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hello Maxim,
Lets try this:
echo (int)((8.85-8)*100000);
IMHO, this is miscalculation because 8.85 is float so when we make type cast to int we got wrong result.
Wednesday, August 08, 2001, 12:01:25 PM, you wrote:
MM> good point.
MM> ...and try this out:
MM> echo (int)((8.85-8)*100).'<br>'; MM> echo ((8.85-8)*100).'<br>';
MM> Kinda weird, MM> can anyone explain?
MM> Thanks, MM> Maxim Maletsky
-- Best regards, Vitali mailto:falileevitos.eu.org
attached mail follows:
On Wed, Aug 08, 2001 at 07:06:13PM +1000, ReDucTor wrote: > you must use float not int :D
Using float doesn't solve the problem, does it? Point is that when using int, the damn thing doesn't get it straight. And that's WEIRD. I mean the result of (8.85-8)*100 is already an integer and not converting it to an integer the result is perfectly okay.
Btw: (int)((8.85*100)-(8*100)), _does_ return a correct result.
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
if you use
echo (float)((8.85-8)*100);
it works because 8.85 go's to 0.85 and times that by 100, and you get 85
which is what you get...
----- Original Message -----
From: "Renze Munnik" <renze
datalink.nl>
To: "ReDucTor" <sjdtmv
tpg.com.au>; <php-general
lists.php.net>
Sent: Wednesday, August 08, 2001 7:14 PM
Subject: Re: [PHP] Bug?
> On Wed, Aug 08, 2001 at 07:06:13PM +1000, ReDucTor wrote:
> > you must use float not int :D
>
> Using float doesn't solve the problem, does it? Point is that when
> using int, the damn thing doesn't get it straight. And that's WEIRD.
> I mean the result of (8.85-8)*100 is already an integer and not
> converting it to an integer the result is perfectly okay.
>
> Btw: (int)((8.85*100)-(8*100)), _does_ return a correct result.
>
> --
>
> * R&zE:
>
> -- »»»»»»»»»»»»»»»»»»»»»»»»
> -- Renze Munnik
> -- DataLink BV
> --
> -- E: renze
datalink.nl
> -- W: +31 23 5326162
> -- F: +31 23 5322144
> -- M: +31 6 21811143
> -- H: +31 23 5516190
> --
> -- Stationsplein 82
> -- 2011 LM HAARLEM
> --
> -- http://www.datalink.nl
> -- ««««««««««««««««««««««««
>
attached mail follows:
Hello,
You shodld read http://www.php.net/manual/en/language.types.double.php and http://www.php.net/manual/en/language.types.integer.php#language.types.integer.casting
Regards,
-- Darius IvanauskasOn Wed, 8 Aug 2001, Maxim Maletsky wrote:
> good point. > > ...and try this out: > > > echo (int)((8.85-8)*100).'<br>'; > echo ((8.85-8)*100).'<br>'; > > > Kinda weird, > can anyone explain? > > > Thanks, > Maxim Maletsky > > > > -----Original Message----- > From: [Intent A/S] Tais M. Hansen [mailto:tmh
intent.dk] > Sent: Wednesday, August 08, 2001 4:49 PM > To: php-general
lists.php.net > Subject: [PHP] Bug? > > > Hi! > > I just came across this weird thing. Bug? You tell me! > > print (int)((8.85-8)*100); > > I would think the line above would print "85". But for some reason, it > prints "84"?? Can anyone tell me why that is? > > -- > Intent A/S > Tais M. Hansen > Web Developer > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net >
attached mail follows:
i found this http://www.php.net/manual/en/language.types.double.php#warn.float-precision
it explains the problem
<?php
$q = ((8.85-8)*100);
echo $q."<br>";
echo (float)($q)."<br>";
echo (int)($q)."<br>";
echo var_dump($q)."<br>";
?>
gives out
85
85
84
float(85)
----- Original Message -----
From: "Darius Ivanauskas" <darius
nomagiclt.com>
To: "Maxim Maletsky" <maxim
japaninc.com>
Cc: "'[Intent A/S] Tais M. Hansen'" <tmh
intent.dk>;
<php-general
lists.php.net>
Sent: Wednesday, August 08, 2001 7:18 PM
Subject: RE: [PHP] Bug?
> Hello,
>
> You shodld read http://www.php.net/manual/en/language.types.double.php and
>
http://www.php.net/manual/en/language.types.integer.php#language.types.integ
er.casting
>
>
> Regards,
> --
> Darius Ivanauskas
>
> On Wed, 8 Aug 2001, Maxim Maletsky wrote:
>
> > good point.
> >
> > ...and try this out:
> >
> >
> > echo (int)((8.85-8)*100).'<br>';
> > echo ((8.85-8)*100).'<br>';
> >
> >
> > Kinda weird,
> > can anyone explain?
> >
> >
> > Thanks,
> > Maxim Maletsky
> >
> >
> >
> > -----Original Message-----
> > From: [Intent A/S] Tais M. Hansen [mailto:tmh
intent.dk]
> > Sent: Wednesday, August 08, 2001 4:49 PM
> > To: php-general
lists.php.net
> > Subject: [PHP] Bug?
> >
> >
> > Hi!
> >
> > I just came across this weird thing. Bug? You tell me!
> >
> > print (int)((8.85-8)*100);
> >
> > I would think the line above would print "85". But for some reason, it
> > prints "84"?? Can anyone tell me why that is?
> >
> > --
> > Intent A/S
> > Tais M. Hansen
> > Web Developer
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Btw.
floor((8.85-8)*100) == (int)((8.85-8)*100)
And if you gonna using integer numbers, it is always good idea to use one of rounding functions: round, ceil or floor. In this case round works as expected.
Regards,
-- Darius IvanauskasOn Wed, 8 Aug 2001, Darius Ivanauskas wrote:
> Hello, > > You shodld read http://www.php.net/manual/en/language.types.double.php and > http://www.php.net/manual/en/language.types.integer.php#language.types.integer.casting > > > Regards, > -- > Darius Ivanauskas > > On Wed, 8 Aug 2001, Maxim Maletsky wrote: > > > good point. > > > > ...and try this out: > > > > > > echo (int)((8.85-8)*100).'<br>'; > > echo ((8.85-8)*100).'<br>'; > > > > > > Kinda weird, > > can anyone explain? > > > > > > Thanks, > > Maxim Maletsky > > > > > > > > -----Original Message----- > > From: [Intent A/S] Tais M. Hansen [mailto:tmh
intent.dk] > > Sent: Wednesday, August 08, 2001 4:49 PM > > To: php-general
lists.php.net > > Subject: [PHP] Bug? > > > > > > Hi! > > > > I just came across this weird thing. Bug? You tell me! > > > > print (int)((8.85-8)*100); > > > > I would think the line above would print "85". But for some reason, it > > prints "84"?? Can anyone tell me why that is? > > > > -- > > Intent A/S > > Tais M. Hansen > > Web Developer > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > > For additional commands, e-mail: php-general-help
lists.php.net > > To contact the list administrators, e-mail: php-list-admin
lists.php.net > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > > For additional commands, e-mail: php-general-help
lists.php.net > > To contact the list administrators, e-mail: php-list-admin
lists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net >
attached mail follows:
On Wed, Aug 08, 2001 at 07:18:26PM +1000, ReDucTor wrote: > if you use > echo (float)((8.85-8)*100); > it works because 8.85 go's to 0.85 and times that by 100, and you get 85 > which is what you get...
Maybe you've heard about dynamic pages and stuff...
Say:
$a = 8.85; $b = 8; $c = 100;
$result = (int)(($a-$b)*$c);
And you know... we need an integer. Let's say for inserting into a db or so. Then it doesn't help converting it to float, does it? I mean... ofcourse in the above example it returns the correct result, but let's just change it a bit:
$a = 8.8512; $b = 7.1237; $c = 100; $result_i = (int)(($a-$b)*$c); $result_f = (float)(($a-$b)*$c);
See the diff between $result_i and $result_f? And if you realy need an integer, $result_f isn't realy what you're looking for.
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
Hello,
I remember there was a warning in the PHP Manual about this. This is it:
** Never cast an unknown fraction to integer, as this can sometimes lead to unexpected results.
** echo (int) ( (0.1+0.7) * 10 ); // echoes 7!
So do your calculations first, and then echo the results. This way you get good habits in programming. And your code will be easier to read as well!
Greetz, Bjorn Van Simaeys www.bvsenterprises.com
--- "[Intent A/S] Tais M. Hansen" <tmh
intent.dk>
wrote:
> Hi!
>
> I just came across this weird thing. Bug? You tell
> me!
>
> print (int)((8.85-8)*100);
>
> I would think the line above would print "85". But
> for some reason, it
> prints "84"?? Can anyone tell me why that is?
>
> --
> Intent A/S
> Tais M. Hansen
> Web Developer
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
Greetings!
Can anybody give me, PHP4 released date?
Looking forward to hearing from you.
Warm Regards, DT
attached mail follows:
4.0.6 is out, and has been from the 23rd of June 2001..
----- Original Message -----
From: "Deependra B. Tandukar" <deepndra
icimod.org.np>
To: <php-general
lists.php.net>
Sent: Wednesday, August 08, 2001 7:31 PM
Subject: [PHP] PHP 4 released date
> Greetings!
>
> Can anybody give me, PHP4 released date?
>
> Looking forward to hearing from you.
>
> Warm Regards,
> DT
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
> -----Original Message-----
> From: Deependra B. Tandukar [mailto:deepndra
icimod.org.np]
> Sent: Wednesday, August 08, 2001 4:31 AM
> To: php-general
lists.php.net
> Subject: [PHP] PHP 4 released date
>
>
> Can anybody give me, PHP4 released date?
The NEWS file in your PHP directory gives the date of each release. The first PHP4 Beta came out July 19th, 1999; the 4.0.0 release was May 22nd, 2000; and the current (4.0.6) release was June 23rd, 2001.
--- Mark Roedel (roedelmletu.edu) | "There cannot be a crisis next week. Systems Programmer / WebMaster | My schedule is already full." LeTourneau University | -- Henry Kissinger
attached mail follows:
What you are looking for isn't a php function, but a module in apache called mod_rewrite..this is usually installed in most apaches, if not can be done easily.
so in the stie .htaccess (or indeed in the master conf) you would do something like
RewriteEngine On RewriteRule ^/login/[a-zA-z0-9]* /login/something.php
----- Original Message -----
From: "Sean Cook" <sdc-php
vatelecom.com>
To: <php-general
lists.php.net>
Sent: Tuesday, August 07, 2001 11:00 PM
Subject: [PHP] Apache Directives
attached mail follows:
Another point is to remember that each page request may come from a different IP address.
For example, where I work in IBM, every out going connection goes from one of 30 or so boxes, each with their iwn IP, so in the process of browsing a site each request for a file can come from one of those IP's.
----- Original Message -----
From: "matt" <mattwire
swt.edu>
To: <php-general
lists.php.net>
Sent: Tuesday, August 07, 2001 9:37 PM
Subject: [PHP] IP security check
> For secure payment pages, I need for the code to determine the persons IP
> address, even if they have a "spoofer" running. Is this possible? Getting
> around the spoofer in order to catch criminals using illegal credit card
> #'s..
>
> thanks
> -matt (cs student)
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
AFAIK, The size limit is a feature of WML.. altho I thought it was more than that?
hjHow do you me to judge how big your pages are? theres various tools for measuring f thats what you mean.
Some more info could help us... what wap server are you running
----- Original Message -----
From: "Keith Whyman" <k.whyman
bf-72.de>
To: "PHP General Mailing List" <php-general
lists.php.net>; "PHP DB Mailing
List" <php-db
lists.php.net>
Sent: Wednesday, August 08, 2001 7:16 AM
Subject: [PHP] WAP/WML Size
> I'm using php/mysql to create some wml pages which work fine BUT
> as always there is a problem.
>
> It seems that you are only allowed to have wml pages of 1400 bytes, anyone
> got any
> clever ideas how I can judge/control how big my generated pages are ?
> Info comes out from mysql - sometimes just one address - no problems
> sometimes 20 addresses and then dificulties ??
>
> Anyone help ?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
if (empty($value)) { ... }
On Wed, 1 Aug 2001, Craig Vincent wrote:
>
> > When a field is declared as an integer, not null and is the primary,
> > how would I address it's empty set?
> >
> > ex: if($value == ???)
> > {
> > bla
> > bla
> > bla
> > }
> >
> >
> > My condition wants there to be nothing in $value.
>
> Are you referring to the (INT, NOT NULL, PRIMARY) field being in a database?
>
> Sincerely,
>
> Craig Vincent
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
in my php scripts I am using forms which are posted to itself, each time fields are submitted the php scripts checks the syntax before moving onto the next part of the form, if there is an error the script will tell the user that there is an error and to use the back button to correct the form, problem is when you press the back button the form is blank. how do I overcome this by keeping the original details in the form especially when using drop down menu options ??
attached mail follows:
oops sorry, dont think it was a php problem but a problem with my browser !!
----- Original Message ----- From: David Ovens To: php Sent: Wednesday, August 08, 2001 10:56 AM Subject: blank form
in my php scripts I am using forms which are posted to itself, each time fields are submitted the php scripts checks the syntax before moving onto the next part of the form, if there is an error the script will tell the user that there is an error and to use the back button to correct the form, problem is when you press the back button the form is blank. how do I overcome this by keeping the original details in the form especially when using drop down menu options ??
attached mail follows:
Hi David,
This is indeed not a php problem, but a browser feature. The browser forces a reload whenever you have a '?' in your code! (unless you use some proxy..).
I would also like to know how to overcome this - if possible.
Greetz, Bjorn Van Simaeys
--- David Ovens <DOvens
doweb.co.uk> wrote:
> oops sorry, dont think it was a php problem but a
> problem with my browser !!
>
> ----- Original Message -----
> From: David Ovens
> To: php
> Sent: Wednesday, August 08, 2001 10:56 AM
> Subject: blank form
>
>
> in my php scripts I am using forms which are
> posted to itself, each time fields are submitted the
> php scripts checks the syntax before moving onto the
> next part of the form, if there is an error the
> script will tell the user that there is an error and
> to use the back button to correct the form, problem
> is when you press the back button the form is blank.
> how do I overcome this by keeping the original
> details in the form especially when using drop down
> menu options ??
>
>
>
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
Hi When I try to upload files using the example in the PHP documentation, i get uploaded files with the first two lines being e.g.: " Content-type : image/jpeg
" How can I remove this mime type from the images that I upload (so I can perform some manipulation of the images)
The code : echo "<FORM ENCTYPE=\"multipart/form-data\" ACTION=\"$PHP_SELF\" METHOD=\"POST\">"; //echo "<FORM ACTION=\"$PHP_SELF\" METHOD=\"POST\">"; echo "<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"10000000\">"; echo "Send this file: <INPUT NAME=\"userfile\" TYPE=\"file\">"; echo "<INPUT TYPE=\"submit\" name=\"upload\" VALUE=\"upload\">"; echo "</FORM>";
if ($upload) { echo "Userfile : $userfile<BR>";
if (is_uploaded_file($userfile)) { copy($userfile, "/tmp/WynnBase.tmp"); } else { echo "Possible file upload attack: filename '$userfile'."; }
}
attached mail follows:
Hi there,
Lately you see a lot of sites that detect the language of the client browser. For example if i visit google it's in dutch. I know they detect this using the browser, but i'm not sure on how it's done.
Can someone shed some light on this?
Thanks,
Jeroen
attached mail follows:
On 08-Aug-2001 Jeroen Geusebroek wrote: > Hi there, > > Lately you see a lot of sites that detect the language of the client > browser. > For example if i visit google it's in dutch. I know they detect this using > the browser, but i'm not sure on how it's done. > > Can someone shed some light on this? >
$HTTP_ACCEPT_LANGUAGE, $HTTP_ACCEPT_CHARSET
Regards,
-- Don Read dreadtexas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.
attached mail follows:
Hello all,
I'm having a trouble. I'm programming an CMS for one pc company. So in example i'm doing a pc category catalog admin. They can add/delete/modify theese category's. But also they want one feature: they want to edit all category's in one form. So i made a form that displays all category's in <input type="text"> so they can edit, but the problem is that i dunno how many there will be category's and how to organize data passing to script. User submits form with all changes, and my script needs to get all theese category's with id's and changed names.
Ok how it looks in script:
Function display_all() { Print "<form action='category.php' method='post' name='editcat'> <INPUT TYPE=hidden NAME='admin_editall' VALUE='1'>"; $result=mysql_query("SELECT cat_id, cat_name, cat_show FROM cat GROUP BY cat_id ASC"); While ($row=mysql_fetch_array($result)) { $cat_id=$row["cat_id"]; $cat_name=$row["cat_name"]; $cat_show=$row["cat_show"]; Print "<tr class=tb1><td><input type='text' name='cat_id' size='2' maxlength='4' value='$cat_id' disabled></td>\n"; Print "<td><input type='text' name='cat_name$cat_id' size='50' maxlength='50' value='$cat_name'></td> <td><input type='checkbox' name='cat_status'"; if ($cat_show=="Y") {Print " checked";} Print "></td></tr>\n"; } }
// ^^^ this form post all data into same file <category.php> //and function add_all_db() must get all data.
Function add_all_db(){ ????????? // here i must add theese changes to db // i know how to add to db, but dunno // how to get forms passed data. }
PHP Version 4.0.4pl1 MySQL Version 3.22.30
Thank u for your help.
Vilius Zigmantas aka vz
vz
kryptis.lt
attached mail follows:
The best way of doing this is to name the fields catid[] The [] means that they are inserted into an array in the order they appear on the page, so on the page with deals results you just have to cycle through the array.
As a side point, there is no way of telling what has been modified and what is not (well without comparing the variables to the db again).. so it is usually quicker just to update the whole.lot.
HTH, Tom
----- Original Message -----
From: "vz" <vz
kryptis.lt>
To: <php-general
lists.php.net>
Sent: Wednesday, August 08, 2001 12:00 PM
Subject: [PHP] How to post unknown amount of data ?
> Hello all,
>
> I'm having a trouble. I'm programming an CMS
> for one pc company. So in example i'm doing
> a pc category catalog admin. They can add/delete/modify
> theese category's. But also they want one feature:
> they want to edit all category's in one form.
> So i made a form that displays all category's in
> <input type="text"> so they can edit, but
> the problem is that i dunno how many there will
> be category's and how to organize data passing to
> script. User submits form with all changes,
> and my script needs to get all theese category's
> with id's and changed names.
>
> Ok how it looks in script:
>
> Function display_all() {
> Print "<form action='category.php' method='post' name='editcat'>
> <INPUT TYPE=hidden NAME='admin_editall' VALUE='1'>";
> $result=mysql_query("SELECT cat_id,
> cat_name,
> cat_show
> FROM cat
> GROUP BY cat_id ASC");
> While ($row=mysql_fetch_array($result)) {
> $cat_id=$row["cat_id"];
> $cat_name=$row["cat_name"];
> $cat_show=$row["cat_show"];
> Print "<tr class=tb1><td><input type='text' name='cat_id'
> size='2' maxlength='4' value='$cat_id'
> disabled></td>\n";
> Print "<td><input type='text' name='cat_name$cat_id'
> size='50' maxlength='50' value='$cat_name'></td>
> <td><input type='checkbox' name='cat_status'";
> if ($cat_show=="Y") {Print " checked";}
> Print "></td></tr>\n";
> }
> }
>
> // ^^^ this form post all data into same file <category.php>
> file://and function add_all_db() must get all data.
>
> Function add_all_db(){
> ?????????
> // here i must add theese changes to db
> // i know how to add to db, but dunno
> // how to get forms passed data.
> }
>
> PHP Version 4.0.4pl1
> MySQL Version 3.22.30
>
> Thank u for your help.
> Vilius Zigmantas aka vz
> vz
kryptis.lt
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
You can enumerate the form vars for example if you have an unkown amount of comments
for($i=0;$i<sizeof($comments);$i++) { echo "<input type="text" name="commentid$i">"; }
etc
Bolke
(sorry I'm not going to look at your code, better split HTML creation and data(-retrieval))
Bolke
-----Oorspronkelijk bericht-----
Van: vz [mailto:vz
kryptis.lt]
Verzonden: Wednesday, August 08, 2001 1:00 PM
Aan: php-general
lists.php.net
Onderwerp: [PHP] How to post unknown amount of data ?
Hello all,
I'm having a trouble. I'm programming an CMS for one pc company. So in example i'm doing a pc category catalog admin. They can add/delete/modify theese category's. But also they want one feature: they want to edit all category's in one form. So i made a form that displays all category's in <input type="text"> so they can edit, but the problem is that i dunno how many there will be category's and how to organize data passing to script. User submits form with all changes, and my script needs to get all theese category's with id's and changed names.
Ok how it looks in script:
Function display_all() { Print "<form action='category.php' method='post' name='editcat'> <INPUT TYPE=hidden NAME='admin_editall' VALUE='1'>"; $result=mysql_query("SELECT cat_id, cat_name, cat_show FROM cat GROUP BY cat_id ASC"); While ($row=mysql_fetch_array($result)) { $cat_id=$row["cat_id"]; $cat_name=$row["cat_name"]; $cat_show=$row["cat_show"]; Print "<tr class=tb1><td><input type='text' name='cat_id' size='2' maxlength='4' value='$cat_id' disabled></td>\n"; Print "<td><input type='text' name='cat_name$cat_id' size='50' maxlength='50' value='$cat_name'></td> <td><input type='checkbox' name='cat_status'"; if ($cat_show=="Y") {Print " checked";} Print "></td></tr>\n"; } }
// ^^^ this form post all data into same file <category.php> //and function add_all_db() must get all data.
Function add_all_db(){ ????????? // here i must add theese changes to db // i know how to add to db, but dunno // how to get forms passed data. }
PHP Version 4.0.4pl1 MySQL Version 3.22.30
Thank u for your help.
Vilius Zigmantas aka vz
vz
kryptis.lt
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
forgot something
to enumerate them in your script use something like
for ($i=0;$i<sizeof($comments);$i++) { $cmt = $HTTP_FORM_VARS["commentid" . $i]; }
Bolke
-----Oorspronkelijk bericht-----
Van: Bruin, Bolke de [mailto:B.deBruin
tijdbeursmedia.nl]
Verzonden: Wednesday, August 08, 2001 1:20 PM
Aan: 'vz'; php-general
lists.php.net
Onderwerp: RE: [PHP] How to post unknown amount of data ?
You can enumerate the form vars for example if you have an unkown amount of comments
for($i=0;$i<sizeof($comments);$i++) { echo "<input type="text" name="commentid$i">"; }
etc
Bolke
(sorry I'm not going to look at your code, better split HTML creation and data(-retrieval))
Bolke
-----Oorspronkelijk bericht-----
Van: vz [mailto:vz
kryptis.lt]
Verzonden: Wednesday, August 08, 2001 1:00 PM
Aan: php-general
lists.php.net
Onderwerp: [PHP] How to post unknown amount of data ?
Hello all,
I'm having a trouble. I'm programming an CMS for one pc company. So in example i'm doing a pc category catalog admin. They can add/delete/modify theese category's. But also they want one feature: they want to edit all category's in one form. So i made a form that displays all category's in <input type="text"> so they can edit, but the problem is that i dunno how many there will be category's and how to organize data passing to script. User submits form with all changes, and my script needs to get all theese category's with id's and changed names.
Ok how it looks in script:
Function display_all() { Print "<form action='category.php' method='post' name='editcat'> <INPUT TYPE=hidden NAME='admin_editall' VALUE='1'>"; $result=mysql_query("SELECT cat_id, cat_name, cat_show FROM cat GROUP BY cat_id ASC"); While ($row=mysql_fetch_array($result)) { $cat_id=$row["cat_id"]; $cat_name=$row["cat_name"]; $cat_show=$row["cat_show"]; Print "<tr class=tb1><td><input type='text' name='cat_id' size='2' maxlength='4' value='$cat_id' disabled></td>\n"; Print "<td><input type='text' name='cat_name$cat_id' size='50' maxlength='50' value='$cat_name'></td> <td><input type='checkbox' name='cat_status'"; if ($cat_show=="Y") {Print " checked";} Print "></td></tr>\n"; } }
// ^^^ this form post all data into same file <category.php> //and function add_all_db() must get all data.
Function add_all_db(){ ????????? // here i must add theese changes to db // i know how to add to db, but dunno // how to get forms passed data. }
PHP Version 4.0.4pl1 MySQL Version 3.22.30
Thank u for your help.
Vilius Zigmantas aka vz
vz
kryptis.lt
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi All,
I was wondering if there exists, either in PHP (I can't find anything) or something someone has written (again, my searches have been fruitless) to convert non-english european characters to the english equivalents eg å to a etc.
TIA, Tom
attached mail follows:
Although, I haven't used and don't know it at all. I think recode extension will do that.
http://www.php.net/manual/en/ref.recode.php
-- Yasuo Ohgaki"Tom Carter" <tcarter
roundcorners.com> wrote in message news:015601c11ffb$61fedeb0$0a00a8c0
bjorn... > Hi All, > > I was wondering if there exists, either in PHP (I can't find anything) or > something someone has written (again, my searches have been fruitless) to > convert non-english european characters to the english equivalents eg å to a > etc. > > TIA, Tom >
attached mail follows:
Hi all,
What tool do you recommend to compose PHP pages?
I am traditionaly an ASP developer and I have always used Ultradev and Interdev.
What is available??
Cheers
Nic (Answers by email would be prefered)
attached mail follows:
nic
nicskitt.co.uk (Nic Skitt) wrote:
> Hi all, > > What tool do you recommend to compose PHP pages? > > I am traditionaly an ASP developer and I have always used Ultradev and > Interdev. > > What is available??
some are found here (under editors :): http://www.alt-php-faq.org/links.html
-- Henrik Hansen
attached mail follows:
>What tool do you recommend to compose PHP pages? > >I am traditionaly an ASP developer and I have always used Ultradev and >Interdev.
Welcome to the club..
If you take a moment to search the archive.. this question has ben answered quite a few times in the last month.
Bye,
B.
attached mail follows:
I would have had no clue that there was an archive, so it's good to know. Thanks!
>> What tool do you recommend to compose PHP pages? >> >> I am traditionaly an ASP developer and I have always used Ultradev and >> Interdev. > > Welcome to the club.. > > If you take a moment to search the archive.. this question has ben answered > quite a few times in the last month. > > Bye, > > > B.
attached mail follows:
At 06:19 8-8-01 -0700, Richard Baskett wrote: >I would have had no clue that there was an archive, so it's good to know. >Thanks!
It's on the same page where you subscribed to this list..
Bye,
B.
attached mail follows:
Hi everyone :)
imagine this if you will..
<html> <body onload="document.formname.inputfield.focus()"> <form name="formname"> <input type="text" name="inputfield"> </form> </body> </html>
ugly form with a text input field that is focussed when the form loads, erm.. nice.
now, I like to put all my form stuff into associative arrays, makes things a lot nicer when I am doing things later... but this... means something completely different to javascript:
<html> <body onload="document.formname.arraystuff[inputfield].focus()"> <form name="formname"> <input type="text" name="arraystuff[inputfield]"> </form> </body> </html>
and like that the text field won't focus and the parser tells me that arraystuff has no properties and that inputfield is undefined.
I've tried all sorts of stuff, at the moment when I do a form I choose between javascript and associative arrays, depending on what I need... but I *want* both >;-)
anyone have any ideas? I keep getting errors myself.
Twigman...
attached mail follows:
This is because you currently only have one field on your form named arraystuff. The browser only creates an array of elements if there is more than one of them. arraystuff.focus(), would work at present.
-Stewart
-----Original Message-----
From: Daniel James [mailto:twigman
netbreeze.com.au]
Sent: 08 August 2001 12:56
To: php-general
lists.php.net
Subject: [PHP] associative arrays in html forms and javascript
Hi everyone :)
imagine this if you will..
<html> <body onload="document.formname.inputfield.focus()"> <form name="formname"> <input type="text" name="inputfield"> </form> </body> </html>
ugly form with a text input field that is focussed when the form loads, erm.. nice.
now, I like to put all my form stuff into associative arrays, makes things a lot nicer when I am doing things later... but this... means something completely different to javascript:
<html> <body onload="document.formname.arraystuff[inputfield].focus()"> <form name="formname"> <input type="text" name="arraystuff[inputfield]"> </form> </body> </html>
and like that the text field won't focus and the parser tells me that arraystuff has no properties and that inputfield is undefined.
I've tried all sorts of stuff, at the moment when I do a form I choose between javascript and associative arrays, depending on what I need... but I *want* both >;-)
anyone have any ideas? I keep getting errors myself.
Twigman...
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Yes, I find I have to do this a lot if I have multiple rows in a form and I want to do anything with javascript. I use commands like this: document.formname["the_checkbox[9]"].checked = true and if you needed to stick a variable in the index:
theform["the_checkbox["+the_index+"]"].checked = true;
So on yours I think it would be like this: document.formname["arraystuff["+inputfield+"]"].focus or <body onload = 'document.formname["arraystuff["+inputfield+"]"].focus'>
Tim McGuire Minnesota "The only time I ever run is when I light a roach bomb in my apartment"
--- Daniel James <twigman
netbreeze.com.au> wrote:
> Hi everyone :)
>
> imagine this if you will..
>
> <html>
> <body
> onload="document.formname.inputfield.focus()">
> <form name="formname">
> <input type="text" name="inputfield">
> </form>
> </body>
> </html>
>
> ugly form with a text input field that is focussed
> when the form loads,
> erm.. nice.
>
> now, I like to put all my form stuff into
> associative arrays, makes things
> a lot nicer when I am doing things later... but
> this... means something
> completely different to javascript:
>
> <html>
> <body
>
onload="document.formname.arraystuff[inputfield].focus()">
> <form name="formname">
> <input type="text"
> name="arraystuff[inputfield]">
> </form>
> </body>
> </html>
>
> and like that the text field won't focus and the
> parser tells me that
> arraystuff has no properties and that inputfield is
> undefined.
>
> I've tried all sorts of stuff, at the moment when I
> do a form I choose
> between javascript and associative arrays, depending
> on what I need... but
> I *want* both >;-)
>
> anyone have any ideas? I keep getting errors myself.
>
> Twigman...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
> <html> > <body onload="document.formname.arraystuff[inputfield].focus()"> > <form name="formname"> > <input type="text" name="arraystuff[inputfield]"> > </form> > </body> > </html> > > and like that the text field won't focus and the parser tells me that > arraystuff has no properties and that inputfield is undefined.
<body onload="document.formname.elements['arraystuff[inputfield]'].focus()">
... should work.
- Colin
attached mail follows:
I knew it was a joke.... yeah... really... I did.... ;)
- k
----- Original Message -----
From: "Ryan Fischer" <ryan
gigabee.com>
To: "kath" <kath
kathweb.net>; <jeremy
prepresshelp.com>;
<php-general
lists.php.net>
Sent: Tuesday, August 07, 2001 11:20 PM
Subject: Re: [PHP] close browser
> You wrote:
> > > You wrote:
> > > > Can anybody tell me what the code to close the browser is?
> > >
> > > ALT+F4. ;)
> > PHP cannot execute client side actions, afaik.
> >
> > - k
>
> 'Twas a joke. See the winky smilie? You may all laugh now. ;)
>
> --
> -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Dear Friends,
I am new to PHP (but familiar with ASP,JSP) and would like to have some guidance notes from you. I am using windows 98 OS on my PC with PWS installed on it. I want to install PHP that runs on windows using PWS. For this I have done the following: 1. Downloaded php for windows from www.php.net , its is of about 738 bytes. 2. I extracted the same in c:\php folder. 3. shifted the php.ini in c:\windows folder.
My queries are: 1. In which folder I have to place my php files? whether in c: \inetpub\wwwroot folder where other asp files I put. Because, when I put test.php file in c:\inetpub\wwwroot folder and called by using http://localhost/test.php , It showed a blank white sheet that is without interpreting php. 2. Whether I have omitted any step for installation?
Pl. clarify.
Ajay K. Ratra
Ludhiana (INDIA)
ajay
LudhianaInfoline.com
attached mail follows:
On Wednesday 08 August 2001 11:29, legal
HEROCYCLES.COM wrote:
>
> My queries are:
> 1. In which folder I have to place my php files? whether in c:
> \inetpub\wwwroot folder where other asp files I put.
This is the correct place.
> 2. Whether I have omitted any step for installation?
If you used the installation wizard and told it you were using PWS, then you
have not missed any steps.
If you do a 'view source' on your blank page, do you see the php source code?
If you cd to c:\php and type php.exe -i at the command line do you get a load of html on screen?
Cheers
-- Phil Driscoll
attached mail follows:
Hi,
The best way would be to create a dir inside inetpub\wwwroot\ and give this directory execute permission in PWS.
It should start working then. If it doesnt check ur php.ini for settings.
best of luck, Karthik.
----- Original Message -----
From: <legal
HEROCYCLES.COM>
To: <php-general
lists.php.net>
Cc: <php-windows
lists.php.net>
Sent: Wednesday, August 08, 2001 3:59 PM
Subject: [PHP] installation on windows
> Dear Friends,
>
> I am new to PHP (but familiar with ASP,JSP) and would like to have some
> guidance notes from you.
> I am using windows 98 OS on my PC with PWS installed on it.
> I want to install PHP that runs on windows using PWS.
> For this I have done the following:
> 1. Downloaded php for windows from www.php.net , its is of about 738
> bytes.
> 2. I extracted the same in c:\php folder.
> 3. shifted the php.ini in c:\windows folder.
>
> My queries are:
> 1. In which folder I have to place my php files? whether in c:
> \inetpub\wwwroot folder where other asp files I put.
> Because, when I put test.php file in c:\inetpub\wwwroot folder and
> called by using http://localhost/test.php , It showed a blank white
> sheet that is without interpreting php.
> 2. Whether I have omitted any step for installation?
>
> Pl. clarify.
>
>
> Ajay K. Ratra
> Ludhiana (INDIA)
> ajay
LudhianaInfoline.com
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
You have to create a mapping between the PHP file extension and the PHP interpreter
I don't know how to do that in PWS, sorry
Good luck, Arjen
-----Original Message-----
From: legal
HEROCYCLES.COM [mailto:legal
HEROCYCLES.COM]
Sent: woensdag 8 augustus 2001 12:29
To: php-general
lists.php.net
Cc: php-windows
lists.php.net
Subject: [PHP-WIN] installation on windows
Dear Friends,
I am new to PHP (but familiar with ASP,JSP) and would like to have some guidance notes from you. I am using windows 98 OS on my PC with PWS installed on it. I want to install PHP that runs on windows using PWS. For this I have done the following: 1. Downloaded php for windows from www.php.net , its is of about 738 bytes. 2. I extracted the same in c:\php folder. 3. shifted the php.ini in c:\windows folder.
My queries are: 1. In which folder I have to place my php files? whether in c: \inetpub\wwwroot folder where other asp files I put. Because, when I put test.php file in c:\inetpub\wwwroot folder and called by using http://localhost/test.php , It showed a blank white sheet that is without interpreting php. 2. Whether I have omitted any step for installation?
Pl. clarify.
Ajay K. Ratra
Ludhiana (INDIA)
ajay
LudhianaInfoline.com
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribelists.php.net For additional commands, e-mail: php-windows-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hello, I convert the time in seconds to do some calculations, now I want to convert a number of seconds in a presentable HH:MM:SS format.
In other words, how do you change this 997271630.08651 in 08:14:32 ?
py
p.s. I use this to get the number of seconds. function getmicrotime() { $temparray=split(" ",microtime()); $returntime=$temparray[0]+$temparray[1]; return $returntime; }
attached mail follows:
Pierre - py> In other words, how do you change this 997271630.08651 py> in 08:14:32 ? you can use date() in conjunction with mktime(). Have a look at the manual there are good examples and users comments there.
Cheers, Gianluca
gianluca.baldo
bcninedita.com
BcnInédita EURO RSCG INTERACTION www.bcninedita.com Planella, 39 08017 Barcelona Tel.34 932 531 950 (directo 93 253 19 53) Fax. 34 932 114 546
attached mail follows:
Thanks, I feel a bit moron ;) it seems like I missed it while reading the manuel, sometimes the solution is so obvious that it becomes trivial! py
----- Original Message -----
From: "Thomas Schmid" <dyonisus
gmx.de>
To: "'pierre-yves'" <pylem
sympatico.ca>
Sent: Wednesday, August 08, 2001 8:23 AM
Subject: AW: [PHP] Time problem
Take the date() function ;-)
-----Ursprüngliche Nachricht-----
Von: pierre-yves [mailto:pylem
sympatico.ca]
Gesendet: Mittwoch, 8. August 2001 14:19
An: php-general
lists.php.net
Betreff: [PHP] Time problem
Hello, I convert the time in seconds to do some calculations, now I want to convert a number of seconds in a presentable HH:MM:SS format.
In other words, how do you change this 997271630.08651 in 08:14:32 ?
py
p.s. I use this to get the number of seconds. function getmicrotime() { $temparray=split(" ",microtime()); $returntime=$temparray[0]+$temparray[1]; return $returntime; }
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Thanks to all who replied, this solution by Chris was bar far the easiest to implement.
Really appreciate it :)
Chris Lambert wrote:
> $teaser = explode(" ", $article, 26)); > array_pop($teaser); > $teaser = implode(" ", $teaser);
Justin French
attached mail follows:
For future reference using explode and counting the words is not the correct way to do this. Your array could be huge, and if you have multiple requests to the page this would be a horrible idea. I believe the correct way to do this is to use MySQL inherent function SUBSTRING_INDEX(str,delim,count) So for example:
SELECT SUBSTRING_INDEX(column_name, ' ', 20) FROM table_name
would return the first 20 words. The php way is over-doing it. If you can perform the logic in your mysql query, you should.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From MySQL manual: http://www.mysql.com/doc/S/t/String_functions.html
SUBSTRING_INDEX(str,delim,count) Returns the substring from string str before count occurrences of the delimiter delim. If count is positive, everything to the left of the final delimiter (counting from the left) is returned. If count is negative, everything to the right of the final delimiter (counting from the right) is returned: mysql> select SUBSTRING_INDEX('www.mysql.com', '.', 2); -> 'www.mysql' mysql> select SUBSTRING_INDEX('www.mysql.com', '.', -2); -> 'mysql.com'
This function is multi-byte safe. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hope this helps!
Robert V. Zwink DAID Development LLC http://www.zwink.net/daid.php
-----Original Message-----
From: Justin French [mailto:justin
indent.com.au]
Sent: Wednesday, August 08, 2001 7:25 AM
To: Chris Lambert; php
Subject: Re: [PHP] splitting text after 25 words
Thanks to all who replied, this solution by Chris was bar far the easiest to implement.
Really appreciate it :)
Chris Lambert wrote:
> $teaser = explode(" ", $article, 26)); > array_pop($teaser); > $teaser = implode(" ", $teaser);
Justin French
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
someting i've used.
<?php $storywords = explode(" ", $storytext);
for ($i=0;$i<25;$i++) { $teaser = $teaser . " " . $storywords[$i]; } ?>
<? echo "$teaser...";?>
At 03:57 PM 8/8/2001 +1100, Justin French wrote:
>Hi all,
>
>I'd like to split a text block at 25 words, as a teaser for the full
>article. Now I know how to split at a certain character, but i don't
>want a half word or anything, so I want (i guess) to hunt for the 25th
>occurence of " " (a space), and split $text into two new variables,
>$text_a and $text_b.
>
>Then I'll prolly want append something like "... click here to read
>more" on the end of $text_a.
>
>Seems easy enough, but I can't see anything in the manual about
>splitting on a numbered occurence of a string (but I could be looking
>in the wrong spot :)
>
>Running PHP4 BTW
>
>
>
>Thanks heaps in advance
>Justin French
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
_________________________________________________________
Do You Yahoo!?
Get your free
yahoo.com address at http://mail.yahoo.com
attached mail follows:
I think I saw a code to list the files, subdirectories and the files in the subdirectories of a simple directory in this list some time ago, but I didn't save it. Considering the quantitie of messages in this list, It's quite dificult to find this specific code, so ask the person who did it or someone else to write this code again.
I'm using this one:
$publico = ftp_nlist ($servidor, "public_html/publico"); $cont = 0; while ($publico[$cont]){ print "$publico[$cont]<br>"; $cont++;}
This code doesn't show the files in the subdirectories and it requires ftp connection. Not very efficient.
Thanks in advance.
Is there a problem if I just write "thanks in advance"??? It's easier then writting back to thanks everybody :)
attached mail follows:
kokubo
inf.univali.br (Eduardo Kokubo) wrote:
> I think I saw a code to list the files, subdirectories and the files > in the subdirectories of a simple directory in this list some time > ago, but I didn't save it. Considering the quantitie of messages in > this list, It's quite dificult to find this specific code, so ask the > person who did it or someone else to write this code again. > > I'm using this one: > > $publico = ftp_nlist ($servidor, "public_html/publico"); > $cont = 0; > while ($publico[$cont]){ > print "$publico[$cont]<br>"; > $cont++;} > > This code doesn't show the files in the subdirectories and it requires > ftp connection. Not very efficient. > > Thanks in advance. > > Is there a problem if I just write "thanks in advance"??? It's easier > then writting back to thanks everybody :) >
is this what your looking for?
function getDirContents($slashdir) { $dh = opendir($slashdir);
while (($file = readdir ($dh))) { if (is_dir($slashdir . $file) && $file != "." && $file != "..") { getDirContents ($slashdir . $file . "/"); } else if ($file != "." && $file != "..") { echo $file . "<br>"; } } closedir($dh); }
getDirContents("/test/");
-- Henrik Hansen
attached mail follows:
Try this
<?php
$level1 = 0; $baseurl = "http://$HTTP_HOST"; $base = './'; $basedir = opendir("$base");
while ($file = readdir($basedir)){ if ($file != '.' && $file != '..' && eregi(".htm","$file")) { print("<a href=$baseurl/$file>$baseurl/$file</a><BR>\n"); flush(); } if ($file != '.' && $file != '..' && is_dir("$base/$file") && $file != "_data") { $level1 = "$base/$file"; print("<a href=$baseurl/$file>$baseurl/$file</a><BR>\n"); flush();
$seconddir = opendir("$level1"); while ($folder = readdir($seconddir)) { if ($folder != '.' && $folder != '..' && eregi(".htm","$folder")){ print("<a href=$baseurl/$file/$folder>$baseurl/$file/$folder</a><BR>\n"); flush(); } if ($folder != '.' && $folder != '..' && is_dir("$base/$file/$folder") && $folder != "_data") { $level2 = "$level1/$folder"; print("<a href=$baseurl/$file/$folder>$baseurl/$file/$folder</a><BR>\n"); flush(); $thirddir = opendir("$level2"); while ($this = readdir($thirddir)){ if ($this != '.' && $this != '..' && eregi(".htm","$this")) { print("<a href=$baseurl/$file/$folder/$thibaseurl/$file/$folder/$this>$baseurl/$file/$ folder/$this</a><BR>\n"); flush(); } if ($this != '.' && $this != '..' && is_dir("$base/$file/$folder/$this") && $this != "_data") { $level3 = "$level2/$this"; print("<a href=$baseurl/$file/$folder/$this>$baseurl/$file/$folder/$this</a><BR>\n"); flush(); $forthdir = opendir("$level3"); while ($that = readdir($forthdir)) { if ($that != '.' && $that != '..' && eregi(".htm","$that")) { print("<a href=$baseurl/$file/$folder/$this/$that>$baseurl/$file/$folder/$this/$that</ a><BR>\n"); flush(); } if ($that != '.' && $that != '..' && is_dir("$base/$file/$folder/$this/$that") && $that != "_data") { $level4 = "$level3/$that"; print("<a href=$baseurl/$file/$folder/$this/$that>$baseurl/$file/$folder/$this/$that</ a><BR>\n"); flush();
$fithdir = opendir("$level4"); while ($some = readdir($fithdir)){ if ($some != '.' && $some != '..' && eregi(".htm","$some")) { print("<a href=$baseurl/$file/$folder/$this/$that/$some>$baseurl/$file/$folder/$this/$ that/$some</a><BR>\n"); flush(); } if ($some != '.' && $some != '..' && is_dir("$base/$file/$folder/$this/$that/$some") && $some != "_data") { $level5 = "$level4/$some"; print("<a href=$baseurl/$file/$folder/$this/$that/$some>$baseurl/$file/$folder/$this/$ that/$some</a><BR>\n"); flush();
$sixthdir = opendir("$level5"); while ($the = readdir($sixthdir)) { if ($the != '.' && $the != '..' && eregi(".htm","$the")){ print("<a href=$baseurl/$file/$folder/$this/$that/$some/$this/$that/$some/$the>$baseur l/$file/$folder/$this/$that/$some/$the</a><BR>\n"); flush(); } if ($the != '.' && $the != '..' && is_dir("$base/$file/$folder/$this/$that/$some/$the") && $the != "_data") {
$level6 = "$level5/$the"; print("<a href=$baseurl/$file/$folder/$this/$that/$some/$the>$baseurl/$file/$folder/$t his/$that/$some/$the</a><BR>\n"); flush();
$seventhdir = opendir("$level6"); while ($it = readdir($seventhdir)) { if ($it != '.' && $it != '..' && eregi(".htm","$it")){ print("<a href=$baseurl/$file/$folder/$this/$that/$some/$the/$it>$baseurl/$file/$folde r/$this/$that/$some/$the/$it</a><BR>\n"); flush(); } if ($it != '.' && $it != '..' && is_dir("$base/$file/$folder/$this/$that/$some/$the/$it") && $it != "_data") {
$level7 = "$level6/$it"; print("<a href=$baseurl/$file/$folder/$this/$that/$some/$the/$it>$baseurl/$file/$folde r/$this/$that/$some/$the/$it</a><BR>\n"); flush();
$eighthdir = opendir("$level7"); while ($deep = readdir($eighthdir)){ if ($deep1 != '.' && $deep1 != '..' && eregi(".htm","$deep1")){ print("<a href=$baseurl/$file/$folder/$this/$that/$some/$the/$it/$deep1>$baseurl/$file /$folder/$this/$that/$some/$the/$it/$deep1</a><BR>\n"); flush(); } if ($deep1 != '.' && $deep1 != '..' && is_dir("$base/$file/$folder/$this/$that/$some/$the/$it/$deep1") && $deep1 != "_data") { $level8 = "$level7/$deep1"; print("<a href=$baseurl/$file/$folder/$this/$that/$some/$the/$it/$deep1>$baseurl/$file /$folder/$this/$that/$some/$the/$it/$some/$the/$it/$deep1</a><BR>\n"); flush(); }} }} }} }} }} }} }} }} ?>
========================== Karl Phillipson PHP SQL Programmer
Saffron Hill Ventures 67 Clerkenwell Road London EC1R 5BL
Saffron Hill: 0207 693 8300 Direct Line: 0207 693 8318
-----Original Message-----
From: Eduardo Kokubo [mailto:kokubo
inf.univali.br]
Sent: 08 August 2001 13:52
To: php-general
lists.php.net
Cc: Eduardo Kokubo
Subject: [PHP] code to see files in directories
I think I saw a code to list the files, subdirectories and the files in the subdirectories of a simple directory in this list some time ago, but I didn't save it. Considering the quantitie of messages in this list, It's quite dificult to find this specific code, so ask the person who did it or someone else to write this code again.
I'm using this one:
$publico = ftp_nlist ($servidor, "public_html/publico"); $cont = 0; while ($publico[$cont]){ print "$publico[$cont]<br>"; $cont++;}
This code doesn't show the files in the subdirectories and it requires ftp connection. Not very efficient.
Thanks in advance.
Is there a problem if I just write "thanks in advance"??? It's easier then writting back to thanks everybody :)
attached mail follows:
I mean he will know all your sensitive information to enter your SQL server in couple of hours when server will be up again.
Youri
On 7 Aug 2001, at 14:40, Tyler Longren wrote:
> If the SQL server is down how will he hack it? That's like hacking a
> webserver that doesn't exist.
>
> Tyler Longren
> Captain Jack Communications
> tyler
captainjack.com
> www.captainjack.com
>
>
> On Tue, 7 Aug 2001 21:35:58 +0200
> "BRACK" <brak
nettaxi.com> wrote:
>
> > I just wanned to bring the issue of security of MySQL connection:
> >
> > Let us imagine that SQL server was down for some hours (of
> > course without us knowing it) and at the same hours our SQL site
> > was visited by some kind of hacker, he can see on his screen all
> > our SQL connection info like username, password, and database
> > name. You may hide this information in different file than the file
> > that your users open then the hacker will see something like
> > "include("connect.inc");" or "require("connect.inc");" (of course IF
> > server is down). So you may only imagine the consequences of
> > this visit of the hacker. What can we do to protect our sensitive
> > information if SQL server is down?
> >
> > Youri
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
If you have Apache and MySQL servers make this experiment - start Apache but "forget" to start SQL and go to your site http://localhost/... you will see yourself all the information on the screen.
Youri
On 7 Aug 2001, at 12:53, Ryan Christensen wrote:
> I'm curious as to how the "hacker" would see all this information (the
> username.. password, etc..) just by going to a site where the SQL backend
> was down?
>
> Ryan
>
> > -----Original Message-----
> > From: BRACK [mailto:brak
nettaxi.com]
> > Sent: Tuesday, August 07, 2001 12:36 PM
> > To: php-general
lists.php.net
> > Subject: [PHP] MySQL connection
> >
> >
> > I just wanned to bring the issue of security of MySQL connection:
> >
> > Let us imagine that SQL server was down for some hours (of
> > course without us knowing it) and at the same hours our SQL site
> > was visited by some kind of hacker, he can see on his screen all
> > our SQL connection info like username, password, and database
> > name. You may hide this information in different file than the file
> > that your users open then the hacker will see something like
> > "include("connect.inc");" or "require("connect.inc");" (of course IF
> > server is down). So you may only imagine the consequences of
> > this visit of the hacker. What can we do to protect our sensitive
> > information if SQL server is down?
> >
> > Youri
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
attached mail follows:
Yes that is what I mean, but also When I played with my Apache I saw ALL my information on the screen without any error message. Actually it maybe that my PHP server was down at that moment as well, well, I must check it up
Youri
On 7 Aug 2001, at 13:00, Bjorn Van Simaeys wrote:
> Hi,
>
>
> I think BRACK a.k.a. Jouri means that the connection
> string (from the PHP pages) would be visible in the
> client's browser once the SQL server stops running.
> However, I am not so sure about this as all commands
> are processed on the server - it will, however display
> an error message that the SQL server is inaccessible.
>
>
> Greetz,
> Bjorn Van Simaeys
> www.bvsenterprises.com
>
>
>
> --- Tyler Longren <tyler
captainjack.com> wrote:
> > If the SQL server is down how will he hack it?
> > That's like hacking a
> > webserver that doesn't exist.
> >
> > Tyler Longren
> > Captain Jack Communications
> > tyler
captainjack.com
> > www.captainjack.com
> >
> >
> > On Tue, 7 Aug 2001 21:35:58 +0200
> > "BRACK" <brak
nettaxi.com> wrote:
> >
> > > I just wanned to bring the issue of security of
> > MySQL connection:
> > >
> > > Let us imagine that SQL server was down for some
> > hours (of
> > > course without us knowing it) and at the same
> > hours our SQL site
> > > was visited by some kind of hacker, he can see on
> > his screen all
> > > our SQL connection info like username, password,
> > and database
> > > name. You may hide this information in different
> > file than the file
> > > that your users open then the hacker will see
> > something like
> > > "include("connect.inc");" or
> > "require("connect.inc");" (of course IF
> > > server is down). So you may only imagine the
> > consequences of
> > > this visit of the hacker. What can we do to
> > protect our sensitive
> > > information if SQL server is down?
> > >
> > > Youri
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail:
> > php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail:
> > php-general-help
lists.php.net
> > > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> > php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail:
> > php-general-help
lists.php.net
> > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
<>< <>< <>< <>< God is our provider ><> ><> ><> ><> http://www.body-builders.org
attached mail follows:
Hey Jouri,
I don't agree with this one. I tested it out on my localhost and got the two error messages I told you I was going to get:
Warning: Unknown MySQL Server Host... Warning: MySQL Connection Failed...
No usernames/passwords. I have to say however that I always include my connect.php file. Maybe that's a secure way to connect without anyone seeing your password in case of sqlserver problems.
Greetz, Bjorn Van Simaeys www.bvsenterprises.com
--- BRACK <brak
nettaxi.com> wrote:
> If you have Apache and MySQL servers make this
> experiment -
> start Apache but "forget" to start SQL and go to
> your site
> http://localhost/... you will see yourself all the
> information on the
> screen.
>
> Youri
>
> On 7 Aug 2001, at 12:53, Ryan Christensen wrote:
>
> > I'm curious as to how the "hacker" would see all
> this information (the
> > username.. password, etc..) just by going to a
> site where the SQL backend
> > was down?
> >
> > Ryan
> >
> > > -----Original Message-----
> > > From: BRACK [mailto:brak
nettaxi.com]
> > > Sent: Tuesday, August 07, 2001 12:36 PM
> > > To: php-general
lists.php.net
> > > Subject: [PHP] MySQL connection
> > >
> > >
> > > I just wanned to bring the issue of security of
> MySQL connection:
> > >
> > > Let us imagine that SQL server was down for some
> hours (of
> > > course without us knowing it) and at the same
> hours our SQL site
> > > was visited by some kind of hacker, he can see
> on his screen all
> > > our SQL connection info like username,
> password, and database
> > > name. You may hide this information in different
> file than the file
> > > that your users open then the hacker will see
> something like
> > > "include("connect.inc");" or
> "require("connect.inc");" (of course IF
> > > server is down). So you may only imagine the
> consequences of
> > > this visit of the hacker. What can we do to
> protect our sensitive
> > > information if SQL server is down?
> > >
> > > Youri
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail:
> php-general-help
lists.php.net
> > > To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
> > >
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
hi,
there are 2 ways.
1. you hardcore the user/password in the php.ini file. 2. u do a simply error checking like :
<?php $connect = mysql_connect($host, $user, $pass); if(!$connect) { print "connection failed"; }
?>
of course you could also do like kinda header("Location: http://host"); instead of print "connection failed".
i hope i could help you.
best regards attila strauss
> Hey Jouri,
>
>
> I don't agree with this one. I tested it out on my
> localhost and got the two error messages I told you I
> was going to get:
>
> Warning: Unknown MySQL Server Host...
> Warning: MySQL Connection Failed...
>
> No usernames/passwords. I have to say however that I
> always include my connect.php file. Maybe that's a
> secure way to connect without anyone seeing your
> password in case of sqlserver problems.
>
>
> Greetz,
> Bjorn Van Simaeys
> www.bvsenterprises.com
>
>
>
>
> --- BRACK <brak
nettaxi.com> wrote:
> > If you have Apache and MySQL servers make this
> > experiment -
> > start Apache but "forget" to start SQL and go to
> > your site
> > http://localhost/... you will see yourself all the
> > information on the
> > screen.
> >
> > Youri
> >
> > On 7 Aug 2001, at 12:53, Ryan Christensen wrote:
> >
> > > I'm curious as to how the "hacker" would see all
> > this information (the
> > > username.. password, etc..) just by going to a
> > site where the SQL backend
> > > was down?
> > >
> > > Ryan
> > >
> > > > -----Original Message-----
> > > > From: BRACK [mailto:brak
nettaxi.com]
> > > > Sent: Tuesday, August 07, 2001 12:36 PM
> > > > To: php-general
lists.php.net
> > > > Subject: [PHP] MySQL connection
> > > >
> > > >
> > > > I just wanned to bring the issue of security of
> > MySQL connection:
> > > >
> > > > Let us imagine that SQL server was down for some
> > hours (of
> > > > course without us knowing it) and at the same
> > hours our SQL site
> > > > was visited by some kind of hacker, he can s
ee
> > on his screen all
> > > > our SQL connection info like username,
> > password, and database
> > > > name. You may hide this information in different
> > file than the file
> > > > that your users open then the hacker will see
> > something like
> > > > "include("connect.inc");" or
> > "require("connect.inc");" (of course IF
> > > > server is down). So you may only imagine the
> > consequences of
> > > > this visit of the hacker. What can we do to
> > protect our sensitive
> > > > information if SQL server is down?
> > > >
> > > > Youri
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail:
> > php-general-unsubscribe
lists.php.net
> > > > For additional commands, e-mail:
> > php-general-help
lists.php.net
> > > > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> > php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail:
> > php-general-help
lists.php.net
> > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Ha ha... "hardcore the user/password"
Sorry... I realize you gave a good answer, just had to laugh. :)
-----Original Message-----
From: Attila Strauss [mailto:shortys
gmx.li]
Sent: Wednesday, August 08, 2001 1:33 PM
To: php-general
lists.php.net
Subject: Re: [PHP] MySQL connection
hi,
there are 2 ways.
1. you hardcore the user/password in the php.ini file. 2. u do a simply error checking like :
<?php $connect = mysql_connect($host, $user, $pass); if(!$connect) { print "connection failed"; }
?>
of course you could also do like kinda header("Location: http://host"); instead of print "connection failed".
i hope i could help you.
best regards attila strauss
> Hey Jouri,
>
>
> I don't agree with this one. I tested it out on my
> localhost and got the two error messages I told you I
> was going to get:
>
> Warning: Unknown MySQL Server Host...
> Warning: MySQL Connection Failed...
>
> No usernames/passwords. I have to say however that I
> always include my connect.php file. Maybe that's a
> secure way to connect without anyone seeing your
> password in case of sqlserver problems.
>
>
> Greetz,
> Bjorn Van Simaeys
> www.bvsenterprises.com
>
>
>
>
> --- BRACK <brak
nettaxi.com> wrote:
> > If you have Apache and MySQL servers make this
> > experiment -
> > start Apache but "forget" to start SQL and go to
> > your site
> > http://localhost/... you will see yourself all the
> > information on the
> > screen.
> >
> > Youri
> >
> > On 7 Aug 2001, at 12:53, Ryan Christensen wrote:
> >
> > > I'm curious as to how the "hacker" would see all
> > this information (the
> > > username.. password, etc..) just by going to a
> > site where the SQL backend
> > > was down?
> > >
> > > Ryan
> > >
> > > > -----Original Message-----
> > > > From: BRACK [mailto:brak
nettaxi.com]
> > > > Sent: Tuesday, August 07, 2001 12:36 PM
> > > > To: php-general
lists.php.net
> > > > Subject: [PHP] MySQL connection
> > > >
> > > >
> > > > I just wanned to bring the issue of security of
> > MySQL connection:
> > > >
> > > > Let us imagine that SQL server was down for some
> > hours (of
> > > > course without us knowing it) and at the same
> > hours our SQL site
> > > > was visited by some kind of hacker, he can s
ee
> > on his screen all
> > > > our SQL connection info like username,
> > password, and database
> > > > name. You may hide this information in different
> > file than the file
> > > > that your users open then the hacker will see
> > something like
> > > > "include("connect.inc");" or
> > "require("connect.inc");" (of course IF
> > > > server is down). So you may only imagine the
> > consequences of
> > > > this visit of the hacker. What can we do to
> > protect our sensitive
> > > > information if SQL server is down?
> > > >
> > > > Youri
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail:
> > php-general-unsubscribe
lists.php.net
> > > > For additional commands, e-mail:
> > php-general-help
lists.php.net
> > > > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail:
> > php-general-help
lists.php.net
> > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo!
> Messenger http://phonecard.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net To
> contact the list administrators, e-mail: php-list-admin
lists.php.net
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Richard,
Check out http://marc.theaimsgroup.com The WWW section contains many PHP list archives.
I couldn't live without this resource.
Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers
> -----Original Message-----
> From: Richard Baskett [mailto:rickbaskett
home.com]
> Sent: Wednesday, August 08, 2001 9:19 AM
> To: php-general
lists.php.net
> Subject: Re: [PHP] PHP Editor
>
>
> I would have had no clue that there was an archive, so it's good to know.
> Thanks!
>
>
> >> What tool do you recommend to compose PHP pages?
> >>
> >> I am traditionaly an ASP developer and I have always used Ultradev and
> >> Interdev.
> >
> > Welcome to the club..
> >
> > If you take a moment to search the archive.. this question has
> ben answered
> > quite a few times in the last month.
> >
> > Bye,
> >
> >
> > B.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
I wish it did.
Still the same problem.
<?php session_start(); global $count; session_register ("count"); $count++; ?>
Hello visitor, you have seen this page <?php echo $HTTP_SESSION_VARS["count"]; ?> times.<p>
http://www.militarycity.com/classified/realtors/count.php
Chad
-----Original Message-----
From: karthik [mailto:karthik
ccipl.com]
Sent: Sunday, July 08, 2001 1:08 AM
To: Chad Day
Subject: Re: [PHP] Session problem
Hi,
Have u tried $HTTP_SESSION_VARS["NAME"] ?
Try it. I am sure it will work.
Karthik
----- Original Message -----
From: "Chad Day" <cday
atpco.com>
To: "mike cullerton" <php-l
bakednotfried.com>; <php-general
lists.php.net>
Sent: Tuesday, August 07, 2001 6:46 PM
Subject: RE: [PHP] Session problem
> I tried this, I still have the same problem. Is this a bug in the version
> of PHP I am running?
>
> Chad
>
> -----Original Message-----
> From: mike cullerton [mailto:php-l
bakednotfried.com]
> Sent: Monday, August 06, 2001 4:58 PM
> To: Chad Day; php-general
lists.php.net
> Subject: Re: [PHP] Session problem
>
>
> i would try
>
> session_start();
> session_register("NAME");
>
> $res = mysql_query("SELECT NAME FROM dbhere where EMAIL = '$EMAIL' AND
> PASSWORD = '$PASSWORD'");
>
> if ($row = mysql_fetch_array($res)) {
> $NAME = $row[NAME];
> }
>
> notice that $NAME is registered before being assigned to.
>
> on 8/6/01 2:23 PM, Chad Day at cday
atpco.com wrote:
>
> > PHP 4.0.2 ..
> >
> > I have a very basic script, gets the user's name, registers it, then
> > displays "Welcome, $NAME." $NAME is the session registered name.
> >
> > If I constantly reload that page that says Welcome, sometimes $NAME
> appears,
> > sometimes not. Completely random. It just loses track of the variable.
> >
> > My code:
> >
> > auth.php:
> >
> > session_start();
> >
> > ...
> >
> > $res = mysql_query("SELECT NAME FROM dbhere where EMAIL = '$EMAIL' AND
> > PASSWORD = '$PASSWORD'");
> >
> > if ($row = mysql_fetch_array($res)) {
> > $NAME = $row[NAME];
> > session_register("NAME");
> > }
> >
> > ...
> >
> > Header("Location: menu.php");
> >
> >
> >
> > menu.php:
> >
> > session_start();
> >
> > echo "Welcome, $NAME";
> >
> >
> >
> > So like, what the hell. Why would it keep losing track of $NAME?
> >
> > Thanks,
> > Chad
> >
>
>
> -- mike cullerton
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
On Wednesday, August 08, 2001 at 9:16 AM, Chad Day said: > I wish it did. > > Still the same problem. > > <?php > session_start(); > global $count; > session_register ("count"); > $count++; > ?> > > Hello visitor, you have seen this page <?php echo > $HTTP_SESSION_VARS["count"]; ?> times.<p>
You're asking the session to remember a value ( session_register() ), then changing that value ( $count++ ) and not re-registering it, then complaining when the session returns the value you asked it to remember.
What if you did:
<?php session_start(); $count++; session_register ("count"); ?>
- Brian
----------------------------------- Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 -----------------------------------
attached mail follows:
Nope. Same problem. I'm seriously thinking there's a bug in the version of PHP I am running at this point, but I searched php.net and found no mention of anything ..
Chad
-----Original Message-----
From: Brian Dunworth [mailto:brian
theprintinghouse.com]
Sent: Wednesday, August 08, 2001 10:37 AM
To: php-general
lists.php.net
Cc: 'Chad Day'
Subject: RE: [PHP] Session problem
On Wednesday, August 08, 2001 at 9:16 AM, Chad Day said: > I wish it did. > > Still the same problem. > > <?php > session_start(); > global $count; > session_register ("count"); > $count++; > ?> > > Hello visitor, you have seen this page <?php echo > $HTTP_SESSION_VARS["count"]; ?> times.<p>
You're asking the session to remember a value ( session_register() ), then changing that value ( $count++ ) and not re-registering it, then complaining when the session returns the value you asked it to remember.
What if you did:
<?php session_start(); $count++; session_register ("count"); ?>
- Brian
----------------------------------- Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 -----------------------------------
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Maybe you have your cookies turned off in your browser? Something that is easily forgotten..
Greetz, Bjorn Van Simaeys www.bvsenterprises.com
--- Chad Day <cday
atpco.com> wrote:
> Nope. Same problem. I'm seriously thinking there's
> a bug in the version of
> PHP I am running at this point, but I searched
> php.net and found no mention
> of anything ..
>
> Chad
>
> -----Original Message-----
> From: Brian Dunworth
> [mailto:brian
theprintinghouse.com]
> Sent: Wednesday, August 08, 2001 10:37 AM
> To: php-general
lists.php.net
> Cc: 'Chad Day'
> Subject: RE: [PHP] Session problem
>
>
>
> On Wednesday, August 08, 2001 at 9:16 AM, Chad Day
> said:
> > I wish it did.
> >
> > Still the same problem.
> >
> > <?php
> > session_start();
> > global $count;
> > session_register ("count");
> > $count++;
> > ?>
> >
> > Hello visitor, you have seen this page <?php echo
> > $HTTP_SESSION_VARS["count"]; ?> times.<p>
>
>
> You're asking the session to remember a value (
> session_register() ), then
> changing that value ( $count++ ) and not
> re-registering it, then complaining
> when the session returns the value you asked it to
> remember.
>
> What if you did:
>
> <?php
> session_start();
> $count++;
> session_register ("count");
> ?>
>
>
> - Brian
>
> -----------------------------------
> Brian S. Dunworth
> Sr. Software Development Engineer
> Oracle Database Administrator
> The Printing House, Ltd.
> (850) 875-1500 x225
> -----------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
No, as the way I'm getting around this right now is I'm -using- cookies. Plus, I gave the URL, so you guys could see what is happening .. it's not a client-side issue.
Sorry if I sound frustrated, but I really am at this point. :)
The URL again is: http://www.militarycity.com/classified/realtors/count.php
Chad
-----Original Message-----
From: Bjorn Van Simaeys [mailto:cyberplasma
yahoo.com]
Sent: Wednesday, August 08, 2001 1:09 PM
To: php-general
lists.php.net
Subject: RE: [PHP] Session problem
Maybe you have your cookies turned off in your browser? Something that is easily forgotten..
Greetz, Bjorn Van Simaeys www.bvsenterprises.com
--- Chad Day <cday
atpco.com> wrote:
> Nope. Same problem. I'm seriously thinking there's
> a bug in the version of
> PHP I am running at this point, but I searched
> php.net and found no mention
> of anything ..
>
> Chad
>
> -----Original Message-----
> From: Brian Dunworth
> [mailto:brian
theprintinghouse.com]
> Sent: Wednesday, August 08, 2001 10:37 AM
> To: php-general
lists.php.net
> Cc: 'Chad Day'
> Subject: RE: [PHP] Session problem
>
>
>
> On Wednesday, August 08, 2001 at 9:16 AM, Chad Day
> said:
> > I wish it did.
> >
> > Still the same problem.
> >
> > <?php
> > session_start();
> > global $count;
> > session_register ("count");
> > $count++;
> > ?>
> >
> > Hello visitor, you have seen this page <?php echo
> > $HTTP_SESSION_VARS["count"]; ?> times.<p>
>
>
> You're asking the session to remember a value (
> session_register() ), then
> changing that value ( $count++ ) and not
> re-registering it, then complaining
> when the session returns the value you asked it to
> remember.
>
> What if you did:
>
> <?php
> session_start();
> $count++;
> session_register ("count");
> ?>
>
>
> - Brian
>
> -----------------------------------
> Brian S. Dunworth
> Sr. Software Development Engineer
> Oracle Database Administrator
> The Printing House, Ltd.
> (850) 875-1500 x225
> -----------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> > > <?php > > > session_start(); > > > global $count; > > > session_register ("count"); > > > $count++; > > > ?> > > > > > > Hello visitor, you have seen this page <?php echo > > > $HTTP_SESSION_VARS["count"]; ?> times.<p>
There was a bug in PHP in versions prior to 4.0.6: $count and $HTTP_SESSION_VARS["count"] did not reference the same value while on the *current* page. Try this:
<?php session_start(); $count++; session_register ("count"); ?> Hello visitor, you have seen this page <?php echo $count; ?> times.
Kirk
attached mail follows:
Still not working. My script is -exactly- as you have it below, and I believe I've tried that before.
(begins pulling out hair)
Chad
-----Original Message-----
From: Johnson, Kirk [mailto:kjohnson
zootweb.com]
Sent: Wednesday, August 08, 2001 2:31 PM
To: php-general
lists.php.net
Subject: RE: [PHP] Session problem
> > > <?php > > > session_start(); > > > global $count; > > > session_register ("count"); > > > $count++; > > > ?> > > > > > > Hello visitor, you have seen this page <?php echo > > > $HTTP_SESSION_VARS["count"]; ?> times.<p>
There was a bug in PHP in versions prior to 4.0.6: $count and $HTTP_SESSION_VARS["count"] did not reference the same value while on the *current* page. Try this:
<?php session_start(); $count++; session_register ("count"); ?> Hello visitor, you have seen this page <?php echo $count; ?> times.
Kirk
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
What it looks like it is doing to me, if you hit the script and reload it a bunch, is it creates a session, sticks with it for a while, then dumps it .. it then creates another session, starts over at 1, and begins counting up.. then sometimes it will see the old session, and go back to it ..
Like, this will happen:
You've seen this page 1 times (not gonna repeat the text) 2 3 4 5 1 // lost 1st session here 2 6 // regain 1st session 3 // switch 7 8 9 4 // switch
no matter how many times I reload that page, it seems to generate a max of 2 sessions. wtf is going on?
Chad
-----Original Message-----
From: Chad Day [mailto:cday
atpco.com]
Sent: Wednesday, August 08, 2001 2:36 PM
To: Johnson, Kirk; php-general
lists.php.net
Subject: RE: [PHP] Session problem
Still not working. My script is -exactly- as you have it below, and I believe I've tried that before.
(begins pulling out hair)
Chad
-----Original Message-----
From: Johnson, Kirk [mailto:kjohnson
zootweb.com]
Sent: Wednesday, August 08, 2001 2:31 PM
To: php-general
lists.php.net
Subject: RE: [PHP] Session problem
> > > <?php > > > session_start(); > > > global $count; > > > session_register ("count"); > > > $count++; > > > ?> > > > > > > Hello visitor, you have seen this page <?php echo > > > $HTTP_SESSION_VARS["count"]; ?> times.<p>
There was a bug in PHP in versions prior to 4.0.6: $count and $HTTP_SESSION_VARS["count"] did not reference the same value while on the *current* page. Try this:
<?php session_start(); $count++; session_register ("count"); ?> Hello visitor, you have seen this page <?php echo $count; ?> times.
Kirk
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> What it looks like it is doing to me, if you hit the script > and reload it a > bunch, is it creates a session, sticks with it for a while, > then dumps it .. > it then creates another session, starts over at 1, and begins > counting up.. > then sometimes it will see the old session, and go back to it ..
Sorry, I'm stuck. I did a cut and paste of the code I sent and it works perfectly:
Hello visitor, you have seen this page 100 times.
I am using IE 5.5. There have been similar reports of session weirdness from time to time when using Netscape 4.x. It is hard to see how the browser could be doing this, but maybe there is a sporadic bug in its cookie handling.
Try changing browsers and see if you still see the problem. I really don't have any suggestions for fixing it, tho. Sorry.
Kirk
attached mail follows:
> What it looks like it is doing to me, if you hit the script > and reload it a > bunch, is it creates a session, sticks with it for a while, > then dumps it .. > it then creates another session, starts over at 1, and begins > counting up.. > then sometimes it will see the old session, and go back to it ..
One final long shot: are you running the application on a load-balanced server farm? That can cause problems unless things are set up correctly.
Kirk
attached mail follows:
I seem to recall that you can call a PHP script with a slash after it then variables. For instance http://localhost/script.php/your=mom. I can't find it in the manual, and was wondering if anyone knows how it works.
attached mail follows:
I think you think to the GET method :
http://www.mysite.com/script.php?your=mom
At 06:13 08/08/01 -0700, Evan Nemerson wrote:
>I seem to recall that you can call a PHP script with a slash after it then
>variables. For instance http://localhost/script.php/your=mom. I can't find it
>in the manual, and was wondering if anyone knows how it works.
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
---------------------------------------------------------------- EuroVox 4, place Félix Eboue 75583 Paris Cedex 12 Tel : 01 44 67 05 05 Fax : 01 44 67 05 19 Web : http://www.eurovox.fr ----------------------------------------------------------------
attached mail follows:
It works pretty much as you described. :)
Make a script like that and run phpinfo() from it and you'll see all the variations on $PHP_SELF and $HTTP_SERVER_VARS[] that allow you to retrieve the extra parameters from the URL.
Note that if your page displays images, you'll need to include a <base href="..."> tag to stop the browser from getting confused.
I use this all over the place and it works great.
There's also a variant with the Apache ForceType directive that allows you to just do stuff like www.mysite.com/myscript/foo/bar/123 where 'myscript' is really a php file. It's well-discussed in the archives and at phpbuilder.
- Tim http://www.phptemplates.org
On 08 Aug 2001 06:13:14 -0700, Evan Nemerson wrote:
> I seem to recall that you can call a PHP script with a slash after it then
> variables. For instance http://localhost/script.php/your=mom. I can't find it
> in the manual, and was wondering if anyone knows how it works.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi folks
Something I find confusing about using UCD-SNMP with PHP 4.0.6 is that I can't pass something such as:
enterprises.cisco.workgroup.ciscoStackMIB.portGrp.portTable.portEntry.portName
to snmpwalkoid - it sits around, then complains that this is an invalid object identifier.
Is it possible to get PHP to translate "textual" OIDs in to numeric OIDs, and vice versa? Automatically?
Peter.
--- Peter Hicks e-mail: peter.hicks(at)poggs.co.uk Network Architect web: http://www.poggs.com/ Poggs Computer Services bobcode: K l E++++ m2 C B-x O L S++++ T A H b6 D1
attached mail follows:
Hello all, I've been trying to find a good regular expression pattern to find URLs. I have found some that work fine when the protocol is included ie http://www.php.net . But I can not find one that will find www.php.net . Does anyone know where a good database of Regular expressions can be found? or have a regular expression that can do this?
cheers, Marc Davenport
attached mail follows:
$line = htmlentities(stripslashes($line));
$line = nl2br($line);
$line = eregi_replace("\[(link|url)=(.*)\](.*)\[/(link|url)\]","<a
href=\"\\2\" target=\"_blank\">\\3</a>",$line);
$line = eregi_replace("\[color=(.*)](.*)\[/color\]", "<font
color=\"\\1\">\\2</font>", $line);
$line =
eregi_replace("\[(blockquote|indent)\](.*)\[/(blockquote|indent)\]",
"<blockquote>\\2</blockquote>", $line);
$line = eregi_replace("\[(img|image)\](.*)\[/(img|image)\]","<img
src=\"\\2\">",$line);
$line =
eregi_replace("\[(/?(b|hr|center|p|h1|h2|h3|h4|h5|h6|pre|u|i))\]","<\\1>",$l
ine);
// Auto-linking code. Converts http, ftp, and www URL's, and email
address, into a hyperlink
$line =
eregi_replace("([[:space:]])((f|ht)tp:\/\/[a-z0-9~#%
\&:=?\/\._-]+[a-z0-9~#%
\&=?\/_-]+)", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $line);
//http
$line =
eregi_replace("([[:space:]])(www\.[a-z0-9~#%
\&:=?\/\._-]+[a-z0-9~#%
\&=?\/_
-]+)", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $line); //
www.
$line =
eregi_replace("([[:space:]])([_\.0-9a-z-]+
([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}
)","\\1<a href=\"mailto:\\2\">\\2</a>", $line); // mail
$line =
eregi_replace("^((f|ht)tp:\/\/[a-z0-9~#%
\&:=?\/\._-]+[a-z0-9~#%
\&=?\/_-]+)
", "<a href=\"\\1\" target=\"_blank\">\\1</a>", $line); //http
$line =
eregi_replace("^(www\.[a-z0-9~#%
\&:=?\/\._-]+[a-z0-9~#%
\&=?\/_-]+)", "<a
href=\"http://\\1\" target=\"_blank\">\\1</a>", $line); // www.
$line =
eregi_replace("^([_\.0-9a-z-]+
([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})","<a
href=\"mailto:\\1\">\\1</a>", $line); // mail
$line = eregi_replace("
","@",$line);
$line = str_replace(" ", " ", $line);
$line = str_replace("[indent]", "<blockquote>", $line);
$line = str_replace("[/indent]", "</blockquote>", $line);
$line = str_replace("(TM)", "<FONT SIZE=1><SUP>TM</SUP></FONT>",
$line);
$line = str_replace("\t",
" ", $line);
echo $line;
----- Original Message -----
From: "Marc Davenport" <md261897
oak.cats.ohiou.edu>
To: <php-general
lists.php.net>
Sent: Wednesday, August 08, 2001 11:38 PM
Subject: [PHP] Regular expressions
> Hello all,
> I've been trying to find a good regular expression pattern to find
> URLs. I have found some that work fine when the protocol is included ie
> http://www.php.net . But I can not find one that will find www.php.net .
> Does anyone know where a good database of Regular expressions can be
> found? or have a regular expression that can do this?
>
> cheers,
> Marc Davenport
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
function TrimString($sString,$iLen=125){ $retstring=strtok($sString," ")." "; do { if(!$tmp=strtok(" ")." ") break; $retstring.=$tmp; } while(strlen($retstring)<$iLen); if(strlen($retstring)<strlen(trim($sString))) $retstring .="..."; return $retstring; } // end function
Jamie Saunders wrote:
> Hi, > > What I'd like to do is take a string (paragraph) of text consisting of say > 500 words and display only the first 100 words. Is there a function able to > do this? > > Thanks. > > Jamie
attached mail follows:
If you are using MySQL use the function:
SELECT SUBSTRING_INDEX(column_name, ' ', 100) FROM table_name
would return the first 100 words.
This is in the MySQL manual, this was also answered earier on the list.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From MySQL manual: http://www.mysql.com/doc/S/t/String_functions.html
SUBSTRING_INDEX(str,delim,count) Returns the substring from string str before count occurrences of the delimiter delim. If count is positive, everything to the left of the final delimiter (counting from the left) is returned. If count is negative, everything to the right of the final delimiter (counting from the right) is returned: mysql> select SUBSTRING_INDEX('www.mysql.com', '.', 2); -> 'www.mysql' mysql> select SUBSTRING_INDEX('www.mysql.com', '.', -2); -> 'mysql.com'
This function is multi-byte safe. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Robert V. Zwink DAID Development LLC http://www.zwink.net/daid.php
-----Original Message-----
From: Jon Farmer [mailto:jonfarmer
enta.net]
Sent: Wednesday, August 08, 2001 4:19 AM
To: Alfredeen, Johan; 'Jamie Saunders'
Cc: php-general
lists.php.net
Subject: RE: [PHP] selecting words
>There was a post earlier very similar to this. If you have a database, you >could use SELECT LEFT(mycolumn, 100) FROM mytable WHERE ...
>Without a db, you can use the PHP substring function:
>substr()
Except that would return the first 100 characters and not the first 100 words as requested.
To do this you would need to find the 100th space in the string and use everything before that. I would probably explode the string and loop through the first one hundred elements to reconstruct the string with the first one hundred words.
Regards
Jon
Jon Farmer Systems Programmer Entanet International Ltd www.enta.net Tel 01952 428969 Mob 07968 524175
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Testing.. Check, check, 1 2..2..
attached mail follows:
Hi.
Does anybody know of any issues in PHP 4.0B2 regarding to the handling of session variables on different networks?
Here is the problem. I have written a user authentication system using
session variables. When the user logs in their name and pass are stored as
an associative array (with other details from a database). If the details
are invalid the user is booted back to the logon screen. The system worked
fine for everyone except myself and one other person who was on the same
network (optus
home network).
The problem was that although the username and password were sent and stored
into the session variables, upon accessing another page the session
variables were not carried forward (although the session id was) and so I
was thrown back to the login. As I said, this was only true for users on the
optus
home network. Fpr anyone else it seemed to be fine.
Identical code on a server running PGP 4.0.4pl1 worked universally. I have been tearing my remaining hair out for days on this one now. Does anyone have any suggestions (except for 'Upgrade PHP on the 4.0B2 server' or 'move to a different server'. That, unfortunately is beyond my control :( )
Cheers
Lee
attached mail follows:
> Does anybody know of any issues in PHP 4.0B2 regarding to the handling of > session variables on different networks?
That little "B2" in the version number almost guarantees that there will be problems of some sort.
> Does > anyone have any suggestions (except for 'Upgrade PHP on the 4.0B2 server' or > 'move to a different server'. That, unfortunately is beyond my control :( )
I suspect that's about all you can do. You can search the bug database at php.net to see if there is a specific problem and if there are any work-arounds.
- Tim
attached mail follows:
Any ideas ?
Regards, Darius Ivanauskas
attached mail follows:
On Wed, Aug 08, 2001 at 04:43:15PM +0200, Darius Ivanauskas wrote: > Any ideas ?
fatal errors cannot be caught in user-space as of now.
tc
attached mail follows:
> If( strcmp($voorraad[1],'on') == 0 ) > // it's checked > else > // it's not
Alternatively, fix your HTML by using quotes and a value attribute:
<INPUT TYPE="checkbox" name="voorraad" value="something" checked>
Then:
if ($voorraad=='something') { // checked }
- Colin
attached mail follows:
Hey Colin,
You will need some javascript to handle the checkbox' onchange event because when the user clicks the checkbox off and back on, the value will be 'on' - and your if-condition will not work!
Greetz, Bjorn Van Simaeys www.bvsenterprises.com
--- Colin Viebrock <colin
easydns.com> wrote:
> > If( strcmp($voorraad[1],'on') == 0 )
> > // it's checked
> > else
> > // it's not
>
> Alternatively, fix your HTML by using quotes and a
> value attribute:
>
> <INPUT TYPE="checkbox" name="voorraad"
> value="something" checked>
>
> Then:
>
> if ($voorraad=='something') {
> // checked
> }
>
>
> - Colin
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
> You will need some javascript to handle the checkbox' > onchange event because when the user clicks the > checkbox off and back on, the value will be 'on' - and > your if-condition will not work!
Uh, no.
<INPUT TYPE="checkbox" name="voorraad" value="something" checked>
When you submit the form, $voorraad will either be "something" or "", depending on whether it was checked or not.
http://devel.easydns.com/~cmv/checkbox.php http://devel.easydns.com/~cmv/checkbox.phps (source)
onChange stuff is only if you want to do Javascript processing client-side.
- Colin
attached mail follows:
> -----Original Message-----
> From: Drew P. Vogel [mailto:dvogel
intercarve.net]
> Sent: Tuesday, August 07, 2001 8:51 PM
> To: php-general
lists.php.net
> Subject: [PHP] 3rd include
>
>
> Has the "3rd include" bug (where variable definitions are
> "lost" at the 3rd include), been fixed yet?
The obvious way to answer this question would be to look it up in the database at bugs.php.net. Any idea whether it's actually gotten entered there? (I tried searching for '3rd', 'third', and 'three' -- 'include' just got way more results than I was interested in sifting through -- and didn't see anything that appeared to match what you're describing...
--- Mark Roedel | "This is the perversity of software. It Systems Programmer | is *always* more complex than you LeTourneau University | anticipate, even when you know this and Longview, Texas, USA | compensate for it." --Robert Martin
attached mail follows:
> Has the "3rd include" bug (where variable definitions ar > "lost" at the 3rd > include), been fixed yet? > > --Drew Vogel
Drew, I hadn't heard about this one. If you find anything, would you please post back your results to the list?
TIA
Kirk
attached mail follows:
I searched the database and did not find anything. I was not sure if the bug could possibly be entered under a different title, though. It is discussed in the manual errata for the include() function, so I would assume the developers at least know of it.
--Drew Vogel
On Wed, 8 Aug 2001, Mark Roedel wrote:
>> -----Original Message-----
>> From: Drew P. Vogel [mailto:dvogel
intercarve.net]
>> Sent: Tuesday, August 07, 2001 8:51 PM
>> To: php-general
lists.php.net
>> Subject: [PHP] 3rd include
>>
>>
>> Has the "3rd include" bug (where variable definitions are
>> "lost" at the 3rd include), been fixed yet?
>
>The obvious way to answer this question would be to look it up in the
>database at bugs.php.net. Any idea whether it's actually gotten entered
>there? (I tried searching for '3rd', 'third', and 'three' -- 'include'
>just got way more results than I was interested in sifting through --
>and didn't see anything that appeared to match what you're describing...
>
>
>---
>Mark Roedel | "This is the perversity of software. It
>Systems Programmer | is *always* more complex than you
>LeTourneau University | anticipate, even when you know this and
>Longview, Texas, USA | compensate for it." --Robert Martin
>
attached mail follows:
I don't see anything in the annotations for include() about losing variable definitions...the notes that I see that look remotely relevant are those regarding what PHP considers to be the "current directory" when doing nested includes, which would cause problems in locating the include files themselves, not in losing their contents.
If that's what you're referring to, see bug#11362 - per Zeev, the current CVS (as well as PHP 4.0.7 when it's released), has changed to a behavior that should be more likely to do WhatTheScriptProgrammerMeant in most cases.
--- Mark Roedel (roedelmletu.edu) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University || -- Henry Kissinger
> -----Original Message----- > From: Drew P. Vogel [mailto:dvogel
intercarve.net] > Sent: Wednesday, August 08, 2001 12:13 PM > To: Mark Roedel > Cc: php-general
lists.php.net > Subject: RE: [PHP] 3rd include > > > I searched the database and did not find anything. I was not > sure if the > bug could possibly be entered under a different title, though. It is > discussed in the manual errata for the include() function, so I would > assume the developers at least know of it. > > --Drew Vogel > > On Wed, 8 Aug 2001, Mark Roedel wrote: > > >> -----Original Message----- > >> From: Drew P. Vogel [mailto:dvogel
intercarve.net] > >> Sent: Tuesday, August 07, 2001 8:51 PM > >> To: php-general
lists.php.net > >> Subject: [PHP] 3rd include > >> > >> > >> Has the "3rd include" bug (where variable definitions are > >> "lost" at the 3rd include), been fixed yet? > > > >The obvious way to answer this question would be to look it up in the > >database at bugs.php.net. Any idea whether it's actually > gotten entered > >there? (I tried searching for '3rd', 'third', and 'three' > -- 'include' > >just got way more results than I was interested in sifting through -- > >and didn't see anything that appeared to match what you're > describing... > > > > > >--- > >Mark Roedel | "This is the perversity of software. It > >Systems Programmer | is *always* more complex than you > >LeTourneau University | anticipate, even when you know this and > >Longview, Texas, USA | compensate for it." --Robert Martin
attached mail follows:
You're right. It is not discuessed there. My memory served me incorrectly.
In index.php (the file loaded by php), 'echo( $HTTP_POST_VARS["last_name"] );' will print the variable contents, but in save_script.php (the 3rd file included) the same function call will print nothing.
Am I mis understanding something?
--Drew Vogel
On Wed, 8 Aug 2001, Mark Roedel wrote:
>I don't see anything in the annotations for include() about losing
>variable definitions...the notes that I see that look remotely relevant
>are those regarding what PHP considers to be the "current directory"
>when doing nested includes, which would cause problems in locating the
>include files themselves, not in losing their contents.
>
>If that's what you're referring to, see bug#11362 - per Zeev, the
>current CVS (as well as PHP 4.0.7 when it's released), has changed to a
>behavior that should be more likely to do WhatTheScriptProgrammerMeant
>in most cases.
>
>
>---
>Mark Roedel (roedelm
letu.edu) || "There cannot be a crisis next week.
>Systems Programmer / WebMaster || My schedule is already full."
> LeTourneau University || -- Henry Kissinger
>
>
>
>> -----Original Message-----
>> From: Drew P. Vogel [mailto:dvogel
intercarve.net]
>> Sent: Wednesday, August 08, 2001 12:13 PM
>> To: Mark Roedel
>> Cc: php-general
lists.php.net
>> Subject: RE: [PHP] 3rd include
>>
>>
>> I searched the database and did not find anything. I was not
>> sure if the
>> bug could possibly be entered under a different title, though. It is
>> discussed in the manual errata for the include() function, so I would
>> assume the developers at least know of it.
>>
>> --Drew Vogel
>>
>> On Wed, 8 Aug 2001, Mark Roedel wrote:
>>
>> >> -----Original Message-----
>> >> From: Drew P. Vogel [mailto:dvogel
intercarve.net]
>> >> Sent: Tuesday, August 07, 2001 8:51 PM
>> >> To: php-general
lists.php.net
>> >> Subject: [PHP] 3rd include
>> >>
>> >>
>> >> Has the "3rd include" bug (where variable definitions are
>> >> "lost" at the 3rd include), been fixed yet?
>> >
>> >The obvious way to answer this question would be to look it up in the
>> >database at bugs.php.net. Any idea whether it's actually
>> gotten entered
>> >there? (I tried searching for '3rd', 'third', and 'three'
>> -- 'include'
>> >just got way more results than I was interested in sifting through --
>> >and didn't see anything that appeared to match what you're
>> describing...
>> >
>> >
>> >---
>> >Mark Roedel | "This is the perversity of software. It
>> >Systems Programmer | is *always* more complex than you
>> >LeTourneau University | anticipate, even when you know this and
>> >Longview, Texas, USA | compensate for it." --Robert Martin
>
attached mail follows:
> -----Original Message-----
> From: Drew P. Vogel [mailto:dvogel
intercarve.net]
> Sent: Wednesday, August 08, 2001 2:19 PM
> To: Mark Roedel
> Cc: php-general
lists.php.net
> Subject: RE: [PHP] 3rd include
>
>
> You're right. It is not discuessed there. My memory served me
> incorrectly.
>
> In index.php (the file loaded by php),
> echo( $HTTP_POST_VARS["last_name"] );
> will print the variable contents, but in save_script.php
> (the 3rd file included) the same function call will print
> nothing.
Are you quite sure there's not something else going on here? (An issue of the $HTTP_POST_VARS array being out-of-scope inside a function, for example?) I'm sure I would have run into this behavior by now if it were a system bug.
For whatever it's worth, I just did a test, with includes nested ten deep, and $HTTP_POST_VARS kept its value at every level. (PHP 4.0.6, Apache 1.3.20, FreeBSD 4-Stable)
--- Mark Roedel (roedelmletu.edu) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University || -- Henry Kissinger
attached mail follows:
If a file is included from within a function, this would limit the variable cope of this file, correct?
--Drew Vogel
On Wed, 8 Aug 2001, Mark Roedel wrote:
>> -----Original Message-----
>> From: Drew P. Vogel [mailto:dvogel
intercarve.net]
>> Sent: Wednesday, August 08, 2001 2:19 PM
>> To: Mark Roedel
>> Cc: php-general
lists.php.net
>> Subject: RE: [PHP] 3rd include
>>
>>
>> You're right. It is not discuessed there. My memory served me
>> incorrectly.
>>
>> In index.php (the file loaded by php),
>> echo( $HTTP_POST_VARS["last_name"] );
>> will print the variable contents, but in save_script.php
>> (the 3rd file included) the same function call will print
>> nothing.
>
>Are you quite sure there's not something else going on here? (An issue
>of the $HTTP_POST_VARS array being out-of-scope inside a function, for
>example?) I'm sure I would have run into this behavior by now if it
>were a system bug.
>
>For whatever it's worth, I just did a test, with includes nested ten
>deep, and $HTTP_POST_VARS kept its value at every level. (PHP 4.0.6,
>Apache 1.3.20, FreeBSD 4-Stable)
>
>
>---
>Mark Roedel (roedelm
letu.edu) || "There cannot be a crisis next week.
>Systems Programmer / WebMaster || My schedule is already full."
> LeTourneau University || -- Henry Kissinger
>
>
attached mail follows:
> -----Original Message-----
> From: Drew P. Vogel [mailto:dvogel
intercarve.net]
> Sent: Wednesday, August 08, 2001 3:14 PM
> To: Mark Roedel
> Cc: php-general
lists.php.net
> Subject: RE: [PHP] 3rd include
>
>
> If a file is included from within a function, this would limit the
> variable cope of this file, correct?
Yes it would. (Specifically, it would mean that everything in that file operates at the same scope as the function in which it's included. That, in turn, means that $HTTP_POST_VARS is likely only available if it's been declared as global within that function.
--- Mark Roedel (roedelmletu.edu) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University || -- Henry Kissinger
> On Wed, 8 Aug 2001, Mark Roedel wrote: > > >> -----Original Message----- > >> From: Drew P. Vogel [mailto:dvogel
intercarve.net] > >> Sent: Wednesday, August 08, 2001 2:19 PM > >> To: Mark Roedel > >> Cc: php-general
lists.php.net > >> Subject: RE: [PHP] 3rd include > >> > >> > >> You're right. It is not discuessed there. My memory served me > >> incorrectly. > >> > >> In index.php (the file loaded by php), > >> echo( $HTTP_POST_VARS["last_name"] ); > >> will print the variable contents, but in save_script.php > >> (the 3rd file included) the same function call will print > >> nothing. > > > >Are you quite sure there's not something else going on here? > (An issue > >of the $HTTP_POST_VARS array being out-of-scope inside a > function, for > >example?) I'm sure I would have run into this behavior by now if it > >were a system bug. > > > >For whatever it's worth, I just did a test, with includes nested ten > >deep, and $HTTP_POST_VARS kept its value at every level. (PHP 4.0.6, > >Apache 1.3.20, FreeBSD 4-Stable) > > > > > >--- > >Mark Roedel (roedelm
letu.edu) || "There cannot be a > crisis next week. > >Systems Programmer / WebMaster || My schedule is already full." > > LeTourneau University || -- > Henry Kissinger > > > > > > > >
attached mail follows:
For reference, in case anyone cares-- from within functions, I usually just do:
global $HTTP_POST_VARS; extract($HTTP_POST_VARS);
...to account for the scope of the form vars.
-----Original Message-----
From: Mark Roedel [mailto:MarkRoedel
letu.edu]
Sent: Wednesday, August 08, 2001 4:08 PM
To: Drew P. Vogel
Cc: php-general
lists.php.net
Subject: RE: [PHP] 3rd include
> -----Original Message-----
> From: Drew P. Vogel [mailto:dvogel
intercarve.net]
> Sent: Wednesday, August 08, 2001 3:14 PM
> To: Mark Roedel
> Cc: php-general
lists.php.net
> Subject: RE: [PHP] 3rd include
>
>
> If a file is included from within a function, this would limit the
> variable cope of this file, correct?
Yes it would. (Specifically, it would mean that everything in that file operates at the same scope as the function in which it's included. That, in turn, means that $HTTP_POST_VARS is likely only available if it's been declared as global within that function.
--- Mark Roedel (roedelmletu.edu) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University || -- Henry Kissinger
> On Wed, 8 Aug 2001, Mark Roedel wrote: > > >> -----Original Message----- > >> From: Drew P. Vogel [mailto:dvogel
intercarve.net] > >> Sent: Wednesday, August 08, 2001 2:19 PM > >> To: Mark Roedel > >> Cc: php-general
lists.php.net > >> Subject: RE: [PHP] 3rd include > >> > >> > >> You're right. It is not discuessed there. My memory served me > >> incorrectly. > >> > >> In index.php (the file loaded by php), > >> echo( $HTTP_POST_VARS["last_name"] ); > >> will print the variable contents, but in save_script.php (the 3rd > >>file included) the same function call will print nothing. > > > >Are you quite sure there's not something else going on here? > (An issue > >of the $HTTP_POST_VARS array being out-of-scope inside a > function, for > >example?) I'm sure I would have run into this behavior by now if it > >were a system bug. > > > >For whatever it's worth, I just did a test, with includes nested ten > >deep, and $HTTP_POST_VARS kept its value at every level. (PHP 4.0.6,
> >Apache 1.3.20, FreeBSD 4-Stable) > > > > > >--- > >Mark Roedel (roedelm
letu.edu) || "There cannot be a > crisis next week. > >Systems Programmer / WebMaster || My schedule is already full." > > LeTourneau University || -- > Henry Kissinger > > > > > > > >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
"B. Van Ouwerkerk" <bvo
atz.nl> wrote in message
> It's on the same page where you subscribed to
> this list..
Actually this is also a newsgroup that don't require subscription:
Server: news.php.net Group: php.general
Best regards, Søren Nielsen
attached mail follows:
Don't try to find such a difficult solution. Even HTML can solve this for you! Just put the image tag in your code and specify only the width (or only the height). The browser wil automatically resize the image so it displays proportionally.
<img src="..." width="100">
I know it is not a W3 recommendation to emit either the height or width tag. But this way you can solve your problem easily without putting any extra load on the server. Better still - the image will already be in the client's cache and will load faster in the next page!
Greetz, Bjorn Van Simaeys www.bvsenterprises.com
--- Hong Zhang <zhangh
corp.earthlink.net> wrote:
> On Tue, 7 Aug 2001, Fernando Avila wrote:
>
> > Date: Tue, 7 Aug 2001 22:25:39 +0100
> > From: Fernando Avila <fano
inter-k.com.ar>
> > To: php-general
lists.php.net
> > Subject: [PHP] Images
> >
> > Hello php-general,
> >
> > Hi, I'm having some troubles because i need to
> resize an image.
> > I mean, i have a page that lists every notice in
> the page with a
> > small picture, and if you click over the notice
> you get a full
> > article with the big photograph.
> > But i want to put in the server only one picture
> (the big one) and i
> > need php to resize it to a small preview for the
> list.
> > How can i do it?
> >
>
> I remember there is imlib extension to php which can
> some of the
> image work.
>
> HZ
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
You might want to have a look on this script:
http://www.digitalgenesis.com/software/dgssearch.html
It can search specified directories/file extensions/databases, or deny search for the same, and many other options.
--Julio Nobrega.
2B||!BB - That's the question.
"Steve Wright" <steve
stevewrightonline.co.uk> wrote in message news:20010730190702.23772.qmail
pb1.pair.com... > Hey, > > I have just developed a simple site search.. .and am after learning how to > get it to search all directories... at present, it only searches the one it > is in!! > > > Here's the code: > > <? > include("include/common.inc"); > $title = "Search"; > include("include/header.inc"); > ?> > <P> > <FORM ACTION="<? echo "$PHP_SELF"; ?>" METHOD="POST"> > <INPUT TYPE="text" NAME="searchstr" value="<? echo "$searchstr"; ?>" > SIZE="20" MAXLENGTH="30"> > <INPUT TYPE="submit" VALUE="Search!"> > </FORM> > </P> > <? > if ( ! empty($searchstr) ) { > // empty() is used to check if we've any search string > // if we do, call grep and display the results. > echo "<HR>\n"; > // call grep with case-insensitive search mode on all files > $cmdstr = "grep -i $searchstr *"; > $fp = popen( $cmdstr, "r" ); file://open the output of command > as a pipe > $myresult = array(); // to hold my search results > while( $buffer = fgetss ($fp, 4096 )) { > // grep returns in the format > // filename: line > // So, we use split() to split the data > list($fname, $fline) = split(":",$buffer, 2); > // we take only the first hit per file > if ( !defined($myresult[$fname])) > $myresult[$fname] = $fline; > } > // we have results in a hash. lets walk through it and print > it > if ( count($myresult) ){ > echo "<OL>\n"; > while(list($fname,$fline) = each($myresult)) > echo "<LI> > <A HREF=\"$fname\">$fname</A> : $fline </LI>\n"; > echo "</OL>\n"; > } else { > // no hits > echo "Sorry. Search on <B>$searchstr</B> > returned no results.<BR>\n"; > } > pclose($fp); > } > ?> > <? > include("include/footer.inc"); > ?> > > > > I think it centers around the line whcich contains but am not definate: > while( $buffer = fgetss ($fp, 4096 )) { > > > Any help much appreciated.. > > Steve Wright > > > >
attached mail follows:
Hi,
I'm having a problem using require with a url. What I'm trying to do is have a php script on a server that calls a file on another server using require. The file that is called on the other server contains php functions that the calling php script uses.
I my attempts so far I get: Fatal error: Call to undefined function: login() in /usr/home/nigels/public_html/survey01/survey.php on line 51
survey.php is the script that has the require line: require("http://host.server.com/functions.php");
I really appreciate your help.
Thanks,
Nigel
attached mail follows:
What's on line 51? The error is on line 51 in survey.php. require()
Tyler Longren
Captain Jack Communications
tyler
captainjack.com
www.captainjack.com
isn't on line 51. The error occurs because there's no login() function.
On Wed, 8 Aug 2001 10:08:01 -0600 (Mountain Daylight Time)
<Nigel_Soon
advanis.ca> wrote:
> Hi,
>
> I'm having a problem using require with a url. What I'm trying to do is
> have a php script on a server that calls a file on another server using
> require. The file that is called on the other server contains php
> functions that the calling php script uses.
>
> I my attempts so far I get:
> Fatal error: Call to undefined function: login() in
> /usr/home/nigels/public_html/survey01/survey.php on line 51
>
> survey.php is the script that has the require line:
> require("http://host.server.com/functions.php");
>
> I really appreciate your help.
>
> Thanks,
>
> Nigel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Line 51 has a call to login(). The login() function is in functions.php which lives on a different server. I try to use functions.php by putting the require statement in survey.php. This works when they both live on the same server but when I try using require with the url to a remote server it fails.
Cheers,
Nigel
On Wed, 8 Aug 2001, Tyler Longren wrote:
> What's on line 51? The error is on line 51 in survey.php. require()
>
> Tyler Longren
> Captain Jack Communications
> tyler
captainjack.com
> www.captainjack.com
>
> isn't on line 51. The error occurs because there's no login() function.
>
>
>
> On Wed, 8 Aug 2001 10:08:01 -0600 (Mountain Daylight Time)
> <Nigel_Soon
advanis.ca> wrote:
>
> > Hi,
> >
> > I'm having a problem using require with a url. What I'm trying to do is
> > have a php script on a server that calls a file on another server using
> > require. The file that is called on the other server contains php
> > functions that the calling php script uses.
> >
> > I my attempts so far I get:
> > Fatal error: Call to undefined function: login() in
> > /usr/home/nigels/public_html/survey01/survey.php on line 51
> >
> > survey.php is the script that has the require line:
> > require("http://host.server.com/functions.php");
> >
> > I really appreciate your help.
> >
> > Thanks,
> >
> > Nigel
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
attached mail follows:
Is that file living on a HTTP server which PARSES the function? Eg do you get the source code when directly requesting it from a browser or an empty page (or whatever)
Bolke
-----Oorspronkelijk bericht-----
Van: Nigel_Soon
advanis.ca [mailto:Nigel_Soon
advanis.ca]
Verzonden: Wednesday, August 08, 2001 6:20 PM
Aan: Tyler Longren
CC: Nigel_Soon
advanis.ca; php-general
lists.php.net
Onderwerp: Re: [PHP] require using url
Line 51 has a call to login(). The login() function is in functions.php which lives on a different server. I try to use functions.php by putting the require statement in survey.php. This works when they both live on the same server but when I try using require with the url to a remote server it fails.
Cheers,
Nigel
On Wed, 8 Aug 2001, Tyler Longren wrote:
> What's on line 51? The error is on line 51 in survey.php. require()
>
> Tyler Longren
> Captain Jack Communications
> tyler
captainjack.com
> www.captainjack.com
>
> isn't on line 51. The error occurs because there's no login() function.
>
>
>
> On Wed, 8 Aug 2001 10:08:01 -0600 (Mountain Daylight Time)
> <Nigel_Soon
advanis.ca> wrote:
>
> > Hi,
> >
> > I'm having a problem using require with a url. What I'm trying to do is
> > have a php script on a server that calls a file on another server using
> > require. The file that is called on the other server contains php
> > functions that the calling php script uses.
> >
> > I my attempts so far I get:
> > Fatal error: Call to undefined function: login() in
> > /usr/home/nigels/public_html/survey01/survey.php on line 51
> >
> > survey.php is the script that has the require line:
> > require("http://host.server.com/functions.php");
> >
> > I really appreciate your help.
> >
> > Thanks,
> >
> > Nigel
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Yeah the file is on a HTTP server. I don't exactly get the source code showing though as it is enclosed in php tags and the HTTP server is running php.
Thanks,
Nigel
On Wed, 8 Aug 2001, Bruin, Bolke de wrote:
> Is that file living on a HTTP server which PARSES the function? Eg do you
> get
> the source code when directly requesting it from a browser or an empty page
> (or whatever)
>
> Bolke
>
> -----Oorspronkelijk bericht-----
> Van: Nigel_Soon
advanis.ca [mailto:Nigel_Soon
advanis.ca]
> Verzonden: Wednesday, August 08, 2001 6:20 PM
> Aan: Tyler Longren
> CC: Nigel_Soon
advanis.ca; php-general
lists.php.net
> Onderwerp: Re: [PHP] require using url
>
>
> Line 51 has a call to login(). The login() function is in functions.php
> which lives on a different server. I try to use functions.php by putting
> the require statement in survey.php. This works when they both live on the
> same server but when I try using require with the url to a remote server
> it fails.
>
> Cheers,
>
> Nigel
>
> On Wed, 8 Aug 2001, Tyler Longren wrote:
>
> > What's on line 51? The error is on line 51 in survey.php. require()
> >
> > Tyler Longren
> > Captain Jack Communications
> > tyler
captainjack.com
> > www.captainjack.com
> >
> > isn't on line 51. The error occurs because there's no login() function.
> >
> >
> >
> > On Wed, 8 Aug 2001 10:08:01 -0600 (Mountain Daylight Time)
> > <Nigel_Soon
advanis.ca> wrote:
> >
> > > Hi,
> > >
> > > I'm having a problem using require with a url. What I'm trying to do is
> > > have a php script on a server that calls a file on another server using
> > > require. The file that is called on the other server contains php
> > > functions that the calling php script uses.
> > >
> > > I my attempts so far I get:
> > > Fatal error: Call to undefined function: login() in
> > > /usr/home/nigels/public_html/survey01/survey.php on line 51
> > >
> > > survey.php is the script that has the require line:
> > > require("http://host.server.com/functions.php");
> > >
> > > I really appreciate your help.
> > >
> > > Thanks,
> > >
> > > Nigel
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> > >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Hey Renze,
Don't you think that checking too much is useless and takes a bite out of your performance too? Don't waste your time.
Greetz, Bjorn Van Simaeys www.bvsenterprises.com
--- Renze Munnik <renze
datalink.nl> wrote:
> On Tue, Aug 07, 2001 at 09:26:48AM -0700, Mark
> Maggelet wrote:
> >
> > This isn't right, empty() won't give an error if
> $input isn't set.
>
> That's true. Empty() doesn't return an error when
> $input isn't
> defined. I didn't RT(F)M on this one. I always use
> "(!isset($something)
> && empty($something))" to check whether or not
> $something is empty/not
> set.
> It's realy more of a feeling. Empty() actualy only
> checks for a
> value in $something. It's basicaly the same as
> "(!$something)"
> except that empty() doesn't return a warning if
> $something isn't set
> (...look, this time I did RTM :).
> So... basicaly, with empty() you don't check if
> $something is set.
> You just don't get to know it. So that's why I use
> isset() with it.
> I know the result is the same, but hey... I'm the
> same guy that
> checks the returnvalue of printf() and stuff
> (another thread in this
> list). So... well... Let's just say I have a
> 'checking-fetish' of
> some kind :p
>
> --
>
> * R&zE:
>
> -- »»»»»»»»»»»»»»»»»»»»»»»»
> -- Renze Munnik
> -- DataLink BV
> --
> -- E: renze
datalink.nl
> -- W: +31 23 5326162
> -- F: +31 23 5322144
> -- M: +31 6 21811143
> -- H: +31 23 5516190
> --
> -- Stationsplein 82
> -- 2011 LM HAARLEM
> --
> -- http://www.datalink.nl
> -- ««««««««««««««««««««««««
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
Hi to all, I need to create web pages containing images which should be updated periodically, but the image contents may vary as data coming from a database varies.
What is that?, well the image will contain dynamic objects and static objects. The dynamic objects can be text (representing database data) and lines, where you can change attributes like color, position, etc. The static objects can be filled ellipses, circles, lines, static text.
The image format can be a jpeg, gif or another type supported on html.
Does somebody know some Library with functions for create such above images? Does somebody know some links to find something?
I will apprecciate your attention to this. When you come to Mexico and Guadalajara City I will pay your help inviting you a bunch of Mexican Tacos.
Atte. Ignacio Estrada F. Centro Nacional de Control de Energia Area de Control Occidental 025+6463, 025+6464, 025+646
attached mail follows:
Hi,
read the manual on the GD-library (www.php.net/image) it wont do any GIFS anymore, but it'll all the rest
Bolke
-----Oorspronkelijk bericht-----
Van: ignacio.estrada
cfe.gob.mx [mailto:ignacio.estrada
cfe.gob.mx]
Verzonden: Wednesday, August 08, 2001 6:14 PM
Aan: php-general
lists.php.net
Onderwerp: [PHP] Image Generation Library
Hi to all, I need to create web pages containing images which should be updated periodically, but the image contents may vary as data coming from a database varies.
What is that?, well the image will contain dynamic objects and static objects. The dynamic objects can be text (representing database data) and lines, where you can change attributes like color, position, etc. The static objects can be filled ellipses, circles, lines, static text.
The image format can be a jpeg, gif or another type supported on html.
Does somebody know some Library with functions for create such above images? Does somebody know some links to find something?
I will apprecciate your attention to this. When you come to Mexico and Guadalajara City I will pay your help inviting you a bunch of Mexican Tacos.
Atte. Ignacio Estrada F. Centro Nacional de Control de Energia Area de Control Occidental 025+6463, 025+6464, 025+646
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi,
I noticed in php.ini there was a setion for debugger, I tried enabling this and connecting to the specified port, but no joy. Anyone know how to get this working ?
Pete
attached mail follows:
The debugger is not built into PHP 4, it was a feature in PHP 3.
--Matt
-----Original Message-----
From: Peter Dowie [mailto:pete
smackedout.com]
Sent: Wednesday, August 08, 2001 12:48 PM
To: php-general
lists.php.net
Subject: [PHP] Is there a debugger ???
Hi,
I noticed in php.ini there was a setion for debugger, I tried enabling this and connecting to the specified port, but no joy. Anyone know how to get this working ?
Pete
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
For PHP 4, I believe you need to purchase the Zend Debugger from Zend. It comes as part of the Zend Developer's Suite.
J
Peter Dowie wrote:
> Hi, > > I noticed in php.ini there was a setion for debugger, I tried enabling > this and connecting to the specified port, but no joy. > Anyone know how to get this working ? > > Pete > > >
attached mail follows:
J Smith wrote: > For PHP 4, I believe you need to purchase the Zend Debugger from > Zend. It comes as part of the Zend Developer's Suite.
There is also a free debugger. http://dd.cron.ru/dbg/
regards Wagner
-- Madness takes its toll. Please have exact change.
attached mail follows:
http://www.php.net/manual/en/debugger.php
> -----Original Message-----
> From: Peter Dowie [mailto:pete
smackedout.com]
> Sent: Wednesday, August 08, 2001 9:48 AM
> To: php-general
lists.php.net
> Subject: [PHP] Is there a debugger ???
>
>
> Hi,
>
> I noticed in php.ini there was a setion for debugger, I tried
> enabling this and connecting to the specified port, but no
> joy. Anyone know how to get this working ?
>
> Pete
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net To contact the list
> administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Could somebody please show me, send me an example or redirect me to a page which shows how to show a random FLASH movie from a text file which contains different names of different movies so that when i go on the page it shows lets say, 1 of the 5 movies in the text document.
Finally and almost hard question (probably not for you but for me.... AGGH)
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
Use file() to load in the names of the movies from your text file into an array. Use rand() to pick one of them from the array.
- Tim
On 08 Aug 2001 17:47:36 -0700, Kyle Smith wrote:
> Could somebody please show me, send me an example or redirect me to a page which shows how to show a random FLASH movie from a text file which contains different names of different movies so that when i go on the page it shows lets say, 1 of the 5 movies in the text document.
>
> Finally and almost hard question (probably not for you but for me.... AGGH)
>
> -lk6-
> http://www.StupeedStudios.f2s.com
> Home of the burning lego man!
>
> ICQ: 115852509
> MSN: dbzno1fan
hotmail.com
> AIM: legokiller666
>
>
attached mail follows:
Hi, I'm a real newbie at this stuff and I have a little problem... I read the manual but the answer to my questions were not clear. What I am trying do do is track down a user when he or she visits my site. I would like to store some information about them into mySql...Information like, username, ip, connection and most importantly what page of my site it is that they visited...I'm not sure if I have to use cookies or sessions or both and I especially don't know where to start......
Can anyone give me some information or a link other than php.net PLEASE................thank you.
attached mail follows:
http://www.phpbuilder.com is loaded with goodies that should be able to help you.
- Tim
On 08 Aug 2001 12:49:56 -0400, Jeremy Morano wrote: > Can anyone give me some information or a link other than php.net > PLEASE................thank you.
attached mail follows:
hi,
try this: #### track.sql #### CREATE TABLE table_track ( tid int(11) NOT NULL auto_increment, ip varchar(15) NOT NULL, PRIMARY KEY (tid), UNIQUE tid (tid), KEY tid_2 (tid) ); ##### ####
<?php
$host = "localhost"; $user = "dbuser"; $pass = "dbpass"; $db = "database";
$dbconnect = mysql_connect($host, $user, $pass); mysql_select_db($db, $dbconnect); $query = mysql_query("INSERT INTO table_track (ip) VALUES ('$REMOTE_ADDR')");
?>
that would insert the users ip into the table table_track ...
check it out... i hope i could help you
best regards attila
> Hi, I'm a real newbie at this stuff and I have a little problem... I read
> the manual but the answer to my questions were not clear. What I am trying
> do do is track down a user when he or she visits my site. I would like to
> store some information about them into mySql...Information like, username,
> ip, connection and most importantly what page of my site it is that they
> visited...I'm not sure if I have to use cookies or sessions or both and I
> especially don't know where to start......
>
> Can anyone give me some information or a link other than php.net
> PLEASE................thank you.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Greetings,
I'm having a puzzling time trying to figure out how to work around the issue of the session_id not existing after making calls to session_start and session_id to generate an session. It seems that by set_si() calling session_id and seeing if there is a value, doesn't not work. Hence, a new session_id is created but is not persistant. If I reload the page sessions.test.php3 it generates a new session_id and can not detect the previous one set.
For example, I one it once, and it produces output to the browser as:
== --84c666bde8c46803a10821e32aacff91 ++84c666bde8c46803a10821e32aacff91
If I reload the page by chosing "refresh" it produces:
== --8855c34496314baacd73d3de0bc59b49 ++8855c34496314baacd73d3de0bc59b49
Is this a bug in PHP where you cannot call session function within a function of a class and have it stick? Any help would be greatly appreciated.
->MAG
<<sessions.inc>> class ccsession { var $_cm_user_id = ''; var $_cm_group_id = ''; var $_cm_auth_id = ''; var $_username = ''; var $_first_name = ''; var $_last_name = ''; var $_session_id = ''; var $is_set_si = ''; var $is_get_si =''; var $is_sd = ''; var $is_ss = ''; var $is_sn = ''; var $is_sr = ''; var $is_su = ''; function ccsession($userid = '1', $groupid = '1', $authid = '1', $username = 'guest', $first_name = 'Guest', $last_name = 'Account') { $this->ss(); $this->_cm_user_id = $userid; $this->_cm_group_id = $groupid; $this->_cm_auth_id = $authid; $this->_username = $username; $this->_first_name = $first_name; $this->_last_name = $last_name; $this->_session_id = $this->set_si(); } // Shortcuts... function set_si() { //if (0) { //$c_session_id = $this->get_si(); print "==".session_id()."<br>"; if (session_id()) { $this->_session_id = $c_session_id; } else { srand((double)microtime()*1132590); // make 'rand' function truly random $this->_session_id = md5(rand(0,9999999)); } $this->is_set_si = 1; session_id($this->_session_id); print "--".session_id()."<br>"; return $this->_session_id; //} } }
<<sessions.test.php3>> <?php
include 'class/sessions.inc';
$n_sess = new ccsession(); print "++".session_id()."<br>";
?>
PHP Version 4.0.3pl1 System Linux skritz 2.2.5 #4 SMP Tue May 2 11:26:16 PDT 2000 i686 unknown Build Date May 15 2001 Configure Command './configure' '--with-apache=../apache_1.3.12' '--with-db' '--with-mcal=../libmcal' Server API Apache Apache Version Apache/1.3.12 Apache Release 10312100 Apache API Version 19990320 Hostname:Port my.domain.com:80 User/Group www(2001)/100 Max Requests Per Child: 0 Keep Alive: on Max Per Connection: 100 Timeouts Connection: 300 Keep-Alive: 15 Server Root /usr/local/apache Loaded Modules mod_php4, mod_setenvif, mod_auth, mod_access, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_env, http_core
attached mail follows:
Hi,
I got the same problem but i left it (had no more time to fumble around with it). But try this, because it was what I was going to try:
function ccsession($userid = '1', $groupid = '1', $authid = '1', $username = 'guest', $first_name = 'Guest', $last_name = 'Account') { global $HTTP_SESSION_VARS;
// Change all session variables below to // $this->_cm_user_id = $HTTP_SESSION_VARS["userid"] // and so on..
$this->ss(); // I guess this is not important for sessions $this->_cm_user_id = $userid; $this->_cm_group_id = $groupid; $this->_cm_auth_id = $authid; $this->_username = $username; $this->_first_name = $first_name; $this->_last_name = $last_name; $this->_session_id = $this->set_si(); }
// Once you started the session you might be able to set it // the way you are doing here, in the following code as long // as you don't send anything before this. If you do it you // know you will have already sent the old ID to the user.
function set_si() { //if (0) { //$c_session_id = $this->get_si(); print "==".session_id()."<br>"; if (session_id()) { $this->_session_id = $c_session_id; } else { srand((double)microtime()*1132590); // make 'rand' function truly random $this->_session_id = md5(rand(0,9999999)); } $this->is_set_si = 1; session_id($this->_session_id); print "--".session_id()."<br>"; return $this->_session_id; //} } }
By doing this you should be able (and I say SHOULD, I haven't tested it) to get the value from the session, but you will still have to start the session outside the class.
Also don't forget to change the $HTTP_SESSION_VARS with the new session information if you change it.
From my point of view the problem is with variable scope. Even with register_globals and track_vars the code didn't work for me. If you find out something please post it (or at least send me a message with your findings) because actually I was doing that stuff with just functions and not a class.
Hope it's useful for you.
Sean C. McCarthy SCI, S.L. (www.sci-spain.com)
Mark Garcia wrote: > > Greetings, > > I'm having a puzzling time trying to figure out how to work around the issue > of the session_id not existing after making calls to session_start and > session_id to generate an session. It seems that by set_si() calling > session_id and seeing if there is a value, doesn't not work. Hence, a new > session_id is created but is not persistant. If I reload the page > sessions.test.php3 it generates a new session_id and can not detect the > previous one set. > > For example, ... >
attached mail follows:
Hello
If I have a file called db.inc with, for example, this:
<?php // db.inc $user = "david"; $pass = "password";
?>
I have a my index.php do a include('db.inc'); ok, that works.
However, any user on the system can read db.inc cause its chmod'd 0644. If I chmod db.inc 0600 or even 0640, index.php can not include it.
How do I go about protecting my files from being read by users on the system?
Thanks - David
attached mail follows:
> If I have a file called db.inc with, for example, this: > > However, any user on the system can read db.inc cause its > chmod'd 0644. > If I chmod db.inc 0600 or even 0640, index.php can not include it. > > How do I go about protecting my files from being read by > users on the system?
Below is how Rasmus recommends this be handled.
Kirk
The right way to fix this is to add a rule to your Apache configuration that looks like this:
<Files ~ "\.inc$"> Order allow,deny Deny from all </Files>
That will simply prevent any direct access at all to your .inc files. Making the .inc files simply be parsed by PHP could still be a problem as they could be called out of context.
-Rasmus
attached mail follows:
On Wed, 8 Aug 2001 12:03:34 -0600
"Johnson, Kirk" <kjohnson
zootweb.com> wrote:
> > If I have a file called db.inc with, for example, this:
> >
> > However, any user on the system can read db.inc cause its
> > chmod'd 0644.
> > If I chmod db.inc 0600 or even 0640, index.php can not include it.
> >
> > How do I go about protecting my files from being read by
> > users on the system?
>
> Below is how Rasmus recommends this be handled.
>
> Kirk
>
> The right way to fix this is to add a rule to your Apache configuration
> that looks like this:
>
> <Files ~ "\.inc$">
> Order allow,deny
> Deny from all
> </Files>
>
> That will simply prevent any direct access at all to your .inc files.
> Making the .inc files simply be parsed by PHP could still be a problem as
> they could be called out of context.
>
> -Rasmus
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
This is not what I was asking...
I mean a user on the local system
cd /home/david/webpage/include cat db.inc
he can read my db.inc.
- David
attached mail follows:
You could either rename the file with a .php extension or you can have it so the server treats .inc files like php files.
"David Hill" <david
wmol.com> wrote in message
news:20010808135302.54006932.david
wmol.com...
> Hello
>
> If I have a file called db.inc with, for example, this:
>
> <?php
> // db.inc
> $user = "david";
> $pass = "password";
>
> ?>
>
> I have a my index.php do a include('db.inc');
> ok, that works.
>
> However, any user on the system can read db.inc cause its chmod'd 0644.
> If I chmod db.inc 0600 or even 0640, index.php can not include it.
>
> How do I go about protecting my files from being read by users on the
system?
>
> Thanks
> - David
attached mail follows:
On Dienstag, August 7, 2001, at 12:04 Uhr, Peter Ostry wrote:
> bash-2.03# /usr/apache/bin/apachectl start > Syntax error on line 244 of /etc/apache/httpd.conf: > Cannot load /web/libexec/libphp4.so into server: ld.so.1: > /usr/apache/bin/httpd: fatal: /web/libexec/libphp4.so: open failed: No > such > file or directory
We solved the problem.
Maybe this is of interest for someone: We found a lot of similar error reports in this and other lists. But in our case it looks Solaris-specific. Finally we did not use any predefined packages but compiled Apache, MySql and PHP from sources, all with the gcc compiler. Then Apache refused to start (error with LoadModule). To extract the problem we compiled again: Apache only (static), then added PHP and then Perl. Without any other changes it worked afterwards... (Solaris 8 on a Netra AC200)
Peter
attached mail follows:
The most PHENOMENAL WORLDWIDE EXPLOSION ever seen ... with any PRODUCT in DIRECT SALES!
You're about to discover the most exciting and Built-to-Last Opportunity ever! One that will enable YOU to earn money QUICKLY, GLOBALLY and for the REST OF YOUR LIFE! An Entrepreneur's dream.
This message is unavoidably a bit long, but please bear with me ... and take note of the following SPECTACULAR event:
PRE-LAUNCHING . . . WORLDWIDE .
Visit: http://www.jf10.com -- and read all of the information in each link for a better understanding of this Global Opportunity.
This BREAKTHROUGH by a USA BASED COMPANY has reated the MOST POWERFUL and PROFITABLE "ONE CARD SOLUTION" in the WORLD!
To secure a free pre-launch position, go now to:
http://www.replicate99.com/onecard/1506.shtml
Would you prefer to have more decision-aiding information first??
THIS UNIVERSAL CARD HAS:
*** UNMATCHED FEATURES:
(a) Anyone in the World can get the Card with NO Credit Check, NO Questions and NO interest.
(b) You can deposit and use an UNLIMITED amount of Money.
(c) You can use it to charge at over 17 MILLION Point Of Sale locations Worldwide.
(d) Your Money is instantly available though the three largest ATMs Networks in the World.
(e) Low cost Member-To-Member cash online transfer feature taps into and undercuts the $3 trillion Cash Transfer Industry.
(f) Unique Feature lets you transfer Money from your Card to your ACH (Automated Clearing House) Checking Account.
(g) All Transfers have Automatic Conversion in the Local Country Currency.
(h) Let's you carry any amount of cash anywhere in the World.
(i) It can be used by any size Company as a Real-time Global Direct Payroll Deposit.
(j) And so much more. --Use worldwide with automatic currency conversion --Transfer funds worldwide through the Net or phone --Direct payroll deposits - perfect for affiliate payments --Built-in escrow - the best transaction type for auction sites
Over 600 features available - many not available anywhere else.
*** UNMATCHED DEMAND:
(a) 90% of adults in the World cannot obtain a Credit Card or a Checking Account.
(b) 40% of people in the USA still don't have a Credit Card.
(c) 15% don't have a Checking Account.
(d) 75% of US Credit Card holders are "maxed" out
(e) No doubt, the Debit Card Market is vastly larger than the Credit Card market
(f) Our Multifunction Card is HANDS DOWN, the Best Choice of any Debit Card, Secure Card, Check Card or Cash Card with a LOW PRICE anyone in the World can afford!
*** UNMATCHED CREDIBILTY AND RECOGNITION This International Multi-function Debit Card, available in all Countries, carries the Logos of: (a) A Multibillion Worldwide Financial Institution that holds and Insures the Deposits (b) The Largest Merchant Aggregating Company in the World; (c) The three largest ATM Networks in the World; (d) The Largest POS Networks in the World.
The card functions on a Certified Platform that cost over $15 million dollars, took 6 years to create and can perform hundreds of features. Ernst & Young, a leading International accounting firm, valued the platform at $25 million dollars.
*** UNMATCHED PROFITS
You can build a Worldwide Associates' Organization from any Country and earn WEEKLY COMMISSIONS from commissionable business centers through an Incredible Front-end, 2 X Infinity - Plus Matching Bonuses - Compensation Plan, historically proven to create Business Momentum and large incomes FAST!
You can build a LIFE-LONG monthly RESIDUAL INCOME in usage Overrides from Card purchases, Money Transfers and all the other services the Card offers as it is used by customers and associates in your Worldwide Organization, through the most lucrative Backend Unilevel Compensation Plan ever!
A COMPANY BUILT-TO-LAST MAKING HISTORY AROUND THE WORLD
But, the best part?
You'll be among the first to bring this radically different card to a global market. Millions of people are screaming for a financial tool like this worldwide - it's a gold mine both online and offline.
Those who respond the quickest are those with the right mind set for an unprecedented opportunity like this one. Your actions reveal much.
For further instruction visit the site below...
http://www.replicate99.com/onecard/1506.shtml
Pre-register today for FREE!
The Age of the Cashless Society has begun its awesome quiet ascent.
The Age of Coins and Bills is going the way of the last century.
You're About To Discover The Most Exciting and Built-To-Last Opportunity That Will Enable You To Earn More Money QUICKLY, GLOBALLY and Keep It Coming For The Rest Of Your Life!!
Note: If you would like to be attached directly under an Associate who already has an advanced position in the matrix: GO HERE:
http://www.replicate99.com/onecard/1506.shtml
Sign Up Now For The Best Possible Position.
Sincerely,
Owen Burger The orbit team
“The secret to success is simple; look to where the money is flowing, and find a way to fall in front of it.”
Note: This is a one-time mailing. You are on a list interested in "Opportunities". If you would prefer not to get any more information like this, simply reply with "remove" and your email address in the subject line. I will forward it to the list provider.
attached mail follows:
i want to do form validation server side...not client side......
i'm wondering what programers use to validate form data.....if loops....arrays? what?
~kurth
attached mail follows:
The whole set of is_* functions are useful, like is_numeric() and is_string() and such.
Regular expressions are also mega-useful if you want data to be in a very specific format, like email addresses and such.
isset() is also a good function to call at the beginning of your validation function or script just to make sure that if a variable is needed on a page, it's been set properly on the form.
J
Kurth Bemis wrote:
> i want to do form validation server side...not client side...... > > i'm wondering what programers use to validate form data.....if > loops....arrays? what? > > ~kurth > >
attached mail follows:
Usually if-statements and regex's are used to validate data... If you just want to make sure the form is filled out completely, you could do this: (which is how I do it)
if(empty($name) || empty($address) || empty($phone)) { // Form is not complete echo 'Name: <INPUT TYPE=TEXT NAME="name" VALUE='$name'>\n"; echo 'Name: <INPUT TYPE=TEXT NAME="address" VALUE='$address'>\n"; echo 'Name: <INPUT TYPE=TEXT NAME="phone" VALUE='$phone'>\n"; } else { // Form is complete. [code to send form] }
That way, as long as your error reporting isn't set too high (as to warn about uninitialized variables), it will print the form empty the first time, and if the user submits it without completing it, it will reprint the form with whatever data the user has provided.
Please note-- this was a very short example (no submit button, no stripslashes() on the variables) but you get the idea.
-----Original Message-----
From: Kurth Bemis [mailto:kurth
usaexpress.net]
Sent: Wednesday, August 08, 2001 2:36 PM
To: php-general
lists.php.net
Subject: [PHP] form validataion?
i want to do form validation server side...not client side......
i'm wondering what programers use to validate form data.....if loops....arrays? what?
~kurth
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I still rarely ever see PHP mentioned in job listings and the like. Especially here in Canada I find it very hard to find any kinds of contacts for companies using PHP. My previous employer that I was with for 3+ years insisted on Micro$oft products and wanted to go with ASP.
My current employer, a HUGE media/newspaper in Ontario goes with strictly Java.
Is it that people still are hesitant to go wth open source based technology?
Jeff Lewis
attached mail follows:
Dear PHP enthusiasts,
I'm happy to announce that we can present now the conference sessions including abstracts, divided into several session tracks:
o PHP Applications o PHP & Business o Database Topics o PHP & GTK o PHP & Open Source o PHP Internals/Extensions o PHP & XML o Miscellaneous Topics
Furthermore, there are four power workshops we can present and a Open Source Room where PHP Open Source Projects can present themselves for free.
A time line for the sessions including with online registration will be published in the next few days, so stay tuned.
Also, nearly all members of the PHP core group will be on the conference. We organized a special "Q&A panel" where you can ask your questions to the core group. (I.e. what about possible integrations with Perl & Python? Where will the future of PHP go? Who is responsible for the future of PHP? ...)
More informations about the Q&A panel are available at
http://www.php-conference.de/2001/qapanel_en.php
You'll find all informations at
http://www.php-conference.de/
We're looking forward for a great conference. If you
have any questions, please ask mailto:orga
php-conference.de
-- PHP Schulungen und | International PHP Conference Schulungsmaterial: | 05. - 07.11.2001 http://thinkphp.de/ | Astron Hotel, Frankfurt http://rent-a-phpwizard.de/schulungen.php | http://www.php-kongress.de/
attached mail follows:
Could somebody please show me, send me an example or redirect me to a page which shows how to show a random FLASH movie from a text file which contains different names of different movies so that when i go on the page it shows lets say, 1 of the 5 movies in the text document.
Finally and almost hard question (probably not for you but for me.... AGGH)
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
> For those of you with a scientific disposition some Theories to ponder > over ..... especially the cat one > > An American magazine held a competition, inviting its readers to submit > new scientific theories on ANY subject. Below are the winners: > > 5th place (Subject: Probability Theory) > > If an infinite number of rednecks riding in an infinite number of pickup > trucks fire an infinite number of shotgun rounds at an infinite number > of highway signs, they will eventually write the complete works of > Shakespeare in Braille. > > 4th place (Subject: Bio-Mechanics) > > Why Yawning Is Contagious: You yawn to equalize the pressure on > your eardrums. This pressure change outside your head unbalances > other people's ear pressures, so they then yawn to even it out. > > 3rd place (Subject: Symbolic Logic) > > The Chinese are technologically underdeveloped because each of their > alphabetical characters represents a whole word or phrase, rather than > a single letter. Thus they cannot use acronyms to communicate technical > ideas at a faster rate. > > 2nd place (Subject: Newtonian Mechanics) > > Deforestation may cause earthquakes, tidal waves, or even the total > destruction of our planet. Just as a figure-skater's rate of spin > increases > when the arms are brought in close to the body, the cutting down of tall > trees may cause the Earth to spin dangerously fast on its axis with > disastrous results. > > Winner (Subject: Perpetual Motion) > > When a cat is dropped, it always lands on its feet, and when toast is > dropped, it always lands buttered side down. Therefore, if a slice of > toast s strapped to a cat's back, buttered side up, and the animal is > then dropped, the two opposing forces will cause it to hover, spinning > inches above the ground. If enough toast-laden felines were used, they > could form the basis of a high-speed monorail system. > > ....and then this mail got this reply from one of the recipients. > > I've been thinking about this cat/toast business for a while. In the > buttered toast case, it's the butter that causes it to land buttered > side down - it doesn't have to be toast, the theory works equally well > with Jacob's crackers. So to save money you just miss out the toast - > and butter the cats. Also, should there be an imbalance between the > effects of cat and butter, there are other substances that have a > stronger affinity for carpet. > > Probability of carpet impact is determined by the following simple > formula: p = s * t(t)/t? > where p is the probability of carpet impact s is the "stain" value of > the > toast-covering substance - an indicator of the effectiveness of the > toast > topping in permanently staining the carpet. Chicken Tikka Masala, for > example, has a very high s value, while the s value of water is zero. > > t? and t(t) indicate the tone of the carpet and topping - the value of > p > being strongly related to the relationship between the color of the > carpet > and topping, as even chicken tikka masala won't cause a permanent and > obvious stain if the carpet is the same colour. So it is obvious that > the > probability of carpet impact is maximised if you use chicken tikka > masala and a white carpet - in fact this combination gives a p value of > one, which is the same as the probability of a cat landing on its feet. > > Therefore a cat with chicken tikka masala on its back will be certain > to > hover in mid air, while there could be problems with buttered toast as > the toast may fall off the cat, causing a terrible monorail crash > resulting > in nauseating images of members of the royal family visiting accident > victims in hospital, and politicians saying it wouldn't have happened > if > their party was in power as there would have been more investment in > cat-toast glue research. Therefore it is in the interests not only of > public > safety but also public sanity if the buttered toast on cats idea is > scrapped, to be replaced by a monorail powered by cats smeared with > chicken tikka masala floating above a rail made from white shag pile > carpet.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]