RE: [PHP] Rounding to strange results

2001-03-06 Thread Johnson, Kirk
Is there a comma in one thousand, e.g., 1,000.00? round() will truncate everything to the right of a comma. Kirk -Original Message- From: Martin E. Koss [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 06, 2001 7:45 AM To: [EMAIL PROTECTED] Subject: [PHP] Rounding to strange results

RE: [PHP] Netscape problems with PHP

2001-03-06 Thread Johnson, Kirk
Robert, can you (or anyone else) describe further the problem with Netscape and $PHP_SELF? This sounds a little worrisome to me! TIA Kirk -Original Message- From: Robert Fischler, Ph.D. ABD [mailto:[EMAIL PROTECTED]] Sent: Friday, March 02, 2001 5:00 PM To: [EMAIL PROTECTED] Subject:

RE: [PHP] RE: Value of if(isset(X)) problem

2001-03-07 Thread Johnson, Kirk
Tim, I just tried this in IE 5.0, and the submit button name-value pair was posted along with the other form variables, even though I submitted the form by hitting return on another field. Is the behavior you described specific to a certain browser version? Kirk -Original Message- From:

[PHP] over riding magic_quotes_sybase with ini_set()

2001-03-12 Thread Johnson, Kirk
Does anyone know if it is possible to override the php.ini setting for magic_quotes_sybase, using the ini_set() function? I have tried both of the following without success: ini_set("magic_quotes_sybase",1); and ini_set("magic_quotes_sybase","On"); I am trying to enable it for a particular

RE: [PHP] Getting name of the main file from external included script..

2001-03-13 Thread Johnson, Kirk
Aviv, I'm not quite sure what you are asking. If you are just doing an include() or a require() on a chunk of code, then I think the usual server variables will give you the path of the main file, e.g. $PHP_SELF. If you are doing a *redirect* to a *different page*, then you could look at

RE: [PHP] [Q] session variables wouldn't keep contents.

2001-03-14 Thread Johnson, Kirk
-Original Message- From: Chung Ha-Nyung [mailto:[EMAIL PROTECTED]] My second example program. a.php ?php session_start(); session_register("name"); $HTTP_SESSION_VARS["name"] = "test"; echo session_encode(); ? a.php result is as following.

RE: [PHP] Sessions, no cookies, enable-trans-sids, no success

2001-03-14 Thread Johnson, Kirk
Eric, I gotta ask the obvious question: did you have cookies disabled in your browser when you were checking this out? PHPSESSID only gets appended when cookies are disabled. If that is not the problem, I have no suggestions. Works for me as advertised. Kirk -Original Message- From:

RE: [PHP] Will my script run after redirect?

2001-03-15 Thread Johnson, Kirk
This will work fine. The script will continue to run after the meta refresh unless the exit is there. -Original Message- From: Carfield Yim [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 15, 2001 3:24 AM To: [EMAIL PROTECTED] Subject: [PHP] Will my script run after redirect? if(

RE: [PHP] separate php.ini files

2001-03-15 Thread Johnson, Kirk
We just started doing this using Apache's virtual hosting and .htaccess files to alter php.ini's configuration settings on a per application basis. Haven't played with it much yet, tho. Looks good so far. -Original Message- From: Kevin Porter [mailto:[EMAIL PROTECTED]] Subject: [PHP]

RE: [PHP] How do you keep your scripts secure?

2001-03-15 Thread Johnson, Kirk
If the include file has an extension that is not recognized by the server as being a "PHP" file, the server will simply serve it up as text. So, your file index.php is recognized as being a PHP file, it gets passed to PHP which parses and compiles it and returns it to the server, which passes the

[PHP] Can CONSTANT's be made persistent?

2001-03-16 Thread Johnson, Kirk
Can a defined()'d CONSTANT be made persistent between pages? According to my experiments, the answer is "no". Am I missing something? TIA Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

RE: [PHP] how do i get a variable type? - not that simple

2001-03-18 Thread Johnson, Kirk
How about a regex check for numeric characters with and without a decimal point (and no leading zeros), versus alphanumerics? Just an "off the top of my head suggestion", back to work... Kirk -Original Message- ""phpman"" [EMAIL PROTECTED] wrote in message 99132e$ol8$[EMAIL

RE: [PHP] use strict alternative

2001-03-19 Thread Johnson, Kirk
I think there is an error_level you can set that will warn about using *undefined* variables before they have been assigned a value. Don't recall the details offhand. Kirk -Original Message- From: Christian Reiniger [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 5:37 AM To:

RE: [PHP] how do i get a variable type? - not that simple

2001-03-19 Thread Johnson, Kirk
Jim, Thanks for sharing all your hard work. Have you seen checkdate()? http://www.php.net/manual/en/function.checkdate.php Kirk -Original Message- From: Ide, Jim [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 6:38 AM To: 'phpman'; [EMAIL PROTECTED] Subject: RE: [PHP] how

RE: [PHP] math query

2001-03-19 Thread Johnson, Kirk
do an ereg_replace("[^0-9]","",$var) before the calculation, to remove all non-numeric characters. kirk -Original Message- From: Peter Houchin [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 4:13 AM To: Php-General@Lists. Php. Net Subject: [PHP] math query hiya, is

Re: [PHP] I don't understand HTTP_SESSION_VARS

2001-03-23 Thread Johnson, Kirk
Try as below. Note both the global and the session_register statements. function set session() { global $my_session_var,$HTTP_SESSION_VARS; session_start(); $my_session_var = "Blah blah"; session_register($HTTP_SESSION_VARS['my_session_var']); } Kirk -Original Message-

RE: [PHP] I don't understand HTTP_SESSION_VARS

2001-03-23 Thread Johnson, Kirk
OK, try this. The session_start() has to come before the global statement: ?php function write_session() { session_start(); global $HTTP_SESSION_VARS; $HTTP_SESSION_VARS[my_session_var] = "Boogedy Boogedy"; session_register($HTTP_SESSION_VARS["my_session_var"]); } write_session(); echo

RE: [PHP] I don't understand HTTP_SESSION_VARS

2001-03-23 Thread Johnson, Kirk
Mike, my experiments suggest you can also get rid of the session_register() statement. Seems that simply assigning to $HTTP_SESSION_VARS[my_session_var] is enough. Kirk -Original Message- From: Michael Champagne [mailto:[EMAIL PROTECTED]] Subject: RE: [PHP] I don't understand

RE: [PHP] session expiretime

2001-03-27 Thread Johnson, Kirk
Yes and no. session.gc_maxlifetime is the right setting, and this means the session will last *at least* this long. The setting in session.gc_probability also has an effect. This gives the percentage of page hits on which gc is launched. For example, if session.gc_probability = 1, then on one out

RE: [PHP] Simple If-else statement

2001-03-27 Thread Johnson, Kirk
This code is checking if $fname and $lname are equal to a single blank character. Is this what you want? My guess is you really want if(($fname == "") || ($lname == "")) Another way to write this is if( (!$fname) || (!$lname) ) Kirk -Original Message- From: Louis

RE: [PHP] Sessions Q.

2001-03-29 Thread Johnson, Kirk
PHP will do this for you. See the setting "session.gc_maxlifetime" in the php.ini file. This sets the session lifetime. Kirk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 10:37 AM To: [EMAIL PROTECTED] Subject: [PHP] Sessions

RE: [PHP] php error code.

2001-03-29 Thread Johnson, Kirk
If you have permission to modify php.ini, see the setting "display_errors" and the attached comments. You can tell PHP to write these error messages to a log file instead of to the browser. Kirk -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Thursday, March

RE: [PHP] weird isset problem

2001-03-29 Thread Johnson, Kirk
I see one typo, is that the problem? Kirk Hi! I have this weird thing happening here and I just can't see the problem. Can someone look at this and tell me if you see what is wrong? Code print isset($config["harvester_list"]) ."\n1\n"; print

RE: [PHP] Help!

2001-03-29 Thread Johnson, Kirk
Did the permissions get changed to something that nobody can no longer read? Kirk - Original Message - From: Clayton Dukes To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, March 29, 2001 6:06 PM Subject: [PHP] Help! Arrrgh,

RE: [PHP] perl: use strict

2001-03-30 Thread Johnson, Kirk
Sorta, not really. You can turn up the error reporting level so that using a variable before it is defined will generate a warning. That should get what you are after. See http://www.php.net/manual/en/function.error-reporting.php . As usual, be sure to hit the reader comments :) Kirk

RE: [PHP] constants and case sensitivity

2001-03-30 Thread Johnson, Kirk
I get the same results as you using PHP4. I can't explain this, since constants are supposed to be case sensitive by default. They sure don't act like they are. Looks like a bug to me. Kirk -Original Message- From: almir [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 12:44

RE: [PHP] crack lib

2001-12-28 Thread Johnson, Kirk
Hey, what is everyone talking about? What is the new crack lib functionality? Is it in the docs yet? TIA Kirk -- 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,

RE: [PHP] problem reading sessions

2002-01-04 Thread Johnson, Kirk
Is register_globals set to 'on' in php.ini? It needs to be for this coding style to work. Kirk -Original Message- From: Alastair [mailto:[EMAIL PROTECTED]] Sent: Friday, January 04, 2002 1:41 PM To: [EMAIL PROTECTED] Subject: [PHP] problem reading sessions I have just

RE: [PHP] Strange Session Issues

2002-01-07 Thread Johnson, Kirk
Once again, is register_globals on or off in your php.ini file? It would help us if we knew that :) Kirk -Original Message- From: Alastair [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 9:05 AM To: [EMAIL PROTECTED] Subject: [PHP] Strange Session Issues I posted a

RE: [PHP] Strange Session Issues

2002-01-07 Thread Johnson, Kirk
With it off, session_register() is not needed. Also, session variables must be accessed thru the $HTTP_SESSION_VARS[] array. Try this code: test_session1.php ? session_start(); $HTTP_SESSION_VARS['blah'] = good; ? test_session2.php ? session_start(); echo session_is_registered(blah) . br; echo

RE: [PHP] Strange Session Issues

2002-01-07 Thread Johnson, Kirk
So, it *is* a Happy Monday for you ;) You're very welcome. Kirk -Original Message- From: Alastair [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 10:06 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Strange Session Issues WOO HOO!!! :-) Thanks Kirk! I didn't realize

RE: [PHP] Sessions

2002-01-08 Thread Johnson, Kirk
!sess_id| means that $sess_id has been registered, but it hasn't been assigned a value. Is register_globals on or off in php.ini? Did you assign a value to $sess_id? Kirk -Original Message- From: Ryan Kelley [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 8:59 PM To:

RE: [PHP] Sessions

2002-01-09 Thread Johnson, Kirk
PHPSESSID will not be set on the first request. On the first request to a page with session_start(), PHP creates a session and sends a cookie named PHPSESSID to the browser. When the browser returns the cookie in the next request, PHPSESSID gets put into $HTTP_COOKIE_VARS[] array, and if

RE: [PHP] PHPLib

2002-01-10 Thread Johnson, Kirk
Hey guys, Has anyone used this before?? If so, is it a pain in the a$$? I read the documentation.. and sounds like you would need to re-code your authentication system, sessions blah blah to work with it? or am i going waay of target here?? All i wanna do is, customize my html...

RE: [PHP] Operators

2002-01-10 Thread Johnson, Kirk
If != is the opposite of == What is the opposite of === ?? I believe that is !== Kirk -- 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

RE: [PHP] session_unregister and register_globals = Off

2002-01-10 Thread Johnson, Kirk
I'm having difficulty trying to figure out how unregister a variable when register_globals is turned on. I've tried session_unregister but it doesn't seem to do anything. Just unset the $HTTP_SESSION_VARS['var'] element. Kirk -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] security benefits of predefined variables

2002-01-15 Thread Johnson, Kirk
Give this a read first, then come back if you still have questions ;) http://www.securereality.com.au/studyinscarlet.txt Kirk -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 1:50 PM To: PHP Subject: [PHP] security benefits of

RE: [PHP] security benefits of predefined variables

2002-01-16 Thread Johnson, Kirk
What is the purpose of the $_GET (or $HTTP_GET_VARS) predefined variable? It seems that in the case of get variables, malicious variables could still be set in the querystring and even using $_GET['variablename'] wouldn't be able to stop this from happening. That is, from what I

RE: [PHP] security benefits of predefined variables

2002-01-16 Thread Johnson, Kirk
I wrote: If you are careful, you can defend against Scenario 1 with register_globals on, but you need to understand all the stuff that PHP is doing with the data, and that is a fairly complicated picture. Your application can still work even if you don't understand that picture,

RE: [PHP] include() and URL's

2002-01-17 Thread Johnson, Kirk
Does the file have persmissions such that it is include()-able by nobody? Kirk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 4:33 PM To: [EMAIL PROTECTED] Subject: [PHP] include() and URL's I'm trying to include a URL

RE: [PHP] Session Time Out - Question

2002-01-18 Thread Johnson, Kirk
How do I set the amount of time before the sessions time out? See session.gc_maxlifetime in the php.ini file. Kirk -- 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

RE: [PHP] RTFM

2002-01-18 Thread Johnson, Kirk
I feel your pain. Good thought. Please Read The Fine Archive for long-running, in-depth discussion of this very topic ;) Happy Friday, all! Kirk just a very quick note: I've been following the list for about a week and I probably follow one or two threads a day. Some of the stuff here is

RE: [PHP] get the clicked submit image

2002-01-30 Thread Johnson, Kirk
http://www.php.net/manual/en/faq.html.php#AEN76234 Kirk -Original Message- From: Ergin Aytac [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 6:13 AM To: [EMAIL PROTECTED] Subject: [PHP] get the clicked submit image I have a form-page with several image-submit

RE: [PHP] Parse error

2002-02-04 Thread Johnson, Kirk
Check for a missing line or block terminator just above line 19. Kirk -Original Message- From: Ron Clark [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 11:32 AM To: [EMAIL PROTECTED] Subject: [PHP] Parse error I am getting the following error trin to use the

RE: [PHP] testing for cookies on the server side (again, still can't get my head around it)

2002-02-05 Thread Johnson, Kirk
So what's the flow of code to test for cookies on the server side? I'm pretty sure that the only way is to set a cookie, then test for it. That is pretty much it. On the first page request to your application, if PHP encounters a session_start() in your code, it will return a cookie named

RE: [PHP] Re: Changes in Sessions (PHP Versions)

2002-02-05 Thread Johnson, Kirk
This suggests that register_globals was set to 'off' in the first case and 'on' in the second case. The lines below are perfect examples of how to change the code when changing the register_globals setting in php.ini. Kirk -Original Message- From: Travis Simpson [mailto:[EMAIL

RE: [PHP] HowTo Send HTTP POST from Within Scrip

2002-02-05 Thread Johnson, Kirk
Search the archives on PostToHost, or also go here: http://www.zend.com/zend/spotlight/mimocsumissions.php#Heading6 http://marc.theaimsgroup.com/?l=php-generalm=92353052714384w=2 I think if you also search on UPS you will find discussion of this exact problem. Good luck! Kirk -Original

RE: [PHP] How do I send a POST request?

2002-02-12 Thread Johnson, Kirk
See PostToHost in the archives: http://marc.theaimsgroup.com/?l=php-generalm=92353052714384w=2 Kirk -Original Message- From: LaserJetter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:15 PM To: [EMAIL PROTECTED] Subject: [PHP] How do I send a POST request? I'm

RE: [PHP] session_id()

2002-02-12 Thread Johnson, Kirk
SID is defined on the *first* page request. It is only defined on later requests *if* cookies are disabled in the browser. Kirk -Original Message- From: Pax [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:54 PM To: [EMAIL PROTECTED] Subject: [PHP] session_id() I

RE: [PHP] empty session files stacking up in /tmp on solaris

2002-02-13 Thread Johnson, Kirk
Set the session.gc_probability to a positive value between 1 and 100. This setting is the proportion of page requests on which the session file garbage collection routine is launched, e.g., if you set it to 1, then on 1 out of every 100 page requests the garbage collection routine will delete old

RE: [PHP] Filling Forms with $variables

2002-02-13 Thread Johnson, Kirk
Enclose the value in quotes, like so: input type=text name=name value=?echo $name;? The browser can't know that Steven Walker is all one string unless it is quoted. It thinks the 2nd part of the name after the space is the next attribute, unless it is quoted, i.e., it is seeing value=Steven

RE: [PHP] VERY novice question!

2002-02-14 Thread Johnson, Kirk
Just go with your instincts, you got 'em ;) , AND for and ||, OR for or. The symbols are at one precendece level higher than the words, I believe. Kirk -Original Message- From: brendan conroy [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 10:47 AM To: [EMAIL

RE: [PHP] Timing Sessions Out

2002-02-19 Thread Johnson, Kirk
See session.gc_maxlifetime in php.ini. Kirk -Original Message- From: Phillip S. Baker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 4:10 PM To: PHP Email List Subject: [PHP] Timing Sessions Out Hey Gents and Ladies, I read that sessions can be set to timeout

RE: [PHP] Timing Sessions Out

2002-02-20 Thread Johnson, Kirk
Right you are, seconds. -Original Message- At 03:21 PM 2/19/2002 Tuesday, Johnson, Kirk wrote: See session.gc_maxlifetime in php.ini. Kirk I assume that the value given is in seconds. Correct?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

RE: [PHP] array session variable problem (register_global=off)

2002-02-20 Thread Johnson, Kirk
The code in the first file is correct if register_globals is on. Since it is off, remove the call to session_register() and just assign values directly to $_SESSION, e.g., $_SESSION[name['first']] = 'First Name'; Kirk -Original Message- From: Harry Yu [mailto:[EMAIL PROTECTED]]

RE: [PHP] Hyperlinks vs Buttons

2002-02-20 Thread Johnson, Kirk
Another way would be to create an image of the text, then use the input type=image form element as a submit button. Kirk -Original Message- Is there a way to regular hyperlinked text to submit a form? For example, rather than having a button that says [Login], I just want

RE: [PHP] array session variable problem (register_global=off)

2002-02-20 Thread Johnson, Kirk
Doh! I meant this: $_SESSION['name']['first'] = 'First Name'; -Original Message- From: Harry Yu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 4:52 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] array session variable problem (register_global=off) Thanks for your

RE: [PHP] sending form values in http header?

2002-02-21 Thread Johnson, Kirk
In the method line, the URL being POST'd to is form2.php, not form.php. Is that the correct file name, or should that be form.php? Kirk -Original Message- From: marcbey [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 5:47 AM To: [EMAIL PROTECTED] Subject: [PHP] sending

RE: [PHP] encryption and HTTP

2002-02-23 Thread Johnson, Kirk
The PHPLIB auth class has some code to do this. You might want to look there for ideas. If I recall correctly, they sent a hidden random string along with the form that was different on each request. They then did an md5 hash of the post data concatenated with the random string. Kirk

RE: [PHP] Help needed with Sessions

2002-02-26 Thread Johnson, Kirk
Start here: http://www.php.net/manual/en/ref.session.php You will need to call session_start() to initiate the session. You will also need to register the variables you want in the session with session_register(). Good luck! Kirk -Original Message- From: WG4- Cook, Janet

RE: [PHP] is there an in qualifier in PHP?

2002-02-26 Thread Johnson, Kirk
http://www.php.net/manual/en/function.in-array.php Kirk -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 9:34 AM To: PHP Subject: [PHP] is there an in qualifier in PHP? I have a problem with some code (posted below), which I think

RE: [PHP] session/cookies

2002-03-01 Thread Johnson, Kirk
Start by adding a session_start() to the 2nd file, then see what happens. Kirk Hi again, I am doing a simple example of cookies and my server seems to get frozen. Basically, what I do is: file01.php: ? session_start(); seession_register(sess_var); sess_var = Hello; ?

RE: [PHP] HTTP Post to another server

2002-03-03 Thread Johnson, Kirk
Search the archive on PostToHost, or see this link: http://www.zend.com/zend/spotlight/mimocsumissions.php#Heading6 Kirk -Original Message- From: Quentin Bennett [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 3:19 PM To: [EMAIL PROTECTED] Subject: [PHP] HTTP Post to

RE: [PHP] FORM RELATED QUESTION - I

2002-03-05 Thread Johnson, Kirk
Append '[]' to the field name, e.g., order[] = 10 order[] = 20 Then process the submitted field as an array. Kirk -Original Message- From: karthikeyan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 9:18 AM To: Jason Wong Cc: [EMAIL PROTECTED] Subject: Re: [PHP] FORM

FW: [PHP] Netscape Vs. IE

2002-03-11 Thread Johnson, Kirk
-Original Message- From: Richard S. Crawford [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 8:30 AM To: Vlad Kulchitski Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Netscape Vs. IE This can be done without CSS, actually. Try: td background=imagefile Not all browsers

RE: [PHP] 'undef' as an argument value

2002-03-11 Thread Johnson, Kirk
http://www.php.net/manual/en/function.func-num-args.php will return the number of arguments passed to the function. Kirk -Original Message- From: Rodent of Unusual Size [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 2:25 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] 'undef'

RE: [PHP] Session and SID

2002-03-19 Thread Johnson, Kirk
SID is set on the first request. It is only set on subsequent requests if cookies are disabled on the client. So, disable cookies in your browser, and then see what happens. Kirk -Original Message- From: Chris Kay [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 6:16 AM To:

RE: [PHP] PHP 4.2.0 Release Candidate 1

2002-03-20 Thread Johnson, Kirk
Where can we read a description of what is in this release? TIA Kirk A release candidate for PHP 4.2.0 has just been packed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] echo and Session Variables

2002-03-21 Thread Johnson, Kirk
Please note that an unquoted array key is now deprecated syntax. See http://www.php.net/manual/en/language.types.array.php Kirk The single quotes in $_SESSION['myvar'] are not necessary. You're reading an associative array in which a string is acting as a pointer to the index.

RE: [PHP] Stripslashes addslashes question ...

2002-03-24 Thread Johnson, Kirk
Have you echo'd the variables before the addslashes() call, to be sure that the stripslashes() call is being executed? Kirk -Original Message- From: John Kelly [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 23, 2002 12:59 AM To: [EMAIL PROTECTED] Subject: [PHP] Stripslashes

RE: [PHP] header and session?

2002-03-25 Thread Johnson, Kirk
Do you have register_globals turned on or off in php.ini? What values are $a and $b being set to? Kirk -Original Message- From: bob [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 24, 2002 4:21 PM To: [EMAIL PROTECTED] Subject: [PHP] header and session? 1.php?

RE: [PHP] header and session?

2002-03-26 Thread Johnson, Kirk
With register_globals on, $a and $b need to be registered using session_register(). Don't assign them to $_SESSION, PHP does that for you with register_globals on. 1.php - session_start(); $a = 'some_value'; $b = 'nuther_value'; session_register('a','b'); header(location: 2.php); 2.php

RE: [PHP] [Session]

2002-03-26 Thread Johnson, Kirk
I am probably wrong about this, but I thought that you could register session variables using this technique only if you are using PHP 4.1.x and you use the format: $_SESSION['v_s'] = 500; The key point is the register_globals setting in php.ini. If it is set to on, then register

RE: [PHP] Adding stuff to the end of strings

2002-03-27 Thread Johnson, Kirk
Close! $message .= Some text here; Kirk -Original Message- From: David Johansen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 12:03 PM To: [EMAIL PROTECTED] Subject: [PHP] Adding stuff to the end of strings I was just wondering if there was a way to add new text

RE: [PHP] Require variable declaration?

2002-03-27 Thread Johnson, Kirk
You can catch typos by setting the error reporting level to E_ALL (in php.ini). PHP will then give you a warning whenever a variable is used before it has been assigned a value. Kirk That's too bad, I used to do some ASP which is weakly typed too but I still could use Option Explicit to

RE: [PHP] Emulating POST ?

2002-03-28 Thread Johnson, Kirk
http://www.zend.com/zend/spotlight/mimocsumissions.php#Heading6 http://marc.theaimsgroup.com/?l=php-generalm=92353052714384w=2 Kirk -Original Message- From: Devin Atencio [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 12:14 PM To: [EMAIL PROTECTED] Subject: [PHP]

RE: [PHP] Can not get session value???

2002-04-03 Thread Johnson, Kirk
Do you have a call to session_start() in the second file? You need this to access the session variables on the second page. Kirk -Original Message- From: N.D. Andini [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 3:20 AM To: [EMAIL PROTECTED] Subject: [PHP] Can not get

RE: [PHP] clarification on magic quotes

2002-04-04 Thread Johnson, Kirk
I believe the escaping only occurs at the time GET/POST/COOKIE data is brought into the PHP namespace from the server. I recommend you don't removing escapes from a security standpoint. Do a search on SQL injection to find info on how crackers can mess with you when data from the client is not

RE: [PHP] Making sure a post request came from your site

2002-04-05 Thread Johnson, Kirk
Good starters. I would add one more starter item: don't blindly grab everything out of the $_POST[] array. Instead, only grab the variables that *you* put on the form page. A cracker might send you a name/value pair like $admin=1, trying to guess what flag you are using for admin users. Kirk

RE: [PHP] the ?PHPSESSID=spoofme 'bug'

2002-06-11 Thread Johnson, Kirk
OK, I have questions. A session *file* is created, but it is empty. I know of only one way to get data into it, that is through a session variable. Session variables are controlled by the programmer, so unless the programmer is careless with their validation or register_globals setting, I don't

RE: [PHP] sessions trouble

2002-06-18 Thread Johnson, Kirk
Check the register_globals setting in php.ini. It looks like it is on on the problem server. If so, then you have two choices: 1. Turn it off 2. Change your code to this style: session_start(); $node = 10.2; session_register('node'); echo $node; Kirk -Original Message- From: Leston

RE: [PHP] sessions trouble

2002-06-18 Thread Johnson, Kirk
Is your version of PHP new enough to support the new $_SESSION[] array? If it is not, use $HTTP_SESSION_VARS[]. -Original Message- From: Leston Drake [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 12:29 PM To: Johnson, Kirk Cc: [EMAIL PROTECTED] Subject: RE: [PHP] sessions

RE: [PHP] sessions trouble

2002-06-18 Thread Johnson, Kirk
PROTECTED]] Sent: Tuesday, June 18, 2002 3:30 PM To: Johnson, Kirk Cc: [EMAIL PROTECTED] Subject: RE: [PHP] sessions trouble I am using PHP 4.1.2, which I assume supports the $_SESSION global array. I've tried ...sigh... using $HTTP_SESSION_VARS, with the same result, unfortunately

RE: [PHP] Netiquette

2002-06-20 Thread Johnson, Kirk
Foul! Top-post ;) *gives Ed a noogie* Concise is also good ;) *gives Erik a noogie* Erik wrote: I was going to stay out of the thread, because people have ways of doing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] tracing include

2002-06-21 Thread Johnson, Kirk
You could look at $HTTP_SERVER_VARS['SCRIPT_NAME'] in the included file, for one. Kirk Hi, is there any way to know in the included file the filename of the parent file? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] function definition causing problems?

2002-06-24 Thread Johnson, Kirk
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\inetpub\wwwroot\PHP\cat_proto3.php on line 46 Line 46 corresponds to the form tag, as follows: FORM ACTION=?php echo $_SERVER['PHP_SELF'] ? method=POST When you echo out

RE: [PHP] function definition causing problems?

2002-06-24 Thread Johnson, Kirk
I thought this syntax, an unquoted key name, was deprecated ;) From the manual at http://www.php.net/manual/en/language.types.array.php: You should always use quotes around an associative array index. Kirk Nope, use: echo This script is called $_SERVER[PHP_SELF]; -- PHP General Mailing

RE: [PHP] How to use Session Variables

2002-07-01 Thread Johnson, Kirk
With register_globals on: 1. Put session_start() at the top of each page. 2. Initialize the variable, then call session_register(): $foo = 'bar'; session_register('foo'); 3. Do all assignments to $foo, not $HTTP_SESSION_VAR['foo'], since $foo gets written to

[PHP] gc_probability: requests tallied per server or domain?

2002-07-02 Thread Johnson, Kirk
Is the number of requests (used for garbage collection), tallied on a per server basis, or on a per domain basis? What about in a load-balanced environment? TIA Kirk 0, as a number, is just as important as any other number. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] Need Help with $_SESSION.

2002-07-03 Thread Johnson, Kirk
Now, I still can not understand why the 2nd page show the $_SESSION as blank. It is suppose to contain datas. The php.net stated that $_SESSION is global. Any comments? register_globals on --- Page 1 ? session_start(); $foo = 'bar'; session_register('foo'); $foo =

RE: [PHP] gc_probability: requests tallied per server or domain?

2002-07-05 Thread Johnson, Kirk
On Tue, 2 Jul 2002, Johnson, Kirk wrote: Is the number of requests (used for garbage collection), tallied on a per server basis, or on a per domain basis? Pretty fair bet it's a per-server basis. miguel Thanks, miguel. That would be my guess, too. If both of us guessed the same thing

RE: [PHP] Sessions / logins / cookies / security

2002-07-16 Thread Johnson, Kirk
What I'm looking to do is when a user logs in, I start up the session.. I then have the registered session var to verify they are authenticated as they move throughout the site. Now, when they close the browser and come back, I want them to still be authenticated. I don't think this

RE: [PHP] New way to make select boxes auto select

2002-07-25 Thread Johnson, Kirk
Nathan, this is a new idea to me and very interesting. Do you know what happens here if the error reporting is set to max? Are a bunch of unitialized variables warnings issued? Thanks for contributing this to the list. Kirk -Original Message- From: Nathan Cook [mailto:[EMAIL

RE: [PHP] placing data outside the server root

2002-04-15 Thread Johnson, Kirk
Sure, just give it a try! Kirk -Original Message- From: andy [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 5:13 AM To: [EMAIL PROTECTED] Subject: [PHP] placing data outside the server root Hi there, is it possible to place data like images outside the server

RE: [PHP] Still having session problems

2002-04-16 Thread Johnson, Kirk
Are you absolutely positive register_globals is off? Is there an .htaccess file laying around someplace that overrides php.ini and turns it on? Sorry, I don't have any other ideas. Kirk -Original Message- From: Patrick Aland [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002

RE: [PHP] session_is_registered

2002-04-16 Thread Johnson, Kirk
With register_globals off, try this: ?php session_start(); // Try either one of these to assign the session var. $_SESSION['barney'] = A big purple dinosaur; $HTTP_SESSION_VARS['barney'] = A big purple dinosaur; header('Location: /'); exit; ? ?php // Another page... session_start(); // Try

RE: [PHP] How long does a session last? Need to have it at 20mins

2002-04-19 Thread Johnson, Kirk
Garbage collection is launched according to the gc_probablility. If it finds a session file that has not been modified for a longer time than gc_maxlifetime, it deletes it. So, whenever a user requests a page, they essentially reset the session timer to zero for that particular session, since the

RE: [PHP] parse error= doc contains no data

2002-04-19 Thread Johnson, Kirk
Try setting error_reporting = E_ALL ~E_NOTICE, or just E_ALL, in php.ini. Kirk -Original Message- From: Pedro Garre [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 11:25 AM To: php-general Subject: [PHP] parse error= doc contains no data I set my own error handler as

RE: [PHP] parse error= doc contains no data

2002-04-19 Thread Johnson, Kirk
. Note that if I don't set my own error_handler everything works and parse error messages are displayed as usual. More ideas ? Pedro. Johnson, Kirk escribió: *This message was transferred with a trial version of CommuniGate(tm) Pro* Try setting error_reporting = E_ALL ~E_NOTICE

RE: [PHP] what constants are in php like __FILE__

2002-04-24 Thread Johnson, Kirk
I'm just curious what other constants in php are defined. any hints where or how to find a list? http://www.php.net/manual/en/reserved.constants.php Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   3   4   >