RE: [PHP] Intuitive Interfaces

2003-11-25 Thread Johnson, Kirk
Cesar Cordovez wrote: Chris Shiflett wrote: Some Web sites I have visited think it is helpful to use some client-side scripting to move the focus from the first text field to the second after three numbers have been entered. I think this is the worst thing to do. If they are going to this

RE: [PHP] echo or print

2003-11-20 Thread Johnson, Kirk
when should i use echo ' '; vs. print ' '; Here's a link listed in the manual at http://www.php.net/manual/en/function.print.php http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40 Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] what ever happened to http referrer

2003-11-18 Thread Johnson, Kirk
I'm running php 4.3.4 and do not see any mention of HTTP_REFERRER. I tried $_SERVER['HTTP_REFERRER'] which is what I thought it was but to no avail. Any comments on the location/status of this? You spell too well, try HTTP_REFERER, without the double R ;) Kirk -- PHP General Mailing

RE: [PHP] upload file size

2003-11-14 Thread Johnson, Kirk
this could really kill my bandwidth. is there a way to check the file size without fully uploading the file? Although it has been called an urban legend :), you could try the old MAX_FILE_SIZE trick. For this, add a hidden tag before the input type=file tag: input type=hidden

RE: [PHP] session variables scope problem. HELP!

2003-11-13 Thread Johnson, Kirk
It seems that once a session is started and variables set, I can access the variables on the page on which they are set, but on subsequent pages via link or Header redirect the session variables are not set and cannot be accesses. Be sure you have session_start() at the top of *all*

RE: [PHP] References and memory efficiency

2003-11-03 Thread Johnson, Kirk
I've been working on a database wrapper class for a while now, MySQL to be specific. Until now, I've simply had a fetch function that returned an array of all the rows that the database returned, only because I have gotten so tired of always writing the same while loop to iterate

RE: [PHP] magic_quotes_gpc and \

2003-10-10 Thread Johnson, Kirk
If I have a form that POSTS a textarea that contains PHP code. Say some code that contains legitimate escapes \ like: echo a href=\http://somewhere.com\;Click/a; When the data is posted and received in the destination script, additional escapes \ are added. So how do I get to the

RE: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Johnson, Kirk
No doubt, Apache is a good web server, everyone use it. ;-) What the heck? Is this thread headed somewhere? Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Do not use Apache 2.0 and PHP in a production environme nt neither on Unix nor on Windows.

2003-10-02 Thread Johnson, Kirk
-Original Message- From: Dave Restall - System Administrator [mailto:[EMAIL PROTECTED] how long it will be before PHP/Apache 2 is considered stable enough to be used in a production environment ?. Below is how Rasmus answered this question back on 7/4/03. Kirk Apache2 has a

RE: [PHP] Removing empty array values.

2003-08-18 Thread Johnson, Kirk
On Mon, 18 Aug 2003 08:03:25 -0400, you wrote: How do I remove empty array values? This will remove the empty values and re-index the array so there are no holes. $new_array = array_values($old_array); Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] session bug or feature

2003-08-14 Thread Johnson, Kirk
Under 4.3.2, and register_globals on, $foo and $_SESSION[foo] both contain a reference that points to the same memory location. So, assigning to either one effectively causes the same assignment in the other. If you can't turn register_globals off, consider making a copy of $_SESSION at the top

RE: [PHP] session bug or feature

2003-08-14 Thread Johnson, Kirk
?php session_start(); // lets say this equals bar and it was set on a previous page $_SESSION[foo]; $foo = rab; echo $_SESSION[foo]; ? The problem is, when I set the global variable $foo=rab, when I echo the session variable $_SESSION[foo], it outputs rab instead of

RE: [PHP] Debugging a Session Problem

2003-07-31 Thread Johnson, Kirk
/2003, Johnson, Kirk wrote: Anything in the Apache or PHP error logs? Permissions are OK, there is space on the drive? Kirk -- Lee Stewart, Senior SE Sytek Services, a Division of DSG (719) 566-0188 , Fax (719) 566-0655 [EMAIL PROTECTED] www.sytek-services.com www.dsgroup.com

RE: [PHP] Debugging a Session Problem

2003-07-28 Thread Johnson, Kirk
Anything in the Apache or PHP error logs? Permissions are OK, there is space on the drive? Kirk -Original Message- From: Lee Stewart [mailto:[EMAIL PROTECTED] Sent: Friday, July 25, 2003 6:00 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Debugging a Session Problem Using the

RE: [PHP] Debugging a Session Problem

2003-07-25 Thread Johnson, Kirk
I'm moving an application that I'm in the trying to move to a new platform. It was running fine on an older Linux platform with PHP 4.0.3 and Apache 1.3.14. The new platform is also Linux, with PHP 4.2.2 and Apache 1.2.26 -- with register_globals on. (I just upgraded it from

RE: [PHP] Debugging a Session Problem

2003-07-25 Thread Johnson, Kirk
Your original code works for me, so it is a config issue somewhere. Add this code to each file, to verify that the session ID is being correctly passed: echo session id is . session_id() . br; Also, is your php.ini in /usr/local/lib? If PHP can't find it, it will use its built-in defaults,

RE: [PHP] Debugging a Session Problem

2003-07-25 Thread Johnson, Kirk
Sorry, I am stumped. I don't see any problems in the .ini file. Have you tried some simple code in register_globals off style? ? session_start(); $_SESSION['test'] = 'foobar'; header('Location: page2.php'); ? ? session_start(); echo test is {$_SESSION['test']}br; ? Kirk -Original

RE: [PHP] session data missing

2003-07-09 Thread Johnson, Kirk
After creating a new session with session_start() and inserting a few values e.g $HTTP_SESSION_VARS['foo'] = 'bar'; a file /tmp/sess_{session_id} is created. The problem is that this file is empty! 0 bytes. no data is stored. I'm using php 4.0.6 on linux with apache 1.3 something. Check

RE: [PHP] Sessions

2003-07-08 Thread Johnson, Kirk
This works fine on my development PC, (PHP v 4.3.1) and on my primary test site (PHP v4.2.2). However when I try it on the target site (PHP v4.1.2) then I find that immediately after starting the session everything works fine, however when I move to any other page the session information

RE: [PHP] SQL injection

2003-06-23 Thread Johnson, Kirk
Hi, Is there any way, doc, article, example, idea, suggestion to how to prevent sql injection on php sites... http://www.nextgenss.com/papers/advanced_sql_injection.pdf http://www.nextgenss.com/papers/more_advanced_sql_injection.pdf Kirk -- PHP General Mailing List (http://www.php.net/)

RE: [PHP] Re: correct session format?

2003-06-23 Thread Johnson, Kirk
So what is the diffirent between : session_start (); $_SESSION['eventid'] = 'arma2'; and session_start (); session_register('arama2'); Use the first method to create session variables when register_globals is off in the php.ini file. Use the second method when it is On.

RE: [PHP] Problem with GET variables

2003-06-23 Thread Johnson, Kirk
Set register_globals to On in php.ini. Kirk -Original Message- From: Sid [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 3:52 PM To: [EMAIL PROTECTED] Subject: [PHP] Problem with GET variables Hello, I just updated PHP on my local computer from PHP 4.0.2 to 4.3.2

RE: [PHP] Migrating pre-4.1 code to a post-4.1 server with regist er_globals on

2003-06-20 Thread Johnson, Kirk
-Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 2:57 AM To: Johnson, Kirk; [EMAIL PROTECTED] Subject: RE: [PHP] Migrating pre-4.1 code to a post-4.1 server with regist er_globals on -Original Message- From: Johnson

[PHP] Migrating pre-4.1 code to a post-4.1 server with register_globals on

2003-06-19 Thread Johnson, Kirk
A heads-up to those who are moving old code with register_globals on to a server with a newer PHP version and register_globals still on: In the old days, the rule was simple. For a session variable, whatever value was in the global variable at the end of the script was what was saved to the

RE: [PHP] Re: Using register_globals [ note on multi-developer env ]

2003-06-05 Thread Johnson, Kirk
-Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] In the corporate environment with multiple developers we have to initialize every variable (it's a rule). We even scan code once a day for variables that have not been declared. It's part of our documentation. Jay,

RE: [PHP] php session not persisting

2003-06-04 Thread Johnson, Kirk
Thanks. I'm using PHP-4.3.1. The problem is not with $_SESSION. I used session_is_registered(sess_var); to check from the second script and cannot see the variable(sess_var). Can anyone tell me why? Your code should work for register_globals on. Check that: - php.ini is where it is

RE: [PHP] php session not persisting

2003-06-04 Thread Johnson, Kirk
Set your error reporting to E_ALL, to see if anything else is going on. Add this line right after session_start() in both files, to make sure the session ID is getting passed correctly. The same ID should be displayed in both files: echo ID = . session_id() . BR; -Original Message-

RE: [PHP] Re: PHP OOP x Procedural Performance

2003-05-30 Thread Johnson, Kirk
One thing I'd like to abundantly point out is that NOT EVERYTHING BELONGS IN OOP! For instance, if you're building classes that output HTML - you've skipped a few chapters in your OOP design books. Joe, I am curious about this opinion, could you elaborate a bit, please? I am not an OOP

RE: [PHP] Session Question

2003-05-29 Thread Johnson, Kirk
SInce register_globals() is ON on my server, I need to be able to figure out a way to ensure session security. The single most important thing to do is initialize all your variables. The way to ensure that you have done that is to set the error reporting level to E_ALL (which is max). The

RE: [PHP] str_replace() problem

2003-03-31 Thread Johnson, Kirk
You could replace the longer one, Blueberry, first. Then, the only remaining occurrences of Blue will be ones that you really want. Kirk I am performing a str_replace() on a large string, and everything works fine, except that two of the elements I'm searching for (and replacing) have

RE: [PHP] Checking a string for # of charactors.

2003-03-28 Thread Johnson, Kirk
http://www.php.net/manual/en/function.strlen.php Kirk I would like to check that a string as more than 20 charactors in it. Can someone point me in the right direction. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] What am I not understanding about $GLOBALS['myvar'] vs global $myvar?

2003-03-26 Thread Johnson, Kirk
I think you either want to use no quotes or double quotes, but not single quotes. Double quotes will interpolate the variable, single quotes will not, i.e. $key becomes a string literal rather than a variable. No quotes will work, although the docs seem to indicate it is deprecated syntax. Not

RE: [PHP] How to detect if a cookie is set?

2003-03-21 Thread Johnson, Kirk
Hi I'm trying to make a script that first figures out if a cookie is set, if not,do this, if so, do that. Can I use: Isset($HTTP_COOKIE_VARS['nick'] or what should I use? Yes. If you have PHP 4.1.0 or higher, you can also use the recommended $_COOKIES['nick']. Kirk -- PHP General

RE: [PHP] OT Inactivity Timeout

2003-03-14 Thread Johnson, Kirk
But how can I set up an inactivity timeout that will logout a person after let's say 20 minutes of inactivity? You could put a meta refresh on the page, that redirects to an inactivity page. Set the refresh time to the timeout value. Put some logout code on the inactivity page. Otherwise,

RE: [PHP] IF statement madness

2003-03-14 Thread Johnson, Kirk
Comparing a float with an integer can have problems. You could try something like: if(abs($i - $target) .1) { //then they are essentially equal } Kirk -Original Message- From: James E Hicks III [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 11:22 AM To: [EMAIL

RE: [PHP] delete from array

2003-03-10 Thread Johnson, Kirk
How do I delete a specific time out of the array or how do I delete a range of times out of the array? I would like to be able to delete 12:05:00 but if I want, delete a range like 12:05:00 to 12:10:00. Here's some code. Kirk function remove_array_values($valuesToRemove, $array) { if

RE: [PHP] Session variable under PHP 4.0.6

2003-03-03 Thread Johnson, Kirk
In the first file, replace this line: $HTTP_SESSION_VARS['variable']=the variables value; with these two lines: $variable = the variables value; session_register('variable'); This is because 'register_globals' is enabled in the php.ini file. Kirk -Original Message- From: Henry

RE: [PHP] Session variable under PHP 4.0.6

2003-03-03 Thread Johnson, Kirk
That Caution message is not the full story, read some more on register_globals. If register_globals is On in php.ini, then do the following: - use session_register() to create your session variables; - use the global variable to access the variable, not the $HTTP_SESSION_VARS array. Example:

RE: [PHP] How can I detetct if session cookies are enabled?

2003-02-28 Thread Johnson, Kirk
Is there a way (PHP code if possible please) to verify if session cookies are enabled in the user's browser? On the *second* request, check if $_COOKIES['PHPSESSID'] is set. On the initial request, PHP sends the 'PHPSESSID' cookie as part of the response. The browser then returns that

[PHP] When is garbage collection initiated?

2003-02-27 Thread Johnson, Kirk
I need a better understanding of when garbage collection is initiated under PHP's default session handling. It is not clear to me if the gc_probability is based on: - each *request* to the server, or, - each time a *new session file is created*, or, - each time a request causes a *session file

RE: [PHP] array question

2003-02-24 Thread Johnson, Kirk
http://www.php.net/manual/en/language.variables.variable.php Kirk -Original Message- From: Bob Irwin [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 3:28 PM To: php-general Subject: Re: [PHP] array question Hi Guys, This might be a bit of a newbie question, but

RE: [PHP] Re: register_globals On

2003-02-20 Thread Johnson, Kirk
-Original Message- An alternative... 1. register_globals off use the command import_request_variables(PC,_p); now you can get the variables like user as $p_user. The get variables will be ignored! Still, If a user developes a special browser, exclusively to hack, he may be

RE: [PHP] missing simple php functionality

2003-02-20 Thread Johnson, Kirk
The field name in the form is user_name, and the echo is for name. Are you copying the value from $user_name to $name at some point? Kirk -Original Message- From: ML [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 20, 2003 2:04 PM To: [EMAIL PROTECTED] Subject: [PHP] missing

RE: [PHP] Re: recursion?????

2003-02-18 Thread Johnson, Kirk
% The benefit of checking in javascript(which I suspect is enabled in most Not me! Not me! Not me! It is by no means ubiquitous. Anyone who even moderately considers security will have it turned off. The latest survey I've seen indicates that about 11% of browsers have JS

RE: [PHP] register_globals On

2003-02-18 Thread Johnson, Kirk
I'm thinking of running a shopping cart package (osCommerce) that requires register_globals to be enabled. With all the warnings about security with register_globals enabled I'm worried. How dangerous is it? The key defensive step is to initialize all of your session variables at the

RE: [PHP] Redirect without header or javascipt

2003-02-18 Thread Johnson, Kirk
Is there any to redirect in php with using header() and without the use of javascript? You can use an html meta tag with http-equiv=refresh. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Problem with Date (2003-03-30)

2003-01-29 Thread Johnson, Kirk
-Original Message- From: Gareth Mulholland [mailto:[EMAIL PROTECTED]] I'm having problems with mktime and Midnight on 30th March 2003. The code I'm using is: echo mktime(0,0,1,'03','29','2003'); echo mktime(0,0,1,'03','30','2003'); echo

RE: [PHP] Found a PHP bug!!!!!!!!!

2003-01-27 Thread Johnson, Kirk
-Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Found a PHP bug, I'm using PHP version 4.2.3. I have been struggling with why PHP code failed to work with the month is August or September I stumbled into this one a short while ago myself. It is not a bug,

RE: [PHP] dreading OOP

2003-01-21 Thread Johnson, Kirk
-Original Message- However, my mind apparently works different and I keep trying to relate the OOP structure to what I already know which equates an object to a function. I am resolving to purchase a book dedicated to instruction in the inns and outs of OOP. Specifically at it

[PHP] mktime() and the format of the day number entry

2003-01-02 Thread Johnson, Kirk
OK, I am mktime() challenged. Can someone please explain these results to me? I have some test dates in October of 1998. For the days numbered 1-7, mktime() does not care whether I have a leading zero on the day or not, I get the same timestamp regardless, e.g., both a '7' and a '07' for the day

RE: [PHP] mktime() and the format of the day number entry

2003-01-02 Thread Johnson, Kirk
The month behaves the same: both '08' and '09' are treated as zero by mktime(). Kirk -Original Message- From: Paul Roberts [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 02, 2003 4:24 PM To: Johnson, Kirk Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mktime() and the format

[PHP] Apache 2 and PHP

2002-11-07 Thread Johnson, Kirk
Last I heard, PHP and Apache 2 were not yet ready for production environments. Are there any further updates? What is the best way to keep up on the status of this? Any good sites in particular? TIA Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Apache 2 and PHP

2002-11-07 Thread Johnson, Kirk
Thanks for your reply, Davy. We are running *nix boxes, so I don't have any thoughts on XP and Apache. Kirk -Original Message- From: Davy Obdam [mailto:info;davyobdam.com] Sent: Thursday, November 07, 2002 3:29 PM To: Johnson, Kirk; [EMAIL PROTECTED] Subject: RE: [PHP] Apache 2

RE: [PHP] extract($_POST)

2002-10-25 Thread Johnson, Kirk
And what should these precautions be? If a malicious user can submit his own form and you are looking for a POST variable, how can you ensure that $admin came from your form and not that user's? The problem is when a cracker uses form variables in an attempt to set the values of flag

RE: [PHP] pass globals to functions???

2002-10-24 Thread Johnson, Kirk
? // this is main $foo = 'bar'; test(); test2(); function test() { global $foo; echo foo is $foobr; } function test2() { echo foo is {$GLOBALS['foo']}br; } ? Kirk Some have eluded to this but I haven't seen a working example. I would like to declare globals in my main script and

RE: [PHP] global AND Register Globals with PHP 4.0.6 ??

2002-10-14 Thread Johnson, Kirk
register_globals() adds a variable to the *session*. The global statement brings a global variable into the *scope* of a function. Kirk What is the difference? variable. I read that register globals has some security issues. Are these the same, or is setting a variable as global

RE: [PHP] Re: unless something...

2002-09-12 Thread Johnson, Kirk
There is no 'unless' in PHP, so you just have to grind it out. If you are searching for known strings, rather than string *patterns*, use the strstr() function here: http://www.php.net/manual/en/function.strstr.php. So, something like: if(!strstr($c,$a) !strstr($c,$b)) { bla; exit; }

RE: [PHP] Re: unless something...

2002-09-12 Thread Johnson, Kirk
Indeed, it is a negated something or other. -Original Message- From: David Buerer [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 11:23 AM To: '[EMAIL PROTECTED]' Subject: RE: [PHP] Re: unless something... True, but isn't unless just a negated while? -- PHP

RE: [PHP] Project Suggestions

2002-09-04 Thread Johnson, Kirk
Things I want to do: - convert this site into a dynamic one, where I can very easily change the layout of things whenever it comes time to revamp the site into a new design. I have not worked with any of the templating systems, but here is a home-grown one. Separate the

RE: [PHP] Re: Sessions...

2002-08-15 Thread Johnson, Kirk
Kondwani Spike Mkandawire wrote: Am I mistaken to assume that a Session is automatically destroyed if a Window Browser is closed? *Eventually* it is destroyed, but not at the instant the browser is closed. See the session.gc_maxlifetime and session.gc_probability settings in php.ini. If the

RE: [PHP] Re: Dynamically check radio buttons

2002-08-01 Thread Johnson, Kirk
If you made an array for your buttons, then you could use PHP's looping constructs to process the array. Write the input tag like this: INPUT NAME=Game[1] VALUE=1Chicago The processing code will then have access to the array $Game indexed by the game number, e.g., $Game[1]. Good luck! Kirk

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

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

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] 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] 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] 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] 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] comment followed by ? fails to parse

2002-05-28 Thread Johnson, Kirk
I have wondered for some time if this is a bug or just an interesting design choice ;) I agree with you, I was surprised when I first encountered this. But it is what it is, so code accordingly. Kirk -Original Message- From: Thalis A. Kalfigopoulos [mailto:[EMAIL PROTECTED]] Sent:

RE: [PHP] comment followed by ? fails to parse

2002-05-28 Thread Johnson, Kirk
Which begs the question, why does PHP see a '?' in a '//' comment line, but not in a multi-line comment, e.g., /* ? */ ? -Original Message- From: Ed Gorski [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 2:46 PM To: Leotta Natalie (NCI/IMS); 'Jonathan Rosenberg'; Johnson, Kirk

RE: [PHP] comment followed by ? fails to parse

2002-05-28 Thread Johnson, Kirk
: Johnson, Kirk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 28, 2002 2:55 PM Subject: RE: [PHP] comment followed by ? fails to parse Which begs the question, why does PHP see a '?' in a '//' comment line, but not in a multi-line comment, e.g

RE: [PHP] in_array problems (another pair of eyes?)

2002-05-22 Thread Johnson, Kirk
Unless you are using PHP version 4.2 or higher, the first argument can't be an array. Kirk -Original Message- From: Jas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 11:46 AM To: [EMAIL PROTECTED] Subject: [PHP] in_array problems (another pair of eyes?) I don't think

RE: [PHP] session_start() times and resets?

2002-04-25 Thread Johnson, Kirk
See session.gc_maxlifetime in php.ini. The session timer is based on the session file access (or modified?) timestamp. It gets reset every time the session data is accessed, which is every time a page using that session is requested. Kirk -Original Message- From: Smileyq

RE: [PHP] Won't save session ids?

2002-04-25 Thread Johnson, Kirk
The coding style needs to match the register_globals setting in php.ini. register_globals on: $accountsession = $session; $accountemail = $email; session_register(accountsession); session_register(accountemail); register_globals off: Do just like you have it below, except remove the calls to

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

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

  1   2   3   4   >