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

[PHP] Problem using META tag refresh for page re-directs

2001-02-22 Thread Johnson, Kirk
I have been using the code below to do my page redirects for a year and a half with good results. Recently, some users have reported to me that the actual code is being partially displayed to the screen, and the re-direct is not occurring. It is as if the server stops serving the page before it is

RE: [PHP] Problem using META tag refresh for page re-directs

2001-02-22 Thread Johnson, Kirk
x.php"); exit(); ?> and youve got a great cobination, zero html will be sent to the browser, just the header, the browser will refresh for you. try it, works better then meta tags. ""Johnson, Kirk"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">ne

RE: [PHP] isset()

2001-02-26 Thread Johnson, Kirk
Wow, I hope you all will forgive me for one last go around on this thread :) Technically, what does "set" mean? It is not the same as "is registered" or "has a value", right? What is "is set"? Is it "introduced to the global namespace"? TIA Kirk >Except that it will throw a warning in PHP4 if

RE: [PHP] Table looking odd as a result of while loop?

2001-02-26 Thread Johnson, Kirk
Is it because 1 % 3 is 0 with a remainder of 2? Looks like the code is doing just what it is written to do. The "if" evaluates to true on the second picture. Kirk -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 2:55 PM To: [EMAIL PROTECTED] S

RE: [PHP] exchange data between javascript & php!

2001-02-28 Thread Johnson, Kirk
I know of two ways to pass data from PHP to JavaScript. 1. Do an "echo" in the JS function definition: function myJavascriptFunction() { var foo = ; } 2. Assign the PHP variable to a HIDDEN element, then access this from JS: function myJavascriptFunction () { document.forms[0].som

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 Hi,

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: [P

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 app

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 $HTTP_REF

RE: [PHP] Using php to get javascript varibles

2001-03-14 Thread Johnson, Kirk
1. Do an "echo" in the JS function definition: function myJavascriptFunction() { var foo = ; } 2. Assign the PHP variable to a HIDDEN element, then access this from JS: function myJavascriptFunction () { var foo = document.forms[0].somePhpVariable.value; } Kirk -Original Mess

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

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] Variable value doesn't stay "Null"

2001-03-15 Thread Johnson, Kirk
You may want to check the field definitions in the database table. If I recall correctly, some MySQL numeric field types default to "0" when an empty string gets written to them. The problem (and solution) may not be in the PHP script at all. Kirk > -Original Message- > From: Michael Con

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

2001-03-15 Thread Johnson, Kirk
Are the functions declared in an include()'d file? Is this file being include()'d more than once? That's how I usually provoke this error :) Kirk > -Original Message- > From: Jack Sasportas [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 15, 2001 1:25 PM > To: php > Subject: [PHP] Hel

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 conta

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 PR

RE: [PHP] first three characters

2001-03-19 Thread Johnson, Kirk
substr() http://www.php.net/manual/en/function.substr.php Kirk > -Original Message- > From: Rahul Bhide [mailto:[EMAIL PROTECTED]] > Sent: Sunday, March 18, 2001 11:02 PM > To: [EMAIL PROTECTED] > Subject: [PHP] first three characters > > > Gurus, > How do I extract the first n ch

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 >

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]

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,

RE: [PHP] parse error inside comment????

2001-03-20 Thread Johnson, Kirk
Look for a missing terminator (semi-colon or curly brace) just *above* the line in the error message. Kirk > -Original Message- > From: Jaxon [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 20, 2001 1:18 PM > To: [EMAIL PROTECTED] > Subject: [PHP] parse error inside comment > > To

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 Messa

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 General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

RE: [PHP] 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 HTTP

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

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, Marc

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 isset($config["dow

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

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] How to limit a WHILE statement?

2001-04-02 Thread Johnson, Kirk
Probably a more efficient way to do this is to put a LIMIT qualifier on your query (see the MySQL docs). Then you won't retrieve rows you are not going to use anyway. Kirk > -Original Message- > From: Bob Stone [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 02, 2001 4:54 PM > To: [EMAI

[PHP] Referencing *only* programmer-created session vars

2001-04-03 Thread Johnson, Kirk
I have register_globals on for some applications. This causes PHP to bring all elements of the $HTTP_***_VARS arrays into the GLOBAL namespace. Somehow, session_unset() does not unset these variables when it is called, rather, it only unset()'s programmer-created session variables. I would like to

RE: [PHP] Session variables and register_global

2001-04-04 Thread Johnson, Kirk
> -Original Message- > From: Niklas Neumann [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 3:20 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Session variables and register_global > > session_register("test"); > $GLOBALS['HTTP_SESSION_VARS']['test'] = 'Hello World!'; > > does

RE: [PHP] Select case equivelent

2001-04-04 Thread Johnson, Kirk
See the "switch" statement. http://www.php.net/manual/en/control-structures.switch.php Kirk > -Original Message- > From: Allen May [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 12:07 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Select case equivelent > > > I have a list

RE: [PHP] Include / Require

2001-04-05 Thread Johnson, Kirk
In addition to Lindsay's comments: Any time PHP can't include() a file, but it can include() it if you change the filename, check the permissions on the original file. They may be set too restrictive for PHP to read it. Kirk > -Original Message- > From: Ashley M. Kirchner [mailto:[EMAI

RE: [PHP] Apache user

2001-04-05 Thread Johnson, Kirk
Put the call to "whoami" in a call to exec() from inside a PHP script. Kirk > -Original Message- > From: Joe Conway [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 05, 2001 12:26 PM > To: Chris Mason; PHP User Group > Subject: Re: [PHP] Apache user > > > > Can anyone tell me how t

RE: [PHP] Nested for() loops?

2001-04-06 Thread Johnson, Kirk
I cut and pasted your code and it worked fine - ??? kirk > As a test, I did this and it doesn't work. The script simply doesn't > give any output. > > error_reporting(E_ALL); > > for( $i=0; $i<10; $i++ ) > for( $j=0; $j<10; $j++ ) > { > $res = $i * $j; > print(" result = $res

RE: [PHP] Help please.

2001-04-06 Thread Johnson, Kirk
http://www.php.net/manual/en/migration4.php > -Original Message- > From: Chris [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 06, 2001 12:19 PM > To: php > Subject: [PHP] Help please. > > > Hi, > I am trying to find some info on upgrading from php3 to php4. > I can't seem to find any

RE: [PHP] Nearly all (1755) PHP functions in a text file

2001-04-06 Thread Johnson, Kirk
So, now that you've seen 'em all, which one is your favorite? :) Kirk > -Original Message- > From: Plutarck [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 06, 2001 1:17 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Nearly all (1755) PHP functions in a text file > In any case, there are

RE: [PHP] FORM with a posting value

2001-04-06 Thread Johnson, Kirk
Yes, but you no longer check the value of "value" to determine which button was clicked. Instead, give each button a unique *name* attribute, then check if $name_x is set. The browser returns the x,y coordinates of the point where the user clicks the button, in variables named name_x and name_y.

RE: [PHP] FORM with a posting value

2001-04-06 Thread Johnson, Kirk
Oops. You do need the type=image and src= attributes, instead of what I wrote in the example. Good thing it's Friday :) > -Original Message- > From: Johnson, Kirk > Sent: Friday, April 06, 2001 1:29 PM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] FORM with a posti

RE: [PHP] HELP, problems with sessions.....

2001-05-09 Thread Johnson, Kirk
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Subject: [PHP] HELP, problems with sessions. > so what aren'T i understanding here? shouldn't all the vars and values > be in the encoded string??? and what could cause the loss of > the session > vars on my

RE: [PHP] HELP, problems with sessions.....

2001-05-09 Thread Johnson, Kirk
My guess is one server has register_globals on, the other has register_globals off. Try this change in your code: instead of assigning a value to $HTTP_SESSION_VARS["toto"], instead assign a value to $toto. You will then see a value for $toto in the echo session_encode(). $HTTP_SESSION_VARS["toto"

RE: [PHP] Environment Variables

2001-05-09 Thread Johnson, Kirk
http://www.php.net/manual/en/language.variables.predefined.php#language.vari ables.predefined.php Kirk > -Original Message- > From: Karl J. Stubsjoen [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 09, 2001 10:08 AM > To: PHP Mailing List > Subject: [PHP] Environment Variables > > >

[PHP] Question on php.ini.max_execution_time

2001-05-10 Thread Johnson, Kirk
I have a PHP script that opens a socket to another (non-PHP) process. This process has been having problems of late, and can take 10 minutes or more to execute. I have max_execution_time set to 300 seconds in php.ini. However, users report to me that the PHP script does not always time-out after 3

RE: [PHP] Please help

2001-05-10 Thread Johnson, Kirk
I think this question was answered by Stewart Taylor earlier today. Here is his response: " This error occurrs when you start a session that recreates an object variable but does not know the class definition for it. You need to make sure you include the class source before you start the session.

RE: [PHP] verify phone number

2001-05-11 Thread Johnson, Kirk
One way: $phone = ereg_replace("[^0-9]", "", $phone); if(!ereg("^[0-9]{10}$",$phoneHome")) { echo "error"; } You could also check the string length after removing all non-numbers. Kirk > -Original Message- > From: Claudia Smith [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 11, 2001

RE: [PHP] disable compiler flag --enable-trans-sid at runtime

2001-05-14 Thread Johnson, Kirk
I have not done this, but this is what I would try. There is a setting in php.ini, session.use_trans_sid, which controls whether PHP appends the session ID. Set up an .htaccess file with something like this in it: php_flag session.use_trans_sid off That may not be the correct syntax, but it shou

RE: [PHP] [Win32,PHP/4.0.5] Problem with session

2001-05-14 Thread Johnson, Kirk
With register_globals off, ordinary GLOBAL variables can't be registered, so the line "session_register("language");" isn't doing anything. Access all registered variables through $HTTP_SESSION_VARS only. Kirk > -Original Message- > From: Christian Ribeaud [mailto:[EMAIL PROTECTED]] > Se

RE: [PHP] Easily Making Post Vars Session Vars

2001-05-14 Thread Johnson, Kirk
This isn't quite what you are asking, but maybe it will be of help. Use the loop below to create and assign GLOBAL versions of the $HTTP_POST_VARS:; reset($HTTP_POST_VARS); while(list($key, $val) = each($HTTP_POST_VARS)) { $GLOBALS[$key] = $val; } Kirk > -Original Message- > From:

RE: [PHP] Easily Making Post Vars Session Vars

2001-05-14 Thread Johnson, Kirk
PROTECTED]] > Sent: Monday, May 14, 2001 2:40 PM > To: Johnson, Kirk; Php-General > Subject: RE: [PHP] Easily Making Post Vars Session Vars > > > Ok, I see where that's going. > > I actually was a bit off in my first posting. > > The form field names are a multi-

RE: [PHP] Connectivity to MS SQL

2001-05-14 Thread Johnson, Kirk
AFAIK, just change all the "mysql" function calls to "mssql" function calls, e.g., mysql_fetch_row() becomes mssql_fetch_row(). If possible, get a nice DBI that allows you to write your DB code so that you will have fewer changes to make next time you switch databases. Kirk > -Original Messa

RE: [PHP] load balancing...

2001-05-15 Thread Johnson, Kirk
We are doing it here, although I am not involved in the server setup so I can't give you much help. I guess the main thing is setting up the session storage mechanism. If you use session files, then the load balancer needs to add a cookie so that requests in multi-page applications always go to th

RE: [PHP] easy one

2001-05-15 Thread Johnson, Kirk
Just to add a couple details. On the first page request, PHP sets the constant SID as well as the cookie. If the user has cookies disabled, then SID is also set on all following page requests. If cookies are enabled, then the cookie PHPSESSID (if you stick with the default name) exists on all foll

RE: [PHP] coding for 'no match found'

2001-05-15 Thread Johnson, Kirk
See http://www.php.net/manual/en/function.mysql-num-rows.php Kirk > -Original Message- > From: midget2000x [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 15, 2001 3:00 PM > To: [EMAIL PROTECTED] > Subject: [PHP] coding for 'no match found' > > > This is a simple yet fundamental progra

RE: [PHP] again with the regex

2001-05-15 Thread Johnson, Kirk
Jerry, try sprintf(). Here's an example: sprintf("(%s) %s-%s", substr($GLOBALS["appPhoneHome"], 0, 3),substr($GLOBALS["appPhoneHome"], 3, 3),substr($GLOBALS["appPhoneHome"], 6, 4)) Kirk > -Original Message- > From: Jerry Lake [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 15, 2001 4:48

RE: [PHP] Custom Session Func?

2001-05-16 Thread Johnson, Kirk
Chris, is this requirement spelled out in the manual anywhere? I have never seen any effect of the order of calling session_register() and assigning a value in my own code. In fact, I almost always register a variable before assigning a value. Just curious. Kirk > -Original Message- >

RE: [PHP] need help

2001-05-16 Thread Johnson, Kirk
__FILE__ is a constant predefined by PHP. See http://www.php.net/manual/en/language.constants.php For help on the basename() function, see http://www.php.net/manual/en/function.basename.php Kirk > -Original Message- > From: Fai [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 16, 2001

RE: [PHP] EREGI -- Help

2001-05-16 Thread Johnson, Kirk
Give this a try: if(!ereg("^([0-9]{5}([-]{1}[0-9]{4})?)$",$data)) { Kirk > -Original Message- > From: Jason Caldwell [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 15, 2001 8:16 PM > To: [EMAIL PROTECTED] > Subject: [PHP] EREGI -- Help > > > I'm just trying to create a eregi expressi

RE: [PHP] deleting a file

2001-05-16 Thread Johnson, Kirk
http://www.php.net/manual/en/function.unlink.php Kirk > -Original Message- > From: Joseph Bannon [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 16, 2001 1:53 PM > To: PHP (E-mail) > Subject: [PHP] deleting a file > > > What is the file function to remove/delete a file from a server?

RE: [PHP] help with header/cookies ..

2001-05-17 Thread Johnson, Kirk
Add an exit(); immediately following all the header() calls. Hitting a header() does not end execution of the script, so without the exit() the last header() that gets called is the one that actually occurs. Kirk > -Original Message- > From: Chad Day [mailto:[EMAIL PROTECTED]] > Sent: Th

RE: Re: [PHP] preprocessing

2001-05-17 Thread Johnson, Kirk
I don't know of any way to make a script "self-submitting" for POST data, wish I did. Alternatives: 1. Do the processing with JavaScript on the original input page. 2. Get the other company to modify C to look for GET variables, and build a query string as suggested earlier. 3. Add a simple FORM

RE: [PHP] preprocessing

2001-05-17 Thread Johnson, Kirk
Louis, if you track this down, please post back to the list what you find. TIA Kirk > -Original Message- > From: infoz [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 17, 2001 12:21 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] preprocessing > > > There's a publi

RE: [PHP] preprocessing

2001-05-17 Thread Johnson, Kirk
Thanks, Tim! http://marc.theaimsgroup.com/?l=php-general&m=98582357009336&w=2 Kirk > -Original Message- > From: infoz [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 17, 2001 12:21 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] preprocessing > > > There's a public

RE: [PHP] Netscape 6, What a piece of s$#@ , anyone else had problems with php and Netscape 6?

2001-05-17 Thread Johnson, Kirk
Always a good idea to do a View Source, capture that to a file, then run it through a tag checker program. Kirk > -Original Message- > From: Brandon Orther [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 17, 2001 5:21 PM > To: PHP User Group > Subject: RE: [PHP] Netscape 6, What a piece

RE: [PHP] Netscape 6, What a piece of s$#@ ,anyone else hadproblems with php and Netscape 6?

2001-05-18 Thread Johnson, Kirk
Good call, Lucas! Netscape has bitten me before on this one, and I had forgotten about it- sorry. I was doing a View Source, but all the dynamic elements that got updated on each request were changing, because Netscape does another request for the View Source. So, the View Source code is not the c

RE: [PHP] Not losing variables in forms w/ checkboxes

2001-05-18 Thread Johnson, Kirk
Just append a pair of brackets to the NAME in the FORM: suspendingAgent[]. This will create an array for the boxes that get checked. To get the array to a comma separated list on the processing page, try: $string = implode (",", $suspendingAgent); Kirk > -Original Message- > From: Andr

RE: [PHP] Undefined Variables / PHP 4.0.4pl1

2001-05-18 Thread Johnson, Kirk
If you have access to php.ini, see the "Error handling and logging" section. Else, see http://www.php.net/manual/en/ref.errorfunc.php Kirk > -Original Message- > From: Martin Thoma [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 18, 2001 1:36 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Un

RE: [PHP] is not translated...

2001-05-21 Thread Johnson, Kirk
Is the session.use_trans_sid flag set to 1 in php.ini? Kirk > -Original Message- > From: Christian Marschalek [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 21, 2001 1:16 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] is not translated... > > > I know that, an

RE: [PHP] sessions without trans_id

2001-05-22 Thread Johnson, Kirk
You could use an .htaccess file to disable the session.use_trans_sid flag in the php.ini file, like this: php_flag session.use_trans_sid off Kirk > -Original Message- > From: Dalyyla [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 22, 2001 6:30 AM > To: [EMAIL PROTECTED] > Subject: [PHP

RE: [PHP] sessions without trans_id

2001-05-23 Thread Johnson, Kirk
If the server has trans-sid enabled, you can disable it for your application using an .htaccess file, as given below. > -Original Message- > From: Dalyyla [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 23, 2001 2:14 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] sessions without trans

[PHP] setting session.gc_probability

2001-05-23 Thread Johnson, Kirk
OK, we're having an argument in our shop. This is what the manual says about garbage collection: "session.gc_probability specifies the probability that the gc (garbage collection) routine is started on each request in percent. Defaults to 1." Somebody here says that a value of "1" means 100%, i.

RE: [PHP] Sessions: auto appending session id to URLs

2001-06-20 Thread Johnson, Kirk
There is a setting in the php.ini file named "session.use_trans_sid", which enables appending the session ID if PHP was compiled with enable-trans-sid. You could try setting this to 0 if you are allowed to set up an .htaccess file on the server. Create the .htaccess file with the following line i

[PHP] session variables and page interrupt via a refresh

2001-07-03 Thread Johnson, Kirk
Hope someone can help on this one. Say you have a FORM processing page that does lots of stuff, so it takes many seconds to execute. Say the user gets impatient and hits the Refresh button while the processing page is only half completed. Here's the question: do any changes to session variables t

RE: [PHP] NEWBIE - How do you strip spaces?

2001-07-03 Thread Johnson, Kirk
ereg_replace("[^0-9]", "", $var) Kirk > -Original Message- > From: Craig Simon [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 03, 2001 10:44 AM > To: '[EMAIL PROTECTED]' > Subject: [PHP] NEWBIE - How do you strip spaces? > > > I am trying to figure out how to take a phone number as

RE: [PHP] Troubleshooting syntax ?

2001-07-03 Thread Johnson, Kirk
I do a View Source on all my generated pages, save it as a file, then run the file through Arachnophilia's tag checker. It reports missing tags and line numbers where there are errors. Arachnophilia is "careware", I have used it for a long time. There are doubtless other programs that will do this

RE: [PHP] $phpvar = javascriptvar???

2001-07-05 Thread Johnson, Kirk
> -Original Message- > From: Romeo Manzur [mailto:[EMAIL PROTECTED]] > Subject: [PHP] $phpvar = javascriptvar??? > > what I mean is, how could I save a javascript var value on a > php var??? You can also put a HIDDEN field in your form, have JS assign the value to that, then PHP will

RE: [PHP] Must Have Cookies. PHP/JavaScript

2001-07-05 Thread Johnson, Kirk
On the *2nd* page request you can check for your cookie in $HTTP_COOKIE_VARS. If it is not there, cookies are disabled in the browser. Here's a kludge to make your "first" page the 2nd page request: just start your session on index, then META redirect to the next page; this 2nd page is where you

RE: [PHP] Sessions and redundant servers

2001-07-05 Thread Johnson, Kirk
> Unfortunately, I don't think there's a *good* solution to the > "distributed > server vs. session" problem which doesn't use a replicated database. > Because there's no guarantee of NFS writes being successful (or reads > either, depending on where a problem may arise) and rsync must be > perio

RE: [PHP] Re: http referer [ stats !!! ]

2001-07-11 Thread Johnson, Kirk
Statistics, hard data - yeah! Thanks, Don! Kirk > -Original Message- > From: Don Read [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 11, 2001 3:54 AM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] Re: http referer [ stats !!! ] > > mysql> select conv(PASSWORD('[NO REFERRING URL]'),16

RE: [PHP] peculiar behaviour of large integers with "<" and ">"

2001-07-13 Thread Johnson, Kirk
I get nothing unusual Kirk > -Original Message- > From: scott [gts] [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 13, 2001 12:08 PM > To: php > Subject: [PHP] peculiar behaviour of large integers with "<" and ">" > > > Has anyone come across this before? > > // compare 5 to th

RE: [PHP] peculiar behaviour of large integers with "<" and ">"

2001-07-13 Thread Johnson, Kirk
I am running 4.0.6. Nothing prints to the screen using a cut and paste of the code below. > -Original Message- > From: scott [gts] [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 13, 2001 12:25 PM > To: php > Subject: RE: [PHP] peculiar behaviour of large integers with > "<" and ">" > >

RE: [PHP] Session Variables and Redirecting

2001-07-13 Thread Johnson, Kirk
You should be able to do exactly what you want, I do this myself. I am wondering if you are hitting a bug that is present in PHP in versions prior to 4.0.6, where $someflag and$HTTP_SESSION_VARS["someflag"] do not reference the same value. Try changing two lines in your code to read as below, inst

RE: [PHP] peculiar behaviour of large integers with "<" and ">"

2001-07-13 Thread Johnson, Kirk
I'll bet it did! Sorry, nothing unusual here, good luck. > -Original Message- > From: scott [gts] [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 13, 2001 12:50 PM > To: php > Subject: RE: [PHP] peculiar behaviour of large integers with > "<" and ">" > > > i guess you've got a more rec

RE: [PHP] encryption methods?

2001-07-13 Thread Johnson, Kirk
One approach to password security is to put the passwords in a file outside Document Root, then include that file in your scripts when you need a password. Kirk > -Original Message- > From: Adrian Teasdale [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 13, 2001 1:10 PM > To: [EMAIL PROT

RE: [PHP] OT Math Question

2001-07-18 Thread Johnson, Kirk
Do you mean if the user selects a single value from each of the four dropdowns, but never chooses a value that has already been selected in a previous dropdown? If so, then there are 5 possible choices from the first list, 4 from the second, etc. So, 5*4*3*2 = 120. Kirk > -Original Message--

RE: [PHP] PHP mail() security hole on 4.0.5+

2001-07-19 Thread Johnson, Kirk
> -Original Message- > From: Michael Geier, CDM Systems Admin [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 19, 2001 9:39 AM > To: PHP Mailing List > Subject: [PHP] PHP mail() security hole on 4.0.5+ > > > http://www.net-security.org/text/bugs/995534103,28541,.shtml Anyone have sugg

RE: [PHP] Memory Leaks

2001-07-20 Thread Johnson, Kirk
> -Original Message- > From: Paul Strange [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 19, 2001 1:18 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Memory Leaks > > When we review the error_log from apache, we see the following alot: > > zend_hash.c(291) : Freeing 0x0812738C (65 bytes)

RE: [PHP] Storing Java Script Varable into php variable

2001-07-20 Thread Johnson, Kirk
> -Original Message- > From: Mike Mike [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 20, 2001 9:34 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Storing Java Script Varable into php variable > > My question is I have some java script I want to store > the java script variable into a php v

RE: [PHP] Session Variables

2001-07-25 Thread Johnson, Kirk
> Is there anyway to prevent session variables from being > overwritten by a get string? PHP will do this automatically *if* you initialize your session variables to *anything* as soon as you register them. For example, session_register("sess_auth"); $sess_auth = ""; If you do this, then sessi

RE: [PHP] PHP_SELF

2001-07-30 Thread Johnson, Kirk
>Ideal scenario, a blank form is presented to the > user, and when > the form is submitted, do the logic check and act accordingly. Is it > possible using $PHP_SELF as the target, or do I have to use 2 > files: a > form 'front end' with the php logic in the 'backend'?? Yes, this is possible

RE: [PHP] Attitude of B van Ouwerkerk

2001-07-31 Thread Johnson, Kirk
Not for this list specifically, and not as well used as it might be ;) http://www.php.net/manual/en/faq.php Kirk > what is up with a faq for this list? is there one? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

RE: [PHP] Re: FAQ

2001-08-01 Thread Johnson, Kirk
> I know of 3 php faqs (I know there are tons), maybe we should > make a faq on how to > find faqs? :) > > http://alt-php-faq.org/ > http://www.php.net/manual/en/faq.php > http://php.faqts.com Rasmus, do you think there would be any value in adding these 3 links to the "PHP General Mailing List

<    1   2   3   >