RE: [PHP] Re: FAQ

2001-08-01 Thread Johnson, Kirk
> Does anyone know what PHP stands for? PHP => People Hate Perl. No, that's just a joke, no flames please :) PHP Hypertext Preprocessor. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To cont

RE: [PHP] HTTP_SESSION_VARS

2001-08-01 Thread Johnson, Kirk
> while (list ($key, $val) = each ($HTTP_session_VARS)) { > echo "$key => $val"; > } > > i get the error - > > Warning: Variable passed to each() is not an array or object > in /var/www/html/adult/func.php on line 5 Change "HTTP_session_VARS" to "HTTP_SESSION_VARS", since variable names ar

RE: [PHP] How to Compare dates?

2001-08-03 Thread Johnson, Kirk
> Can someone tell me how to properly compare the value > returned from the > db to see if it is blank ? > if ( ( > mysql_result($db_result,$db_record,'order_date')=00) > ) ) { Two things, Jack. Enclose 00 in quotes, since it is a string, but more importantly, use '==

RE: [PHP] Upload file from my local C:

2001-04-09 Thread Johnson, Kirk
Are the permissions set OK? Kirk > -Original Message- > From: HK Woo [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 09, 2001 9:01 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Upload file from my local C: > > > Hi, > > I use a command "copy" to upload a file from my local win machine

RE: [PHP] recording time of entry

2001-04-09 Thread Johnson, Kirk
If you are using MySQL, add a "timestamp" field to the table. The first timestamp in a table gets stamped everytime a record is modified. Kirk > -Original Message- > From: george [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 09, 2001 9:05 AM > To: [EMAIL PROTECTED] > Subject: [PHP] re

RE: [PHP] recording time of entry

2001-04-09 Thread Johnson, Kirk
It will work if you are creating a new record for each entry (an INSERT for each entry). It will not work if you are UPDATE'ing an existing record for each entry. In this case, only the time of the most recent UPDATE would be recorded. > -Original Message- > From: george [mailto:[EMAIL PR

RE: [PHP] Controlling just size with regular expressions

2001-04-09 Thread Johnson, Kirk
I think [.]{0,9} will get it. Kirk > -Original Message- > From: Jorge Alvarez [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 09, 2001 3:38 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Controlling just size with regular expressions > > > Hi there, > > I need a regular expression that

RE: [PHP] Limitation of redirecting using header()?

2001-04-10 Thread Johnson, Kirk
There is also the client-side META tag redirect, which has been deprecated by W3C (although it is hard to imagine the browser makers not supporting this for quite a while longer): echo("< /HEAD>$message"); As for the address bar contents not changing, I don't know what to say. I haven't seen

RE: [PHP] assignment operator works for comparison??

2001-04-10 Thread Johnson, Kirk
It looks to me like the value of an assignment is the value assigned, as in Perl. But I don't know for sure, haven't come across this in the manual. Kirk > -Original Message- > From: Dan [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 10, 2001 3:29 PM > To: [EMAIL PROTECTED] > Subject:

RE: [PHP] Can't redeclare already declared function

2001-04-11 Thread Johnson, Kirk
The function in question is defined in an included file, right? This function definition file is most likely being included twice. The best bet is that it is being included from another included file (at least, that's how I usually manage to produce this error :) ). Check all your included files f

RE: [PHP] Can't redeclare already declared function

2001-04-11 Thread Johnson, Kirk
et, try include_once() instead of all instances of > include(). It > will only include a file once, rather than every time you > call include() on > that path. > > Nifty feature. > > -j > > At 11:17 AM 4/11/2001, Johnson, Kirk wrote: > >The function in question

RE: [PHP] Single Quotes in Oracle Queries

2001-04-11 Thread Johnson, Kirk
Where are the strings coming from? If from a , then magic_quotes_sybase (in php.ini) is your friend. If from elsewhere, see magic_quotes_runtime for possible help (also in php.ini). Kirk > -Original Message- > From: Richard Crawford [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 11,

RE: [PHP] passthru

2001-04-11 Thread Johnson, Kirk
Just guessing here. On our setup, PHP runs as nobody. Is there a permissions problem around "someProgram"? Kirk > -Original Message- > From: Michael Dickson [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 11, 2001 1:27 PM > To: [EMAIL PROTECTED] > Subject: [PHP] passthru > > > On t

RE: [PHP] is it safe to stripslashes() on all form variables? [ security hole !!! ]

2001-04-16 Thread Johnson, Kirk
Yasuo, I didn't quite follow this. What are those special characters below in your $name example? TIA Kirk > -Original Message- > If you strip slashes, it will make a security hole. > > For example, > > SELECT * FROM tablename WHERE name = '$name'; > what if $name is > \'garbage\';DRO

[PHP] stripslashes() equivalent when magic_quotes_sybase = on?

2001-04-18 Thread Johnson, Kirk
With magic_quotes_sybase = on, a single quote in Get/Post/Cookie data gets escaped with another single quote. Is there a function analagous to stripslashes that will strip off the escaping quote? TIA Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTE

RE: [PHP] stripslashes() equivalent when magic_quotes_sybase = on?

2001-04-19 Thread Johnson, Kirk
gt; stripslashes() sees the magic_quotes_sybase setting and behaves > accordingly. > > -Rasmus > > On Wed, 18 Apr 2001, Johnson, Kirk wrote: > > > With magic_quotes_sybase = on, a single quote in > Get/Post/Cookie data gets > > escaped with another single quote. Is there

RE: [PHP] Warnings w/ !$var!?

2001-04-20 Thread Johnson, Kirk
> I just installed PHP4 on a Windows 2000 box (tried it > both as CGI and > ISAPI) and am getting a very annoying behavior from it, that I do not > see on my installation in Linux. > When I check a variable (say, in a if() statement) via > !$var, I get a > Warning message printed

RE: [PHP] PHP Sessions Problem

2001-04-20 Thread Johnson, Kirk
I have also seen this problem with one of my sites, but only *occasionally*. I have no clue as to what the problem is. Anyone else have any ideas? Kirk > -Original Message- > From: Luke Muszkiewicz [mailto:[EMAIL PROTECTED]] > > Hey Folks: > > I am using PHP sessions in IE 5.5 and NN 6

RE: [PHP] session_register()

2001-04-20 Thread Johnson, Kirk
I do. Kirk > -Original Message- > From: Wade [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 20, 2001 9:16 AM > To: [EMAIL PROTECTED] > Subject: [PHP] session_register() > > > I am registering a number of variables. Can I combine them into one > session_register, such as session_regis

RE: [PHP] PHP Sessions Problem

2001-04-20 Thread Johnson, Kirk
> Maybe someone remembers my post about my session-problem. > Pretty much the same > type. session gets registered just fine, but the var's are > not being serialized() > and put into the session-file. I never really relized that > this only happens if I > work at home, which is with a netscape

RE: [PHP] Precedence question- cookie value over form value?

2001-04-24 Thread Johnson, Kirk
Depends :) *If* the variables_order directive in php.ini is set to the default EGPCS (Env,Get,Post,Cookie,Server), *and* register_globals in php.ini is on, *and* there is not a session variable with the same name that has already been assigned a value, *then* the value in the cookie will end up i

RE: [PHP] A simple problem!

2001-04-24 Thread Johnson, Kirk
Since $colour is assigned outside the function, it is in the global scope. Add the line "global $colour;" to the function to use $colour in the function's local scope. Kirk > -Original Message- > From: Subodh Gupta [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 24, 2001 11:54 AM > To:

RE: [PHP] --enable-trans-sid and forms

2001-04-26 Thread Johnson, Kirk
Chris, I'm not sure what is supposed to happen, but what is happening for me is that a HIDDEN field is added to my form with the sid as the value: Kirk > -Original Message- > From: Boget, Chris [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 26, 2001 3:09 PM > To: Php (E-mail) > Sub

RE: [PHP] --enable-trans-sid and forms

2001-04-27 Thread Johnson, Kirk
Here is what I see in my FORM with --enable-trans-sid: PHP is adding the HIDDEN field with the session id. For some reason, it also appends it to the SRC attribute of the image submit button, but doesn't add it in the ACTION url. Kirk > -Original Message- > Its my understandin

RE: [PHP] --enable-trans-sid and forms

2001-04-27 Thread Johnson, Kirk
Thanks, Maxim, I hadn't seen the url_rewriter.tags entry in php.ini before. A search of the PHP manual only returns one unhelpful reference, tho. Any idea where to find some documentation on this? TIA Kirk > -Original Message- > From: PHPBeginner.com [mailto:[EMAIL PROTECTED]] > > have

RE: [PHP] Variable (naming them) Functions.

2001-04-27 Thread Johnson, Kirk
Did you see create_function()? Not sure if this is what you are after, but http://www.php.net/manual/en/function.create-function.php Kirk > -Original Message- > From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] > Subject: [PHP] Variable (naming them) Functions. > > Hello everyone: > > I

RE: [PHP] Variable (naming them) Functions.

2001-04-27 Thread Johnson, Kirk
001 10:27 AM > To: Johnson, Kirk; 'PHP General List. (E-mail)' > Subject: RE: [PHP] Variable (naming them) Functions. > > > create_function seems not letting you choosing it's name. > > am I right, or there's a way to say: > create_function($name.$t

RE: [PHP] Please review our coding standards [ ideas ]

2001-04-30 Thread Johnson, Kirk
Steve, I am wondering what your reason is for item 4.2. Security, or otherwise? Personally, I like having various file extensions, for sorting files by content type. Thanks for putting this up here. Kirk > -Original Message- > From: Steven Haryanto [mailto:[EMAIL PROTECTED]] > Subject:

[PHP] Your opinion on security issue: file extension

2001-05-01 Thread Johnson, Kirk
I would like opinions on a security question. A co-worker suggested we rename our application files to some extension other than .php (for example, .htm). The reasoning being that the .php extension tells a cracker that we are using PHP, and not ASP, or ColdFusion, etc. The cracker can focus imme

RE: [PHP] String delimeters, arg!

2001-05-01 Thread Johnson, Kirk
> I am having a problem with string delimiters. For some reason > no matter what I do I can not get them to process correctly!! > For example, > > $area_entered = "yes"; > $date_entered = "no"; > echo "$area_entered\t\t\t$date_entered"; > ?> > > That outputs: > yes no > > What am I doing wr

RE: [PHP] session_destroy()

2001-05-01 Thread Johnson, Kirk
> -Original Message- > From: Nick Adams [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 01, 2001 3:47 PM > To: [EMAIL PROTECTED] > Subject: [PHP] session_destroy() > > > Just curious if anyone knows how to properly destroy a session. As I understand it, session_unregister() removes a va

RE: [PHP] PHP.ini

2001-05-01 Thread Johnson, Kirk
> -Original Message- > Is there a way for each user on a server to have their own php.ini > settings? If so...how? Thanks > > Chris Anderson aka "Null" If you are using Apache, see the documentation for .htaccess files. These files allow you to set individual php.ini settings on a per

RE: [PHP] This is driving me to drink...

2001-05-01 Thread Johnson, Kirk
Do you have some echo statements on $p_code and $neuroKey right before the if statement, to make sure your assumptions are true? Kirk > -Original Message- > From: Richard S. Crawford [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 01, 2001 4:58 PM > To: [EMAIL PROTECTED] > Subject: [PHP]

RE: [PHP] session_register()

2001-05-02 Thread Johnson, Kirk
> -Original Message- > From: Jennifer [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 02, 2001 2:51 AM > To: [EMAIL PROTECTED] > Subject: [PHP] session_register() > > Do you need to register a variable with the session before you > assign it a value? Not in my experience. > session_

RE: [PHP] session_register()

2001-05-03 Thread Johnson, Kirk
er [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 02, 2001 11:55 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] session_register() > > > "Johnson, Kirk" wrote: > > > > > -Original Message- > > > From: Jennifer [mailto:[EMAIL PROTECTED]

RE: [PHP] Include and require

2001-05-03 Thread Johnson, Kirk
> According to the docu u should not require() files or > external code in loops > or u must use curly Bracket when used in if conditions. > > But everythink works fine. I require() successfully in for > loops, I can use > it in if..elseif..else constucts without curly brackets. > (only one li

RE: [PHP] File Uploads and Get Method

2001-05-03 Thread Johnson, Kirk
> -Original Message- > now, on the same form, i have a multiple select box, where > you can select > multiple values from one select box. the code is as follows -- > > [ snip ] > > > if the user selects more than one country, then if you echo > $country, it > will show you only the

RE: [PHP] using an array with form list values

2001-05-03 Thread Johnson, Kirk
Try enclosing the foreach inside an: - if block which checks that count($preferred_location) > 0; or, - if block which checks if it is defined, if($preferred_location). Hopefully, one of these should work :) Kirk > -Original Message- > From: Claudia [mailto:[EMAIL PROTECTED]] > Sent: T

RE: [PHP] Session Variables

2001-05-03 Thread Johnson, Kirk
> -Original Message- > From: Nikhil Goyal [mailto:[EMAIL PROTECTED]] > When does a session variable become available? Immediately after the > session_register command or after the script ends? Immediately after it is assigned. > And if the commands are as follows: > > session_start();

RE: [PHP] Session Problems....HELP!!!!

2001-05-03 Thread Johnson, Kirk
Just move these two lines to the beginning of the file: session_start(); session_register("test"); These have to be before any output is sent to the browser. Kirk > -Original Message- > From: Bruno Freire [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 03, 2001 2:42

RE: [PHP] Session Variables

2001-05-03 Thread Johnson, Kirk
> Script #2 > #!/usr/local/bin/php > session_start(); > echo $count; > ?> > > If I start script#1 (and it sleep()s), wait 10 seconds, then > launch script > #2 in a separate browser window, script #2 returns empty. > However once the > sleep() is completed and

RE: [PHP] Session Variables

2001-05-03 Thread Johnson, Kirk
Sorry for the confusion. The variable has a value as soon as you assign it, and you can use the variable in other statements within the same script. However, the value does not get stored to the session file until after the script ends. Kirk > -Original Message- > From: Nikhil Goyal [mai

RE: [PHP] Need to know this

2001-05-04 Thread Johnson, Kirk
People Hate Perl ;) Kirk > I need to find out what PHP stands for. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

RE: [PHP] session_register()

2001-05-04 Thread Johnson, Kirk
> -Original Message- > From: Jennifer [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] session_register() > > 1. What browser are you using? I, and others, have seen > erratic results with > > sessions using Netscape 4.x. If this is your browser, try > your code with > > another browser,

RE: [PHP] session_register() - Netscape workaround?

2001-05-07 Thread Johnson, Kirk
-Original Message- > From: Jennifer [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] session_register() - Netscape workaround? > I thought of a workaraound for Netscape and would like some > feedback on how to do it and whether it is a good idea. > > I manually edited the session file an

RE: [PHP] variable functions: empty/isset/unset invalid?

2001-05-07 Thread Johnson, Kirk
Change the parens around $var to curly braces: if ($foo{$var}) print 'worked.'; Kirk > -Original Message- > From: Philip Olson [mailto:[EMAIL PROTECTED]] > Subject: [PHP] variable functions: empty/isset/unset invalid? > > This does not work as expected (as I expect it at least) and giv

RE: [PHP] variable functions: empty/isset/unset invalid?

2001-05-07 Thread Johnson, Kirk
if ($foo($var)) print '$var is empty'; > > ?> > > In otherwords, only these few functions aren't working as "variable > functions" but result in a "Fatal Error" instead. Why? > > > Regards, > Philip > > On Mon, 7 May 200

RE: [PHP] Multiple select box and form submitting

2001-05-07 Thread Johnson, Kirk
Use empty brackets in the name attribute, e.g., . PHP will then create an array indexed by numbers. PHP will automatically assign indices in assignments if you omit the index: "; echo $array[1].""; ?> Kirk > -Original Message- > From: ..s.c.o.t.t.. [gts] [mailto:[EMAIL PROTECTED]] > Su

RE: [PHP] money print out with two digits after , e.g. 49,00

2001-05-08 Thread Johnson, Kirk
Try number_format() http://www.php.net/manual/en/function.number-format.php Kirk > -Original Message- > From: Ramiro Radjiman [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 08, 2001 8:35 AM > To: [EMAIL PROTECTED] > Subject: [PHP] money print out with two digits after , e.g. 49,00 > >

RE: [PHP] Include

2001-08-07 Thread Johnson, Kirk
> I try to use include() and require() an that what i get: > The path is 100% good. > > Warning: Failed opening '../inc/menu.inc' for inclusion > (include_path='') in Make sure that file permissions allow 'nobody' to view the file. -- PHP General Mailing List (http://www.php.net/) To unsubscr

RE: [PHP] 3rd include

2001-08-08 Thread Johnson, Kirk
> 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 -- PHP General Mailing List (http://www.php.ne

RE: [PHP] include, chmod, password files

2001-08-08 Thread Johnson, Kirk
> 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? Belo

RE: [PHP] Session problem

2001-08-08 Thread Johnson, Kirk
> > > > > session_start(); > > > global $count; > > > session_register ("count"); > > > $count++; > > > ?> > > > > > > Hello visitor, you have seen this page > > $HTTP_SESSION_VARS["count"]; ?> times. There was a bug in PHP in versions prior to 4.0.6: $count and $HTTP_SESSION_VARS["count"] did

RE: [PHP] Session problem

2001-08-08 Thread Johnson, Kirk
> 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 b

RE: [PHP] Session problem

2001-08-08 Thread Johnson, Kirk
> 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 b

RE: [PHP] register_globals odd behaviour?

2001-08-21 Thread Johnson, Kirk
> I just come across and odd behaviour with the register_globals and > session handling. The problem is that when I set the register > globals to > on I cannot access the session_variables through the associative array > HTTP_SESSION_VARS. The manual says explicitly that with track_vars and > reg

RE: [PHP] sessions

2001-08-21 Thread Johnson, Kirk
> session_start(); > session_unregister(val_1); > session_register(val_1); > > I am doing this to clear the contents of val_1 before I use it again. > Needless to say its not working. val_1 always contains the > same value until session_registering()'ing a variable just puts it in a list of nam

RE: [PHP] Sessions, Is this behavior by design?

2001-08-21 Thread Johnson, Kirk
> apparently, session_is_registered and isset return null if > they evaluate to > false. I was expecting boolean true and false return values, What you were expecting is correct, boolean true/false. However, it appears that PHP converts these values to strings during the echo. true converts to

RE: [PHP] Session Headaches

2001-08-21 Thread Johnson, Kirk
Start with this correction on page1.php: > if (session_is_registered != 1) { should be > if (session_is_registered("FailedLogins") != 1) { We'll go from there :) Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

RE: [PHP] Session Headaches

2001-08-21 Thread Johnson, Kirk
OK, the session_is_registered() thing is correct. > It seems like the gist of the problems is that different > pages can't seem to > modify the same session variables. This is definitely not the case. Two things to try: 1. In page2, put some logic around the "session_register("FailedLogins");"

RE: [PHP] chicken and egg problem with SID

2001-08-21 Thread Johnson, Kirk
One way around this is to make the first page just a dummy that starts a session then redirects to the real first page, with the session id passed on the redirect URL. Kirk > -Original Message- > From: Egan [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 10:56 AM > To: [EMAIL

RE: [PHP] Session Headaches

2001-08-21 Thread Johnson, Kirk
> I am using php 4.0.6 and i would rather not use global variables. I hear ya. After playing around with this, your approach works if register_globals is set to off (I did this with an .htaccess file). I'm surprised by this. It appears that the global version of a variable still overwrites the H

RE: [PHP] Script timeout

2001-08-23 Thread Johnson, Kirk
>Why timeout at 300s instead of the 30s or the 12000s which > > are the only two values reported? > > Looks like some HTTP timeout, i.e. either Apache or the browser is > getting bored. Try outputting something from time to time. Can anybody point me to information on all the possible HTTP time

RE: [PHP] GET / POST strange error

2001-08-24 Thread Johnson, Kirk
I have seen this behavior when the user had a bookmark to the page with a session ID in the bookmark URL. Just a thought. Kirk > -Original Message- > From: Mike [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 24, 2001 8:17 AM > To: [EMAIL PROTECTED] > Subject: [PHP] GET / POST strange

RE: [PHP] Fwd: functions returning arrays

2001-08-24 Thread Johnson, Kirk
Try "echo "$r[$i]" instead of echo "$r[i]". Kirk > -Original Message- > From: Frank Loewenthal [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 24, 2001 9:33 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Fwd: functions returning arrays > > > Hi > > Perhaps I am confused, but is it not

RE: [PHP] Session not timing outafter 180 minutes

2001-08-27 Thread Johnson, Kirk
> Everything is pretty much set to default vaules. I can > leave the browser open and come back 12+ hours later > and the session is still active. Why?? There is another setting which affects this, gc_probability. This setting determines how often the garbage collection routine runs (that kills o

RE: [PHP] parse error AFTER end of included file??

2001-08-28 Thread Johnson, Kirk
You need to close off this bit of code with a brace '}': if (!isset($page_id)) { Kirk > -Original Message- > From: Jaxon [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 28, 2001 9:34 AM > To: [EMAIL PROTECTED] > Subject: [PHP] parse error AFTER end of included file?? > > >

RE: [PHP] Add Slashes - Server Adds Them Automatically - Advice Requested!

2001-08-29 Thread Johnson, Kirk
See the magic_quotes_gpc setting in the php.ini file. This can be set to on or off, and is responsible for escaping GET/POST/COOKIE data automatically. Kirk > -Original Message- > From: Mike Gifford [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 29, 2001 9:58 AM > To: [EMAIL PROTEC

RE: [PHP] Posting to oneself

2001-08-29 Thread Johnson, Kirk
Check if register_globals is off in php.ini. If it is, you will need to access it through the $HTTP_SERVER_VARS array, e.g., $HTTP_SERVER_VARS['PHP_SELF']. Kirk > -Original Message- > From: John Meyer [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 29, 2001 5:43 PM > To: Jason Bell;

RE: [PHP] RE: multiple submit buttons

2001-08-31 Thread Johnson, Kirk
Tim Ward wrote: > Be careful using values of submit buttons ... if the user hits return instead of clicking one of the buttons you won't get anything. If you want a default value try a hidden field before the submits with same name. > Tim, thanks for the tip. I had heard of this behavior before

RE: [PHP] http get vars missing?? track vars enabled - HELP

2001-09-04 Thread Johnson, Kirk
> I'm about ready to go insane over this one. I have the following link. > > http://www.wayneswoodworks.net/test/samples.php3?&key=1 > > When I get into samples.php3 I do: > > $record = $HTTP_GET_VARS["key"]; > > echo "record=$record"; > > And the record variable is blank/missing. Did you ge

RE: [PHP] Reprise of dissapearing session variables

2001-09-10 Thread Johnson, Kirk
> The session variables will remain set, but will it looks > like my session gets lost every now and then if you want > to see an example, go to http://northpointless.org/test.php > and hit refresh several times. I cannot figure out what is happening. Did you get this figured out? It lo

RE: [PHP] Reprise of dissapearing session variables

2001-09-10 Thread Johnson, Kirk
> session files get saved in /tmp by default, correct? Is > there a way to have > them saved somewhere that would propogate to all the servers > in the cluster? Warning! The following is from me, a non-gearhead. 1. We use a load balancer which is able to set a cookie on the first page request

RE: [PHP] Reprise of dissapearing session variables

2001-09-10 Thread Johnson, Kirk
We use a Big-IP controller from F5: http://www.f5.com/f5products/bigip/index.html Kirk > -Original Message- > From: Jason Bell [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 1:33 PM > To: PHP Users > Subject: Re: [PHP] Reprise of dissapearing session variables > > > Than

RE: [PHP] internet explorer and form submission

2001-09-13 Thread Johnson, Kirk
> so if a particular form button is clicked a different process > will occcur. > > well what happens if i press return to enter my form submission? > nothing is set! > > so the processing file does nothing This has been pointed out from time to time on this list. It is a fact: if the user subm

RE: [PHP] minus in [] groups in ereg

2001-09-13 Thread Johnson, Kirk
Feature. By placing a "dash" next to the bracket, there is no confusion that the dash is being used to specify a range. Kirk > -Original Message- > From: Andrew Perevodchik [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 13, 2001 9:32 AM > To: [EMAIL PROTECTED] > Subject: [PHP] mi

RE: Re[2]: [PHP] minus in [] groups in ereg

2001-09-13 Thread Johnson, Kirk
> JK> Feature. By placing a "dash" next to the > JK> bracket, there is no confusion that the dash > JK> is being used to specify a range. > > Doesn't slash before dash mean that??? Could be, I don't know. I always put a dash next to the bracket, instead of escaping it with a backslash. As is oft

RE: [PHP] session_unset & session_destroy being called outside of logic.

2001-09-13 Thread Johnson, Kirk
Several comments, Jason. > session_destroy() terminates the session, which cannot be > started up again > until the browser is restarted... Yes, session_destroy removes the session file that stores the values of session variables between pages. Once gone, it cannot be accessed again under any

RE: [PHP] How to set the time for session??

2001-09-19 Thread Johnson, Kirk
> Then how can i set the time for session?? See the php.ini file, for session.gc_maxlifetime setting: session.gc_maxlifetime= 1440; after this number of seconds, stored ; data will be seen as 'garbage' and ; cleaned

RE: [PHP] include() problem...

2001-09-20 Thread Johnson, Kirk
Check the permissions on both the directory and the file, so that they are accessible to 'nobody' (or whomever PHP is running as). I'm not sure what to make of the empty include path in the error message. Kirk > I've tried including just a file that was in the /usr/lib/php > directory. > No lu

RE: [PHP] Codes in PHP

2001-09-20 Thread Johnson, Kirk
I only know of two ways to do page redirects with PHP: the header() function and a META refresh tag. I suppose you could also use PHP to dynamically generate the javascript code you included in your email. Good luck! Kirk > - Original Message - > From: "Wee Chua" <[EMAIL PROTECTED]> > T

RE: [PHP] Getting the value from a not posted form edit Vield.

2001-09-21 Thread Johnson, Kirk
I'm not sure what question you are asking, but try changing this line $aFinfOn = Getenv($aFindOnInput); to $aFinfOn = $HTTP_POST_VARS["aFindOnInput"]; The function getenv() gets environment variables, not post variables. Kirk > -Original Message- > From: hvm [mailto:

RE: [PHP] Getting my head around nulls.

2001-09-24 Thread Johnson, Kirk
> And remember "0 as a number is as important as any other number". I wish the rest of the world saw it that way! But not so... You may want to look at MySQL's IS_NULL function for retrieving data. Other than that, I don't have any good advice. It seems that if you retrieve a NULL from the datab

RE: [PHP] Sessions just don't work on my machine. (Trying this again)

2001-09-24 Thread Johnson, Kirk
Perhaps you could post the [Session] section of your php.ini file. It appears that session.cookie_lifetime is not set to 0, which is what you want for a session cookie. Perhaps we can find another setting that needs a change. Kirk > Sessions just don't work on my machine... -- PHP General Mail

RE: [PHP] Sessions just don't work on my machine. (Trying this again)

2001-09-24 Thread Johnson, Kirk
> After reloading IE on the PC now the SID constant doesn't > echo anything at > all. SID is always defined on the first page request. It is only defined on later page requests if cookies are disabled in the browser. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-ma

RE: [PHP] Sessions just don't work on my machine. (Trying this ag ain)

2001-09-24 Thread Johnson, Kirk
Try these changes: session.cookie_lifetime = 0 session.use_trans_sid = 1 Also, what version of PHP are you using? > My php.ini: > > [Session] > session.save_handler = files > session.save_path = /tmp > > session.use_cookies = 1 > session.name = PHPSESSID

RE: [PHP] Sessions just don't work on my machine. (Trying this ag ain)

2001-09-24 Thread Johnson, Kirk
OK, now the session ID is getting passed like it should. Now for the two missing variables. Try moving the two assignment statements ahead of the two session_register() calls - "assign, then register". I have never seen this make a difference, but the pros on this list say that is the way it needs

RE: [PHP] Sessions just don't work on my machine. (Trying this ag ain)

2001-09-24 Thread Johnson, Kirk
OK, do you have access to your /tmp directory? If so, close your browser, then open it and request your index page. Now sort the files in /tmp by creation time, to find the newly created session file. Look at its contents, and see if the 2 variables have values assigned to them in the file. Do thi

RE: [PHP] Getting my head around nulls.

2001-09-25 Thread Johnson, Kirk
> SELECT * from some_table WHERE some_field IS NULL; > > > Andrey Hristov > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] Th

RE: [PHP] Can I rely on session.gc_maxlifetime?

2001-09-25 Thread Johnson, Kirk
> So, no matter if the user is still working, the session will be > destroyed. I mean session.gc_maxlifetime isn't > session.gc_maxIDLEtime? Every time the user requests a page in an application using sessions, the session file's access time gets updated. The garbage collection routine looks a

RE: [PHP] Can I rely on session.gc_maxlifetime?

2001-09-25 Thread Johnson, Kirk
> I thought that php works as you wrote. But sometimes I find that much > older session are still "alive". I have 1440secs for maxlifetime, and > if I bookmark a page with the session id I can use it till days or > even weeks (I haven't tested longer time period :)) Are old files being re-use

RE: [PHP] Globals and HTTP_SESSION_VARS variables.

2001-09-26 Thread Johnson, Kirk
> Is here anyway to make a variable like $var not the same than > $HTTP_SESSION_VARS[var], when register_globals=1?. (where > $var is in the > script scope). > > I read in a changelog that this is relatively recent (make > $var the same > than $HTTP_SESSION_VARS[var]). I'm not sure what was ch

<    1   2   3