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
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:
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:
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
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
-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.
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:
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(
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]
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
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
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
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:
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
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
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-
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
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
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
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
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
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
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
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,
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
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
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,
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
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
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
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
!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:
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
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...
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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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]]
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
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
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
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
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
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
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;
?
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
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
-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
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'
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:
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
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.
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
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?
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
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
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
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
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]
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
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
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
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
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
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
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
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
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
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
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
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
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,
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 =
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
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
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
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
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
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
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
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
.
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
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 - 100 of 335 matches
Mail list logo