[PHP] Building SoapClient as an extension

2010-09-20 Thread Jon Drukman
Is it possible to build SoapClient as a loadable extension?  For various
reasons, I don't want to have to recompile PHP from scratch.  It would be much
simpler to just distribute another .so and .ini file.

How would I do that, if it's possible?

-jsd-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Building SoapClient as an extension

2010-09-20 Thread Jon Drukman
Phpster phpster at gmail.com writes:

 
 It's already done
 
 http://wso2.com/products/web-services-framework/php/
 

I don't know what that has to do with what I asked.

I found the answer on my own:

./configure --enable-soap=shared

Produces a modules/soap.so file that can be loaded in to php at run time.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: header modify errors

2008-12-15 Thread Jon Drukman

Terion Miller wrote:

*Warning*: Cannot modify header information - headers already sent by
(output started at
C:\Inetpub\Xampp\htdocs\SNLeader\WOSystem\Welcome.php:31)
in *C:\Inetpub\Xampp\htdocs\SNLeader\WOSystem\inc\dbconn_openTest.php* on
line *3*



Line 32-36 are:
?php
If (!empty($msg)){
echo div class=\Error\. $msg ./divBRBR;
}
?



stick an ob_start(); at the beginning of the file and php will not 
complain about output started any longer.


-jsd-


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Incrementing variables based on database data

2008-08-12 Thread Jon Drukman

Vinny Gullotta wrote:
Well, what I need to be able to do is then take the numbers of each 
count and figure out which is used the most. We use this database to log 
actions taken on servers in our network. What my boss wants me to come 
up with is a list of which commands are issued the most, which servers 
get the most attention, and for each server, which command is issued the 
most, and so I was going to kind of do it messy-like as I'm not really 
100% sure of the best way to do it, but my goal was to create the count 
variables and then compare them using if statements to see which one is 
used the most. If you have a way of doing this more efficiently, I'd 
love to hear it. I'm not the best programmer in the world and I'm kind 
of just getting back into this stuff, so I'm all ears for any 
suggestions you may have =)


you can do it with one sql query.  i don't know the real names of your 
columns so i'm just going to make some up.


select message_type, count(1) x from table group by message_type order 
by x desc


you can do the same thing for machines - just change message_type to 
machine_name.


-jsd-


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Execute command line as a different user

2008-07-01 Thread Jon Drukman

Matt Palermo wrote:

I'm using the following command and I'm not getting any feedback:

exec(echo 'adminPass' | sudo -u adminAccount -S whoami, $f, $r);

Both $f and $r don't contain any data.  This leads me to believe that 
the command is not being run for whatever reason.  Is there something 
wrong with this command?  Is there a different way to do it?


set up sudo to run that particular command for that particular user with 
no password.


adminAccountALL = NOPASSWD: /usr/bin/whoami


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: V4 Vs V5 Issue

2008-07-01 Thread Jon Drukman

Neil wrote:


Hi Thanks

I have tested the path, that works fine. I set up a dummy file on the 
same path just to check that,  it found that and printed out some echo'd 
text from that file.


I can see the content of core_js.php file  in the the IE view source view.


debugging javascript in IE is about as much fun as slamming your head in 
a car door.


try it in firefox with firebug installed, it should give you much better 
feedback about what is going on.


-jsd-


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: class as default property

2008-06-23 Thread Jon Drukman

Chetan Rane wrote:


But this does not work:
?php
class Foo {
}
class Bar {
function __construct() {
public $f = new Foo();  
}
}
?


do this:

?php
class Foo {
}
class Bar {
public $f;

function __construct() {
$this-f = new Foo();
}
}

$x = new Bar();
print_r($x-f);

?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP and Apache

2008-06-23 Thread Jon Drukman

R B wrote:

Hello,

I´m developing a PHP system that needs one of these lines in the .htaccess,
depending of the server configuration:

AddHandler application/x-httpd-php .xyz
or

AddHandler application/x-httpd-php4 .xyz

or

AddHandler application/x-httpd-php5 .xyz

How can i detect on the fly which line i have to use?



IfModule php5_module
AddHandler application/x-httpd-php5 .xyz
/IfModule

IfModule php4_module
AddHandler application/x-httpd-php4 .xyz
/IfModule


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Search like php.net's URL thingy

2008-06-18 Thread Jon Drukman
On Wed, Jun 18, 2008 at 9:19 AM, Nate Tallman
[EMAIL PROTECTED] wrote:
 Not to beat a dead horse, but why would you *not* want to preserve the 404?
 If it's a bad url anyways, you probably *want* to return a 404 (albeit
 prettier) and you probably *don't* want search engines indexing it.

the original question was not how to serve fancy 404's, it was how to
serve urls like http://php.net/strtolower

you definitely want those indexed.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Search like php.net's URL thingy

2008-06-17 Thread Jon Drukman

Ryan S wrote:

Hey!

Thanks for replying.

Digging a bit more i found 


IfModule mod_rewrite.c
RewriteEngine On
RewriteRule ^([a-z][0-9][A-Z][aA0-zZ0])$ jj.php?show=$1
/IfModule

But it does not work :( do you see any fault with the above?


this is an apache issue, not a php issue, so you'll probably have better 
luck on an apache mailing list.


however i will tell you that apache handles URLs in .htaccess 
differently from in the normal httpd.conf files.  in the .htaccess file, 
the URL presented to RewriteRule does NOT have a leading /.  in the conf 
file, it will.  so your rule might work if you do this:


RewriteRule ^/([a-z][0-9][A-Z][aA0-zZ0])$ jj.php?show=$1

i'm guessing that you are using .htaccess though, in which case the 
problem becomes the rule itself.  your regex is not going to do what you 
think.  it's saying lower case letter followed by number followed by 
uppercase letter followed by i don't know what the heck that is.   try:


RewriteRule ^(\w+)$ jj.php?show=$1 [L]

\w is equivalent to [A-Za-z0-9_]  note that this is NOT the same as 
[A-Z][a-z][0-9]


you almost always want [L] in a situation like this to prevent later 
rules from messing with your rewritten string.


also i will tell you that if you ever plan to launch this feature on a 
site that gets significant traffic, turning off .htaccess file checking 
is a HUGE performance win.  unfortunately you will have to restart 
apache every time you want to modify your rewrite rules, but them's the 
breaks.


-jsd-


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Search like php.net's URL thingy

2008-06-17 Thread Jon Drukman

Nate Tallman wrote:

Why is an ErrorDocument insufficient or not the elegant way?
It accomplishes the goal in a clean way, no?


It's *WRONG*.  ErrorDocument still preserves the 404 error code, it just 
gives it a prettier face.  If the page really is there, returning a 404 
for it is not correct.  Search engines will not index it.  You probably 
don't want that.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Password Protecting a page and email notification

2008-06-17 Thread Jon Drukman

R.C. wrote:

I'm going to ask you PHP gurus if someone can give me a hand in trying to
get this resolved.  I'm fairly new to PHP and learning as I go.

I've got two page login.php and video.php.  Video.php is supposed to be
protected i.e. if someone clicks on the direct link or brings up the page in
a browser, it comes back with an error message and a request to link to
login.php... they type in their username/pasword and it opens up the
video.php so they can download videos.

I actually managed to accomplish that with the following code which sits at
the top of video.php.  I also created a form on login.php for user input.
So far so good.  However, we also need an email to be sent to the site owner
when someone logs in plus their name.  For the hell of me, I can't figure
out how to combine the two elements.  I tried a lot of things sofar, but
nothing works.  It's either the page gets protected OR the email gets sent,
depending on what I leave in the script. I tried using part of Jenny's
script which is great for email forms but I can't combine this whole thing.
Hlp!!

/*this is the code that sits at the top of the protected page* which works
actually fine for the protection*/
?php
session_start();

 $_SESSION ['username'] = $_POST ['user'];
 $_SESSION ['userpass'] = $_POST ['pass'];
 $_Session ['authuser'] = 0;

 if (($_SESSION['username'] == 'logon')  and
($_SESSION['userpass'] == 'password')) {
  $_SESSION['authuser'] = 1;
 } else {
  echo I'm sorry, access is denied br /;
  echo Please log in at  a href='login.php' HERE/a to enter your
Username and Password;
 exit();
 }

Can this be done on one form i.e. login.php?  I have 4 textfields set up:
username, password, email, name (for the person sending the email...)..
some if clause somewhere?

Best
R.C.


what you have here looks fine.  just put the mail() command in the first 
part of the if...


if (($_SESSION['username'] == 'logon')
 and ($_SESSION['userpass'] == 'password')) {
... SEND MAIL HERE ...
$_SESSION['authuser'] = 1;
 }
 else {
  echo I'm sorry, access is denied br /;
  echo Please log in at  a href='login.php' HERE/a to enter your
Username and Password;
 exit();
 }


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] APC errors - realpath failed to canonicalize

2007-03-16 Thread Jon Drukman
I've been trying to smoke out some problems with APC under high load. 
We're using PHP 4.4.6 and APC 3.0.13.  We are finding loads of this in 
our error log:


realpath failed to canonicalize PEAR.php - bailing

I know APC prefers you to use absolute paths but lots of PEAR modules 
just do require_once('PEAR.php')


Why does this realpath error occur?  Why is realpath being used? 
According to the manpage, it says Do not use this function.


-jsd-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: url obfuscation

2006-07-13 Thread Jon Drukman

Dan McCullough wrote:
For me it doesnt matter I dont want Google in the section that I'm 
obfuscation.


use nonsequential ids (as you do) and a robots.txt file to stop google 
(and any search engine that obeys robots.txt)

http://www.robotstxt.org/wc/exclusion.html

also google has a thing called sitemaps which are handy (but 
google-specific)

http://www.google.com/webmasters/sitemaps

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mysql_fecth_array() and function call as parameter

2006-04-03 Thread Jon Drukman

Paul Goepfert wrote:


function determineDay ()
{
$return = ;
$query1 = mysql_query(SELECT months FROM Month WHERE m_id =
month(curdate()));
$query2 = mysql_query(SELECT dayNum FROM Days WHERE dayNum =
day(curdate()));
$query3 = mysql_query(SELECT year FROM Year WHERE year = 
year(curdate()));


always Always ALWAYS check the error return!!!

$query1 = mysql_query(SELECT months FROM Month WHERE m_id = 
month(curdate())) or die(query1 failed:  . mysql_error());


do this religiously on every single mysql_query.  in fact, write a 
wrapper function to do it for you - that's what i do.



If anyone can find my error please let me know.  I have looked at this
for about an hour and I can't figure it out.


you probably could have saved an hour by checking the error code.

-jsd-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mysql_fecth_array() and function call as parameter

2006-04-03 Thread Jon Drukman

Paul Goepfert wrote:


I included the or die function on the end of my query statement.  When
I tested this on my web page I got the following error

Query2 Failed: You have an error in your SQL syntax near '(curdate())' at line 1

When this code executed:

$query2 = mysql_query(SELECT dayNum FROM Days WHERE dayNum = day(curdate())) ;

I can't see where the error is.  Can anyone see the error?



that query works fine here.  what version mysql are you using?  (server, 
not client).


-jsd-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mysql problems

2005-03-04 Thread Jon Drukman
Jed R. Brubaker wrote:
I have a PHP script that populates a database table. No big deal. It creates 
mailing labels. However, a weird things keeps happening - every once in a 
while, a query is run twice. It is the same query, same information, even 
the same time (there is a now() in the query - and it is identical).
create a unique index on the table so that it CAN'T possibly create 
duplicate rows.  this will cause the problematic part of your php script 
to start choking with errors about duplicate keys (assuming you're 
checking the return status of your mysql_query()'s which you should 
always be doing!!).  this should help you isolate the problem.

-jsd-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Good and free encoder for PHP5

2004-12-14 Thread Jon Drukman
Octavian Rasnita wrote:
Does anyone around here knows a *good* and *free* encoder for PHP5 ?
I used to run Turck, but it seems that somehow it has been discontinued.
(At least, the last release occured about a year ago).
Did it stop working? My Turck copy still works. ;-)
turck never worked for me.  in our very high traffic web environment 
(hundreds of requests per second) turck would leak memory like crazy 
until it eventually killed all the servers.  i gave up on it.  would 
love to find a reliable replacement that can handle millions of requests 
per day.

-jsd-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] strpos mystery

2004-07-28 Thread Jon Drukman
with this code fragment:
?
$string='/mobile/phone.html';
if (strpos($string,'/mobile/')!==false) { print one: yes\n; }
if (strpos($string,'/mobile/')===true) { print two: yes\n; }
?
only the first if statement prints anything.  why is !== false not the 
same as === true ?

-jsd-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] include_path with separate virtualhosts doesn't work

2004-06-21 Thread Jon Drukman
in my apache server i have a bunch of virtualhost sections like:
virtualhost *
servername bob.domain.com
documentroot /var/httpd/users/bob
php_value include_path .:/var/httpd/users/bob
/virtualhost
virtualhost *
servername sally.domain.com
documentroot /var/httpd/users/sally
php_value include_path .:/var/httpd/sally/bob
/virtualhost
and so on... currently there are 10 or more.  however it seems like PHP 
decides which include path to use based on the first request to the 
particular apache child process.  in other words, if there are 5 apache 
children, and bob visits bob.domain.com, the apache child that handles 
that request will ALWAYS use bob's include path.  if sally then tries to 
visit her site, and she gets the apache child process that served bob's 
request, the include path will be bob's.

any obvious things i can look at to try to fix this?
here's some of the relevant config detail:
PHP Version = 4.3.6
System = Linux c10-gs-dev1.cnet.com 2.4.20-28.7bigmem #1 SMP Thu Dec 18 
11:04:21 EST 2003 i686
Configure Command =  './configure' 
'--with-apxs2filter=/opt/apache2/bin/apxs' '--with-mysql=/opt/mysql' 
'--prefix=/opt/php' '--with-mcrypt=/opt' '--with-xslt-sablot=/opt' 
'--enable-xslt' '--enable-ftp' '--enable-mbstring=ja' '--enable-bcmath' 
'--with-aspell=/opt' '--with-pspell=/opt'
Virtual Directory Support = disabled
Configuration File (php.ini) Path = /opt/php/lib/php.ini
PHP API = 20020918
PHP Extension = 20020429
Zend Extension = 20021010
Debug Build = no
Thread Safety = disabled
Registered PHP Streams = php, http, ftp

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: rich text editing

2003-08-20 Thread Jon Drukman
Redmond Militante wrote:
$essay2=nl2br($essay2);
$essay2 = str_replace( br /, \par, $essay2 );
$output = str_replace( essay2, $essay2, $output );
to preserve line breaks when generating rtf documents from the text blob essays we have in the mysql db.

this is working fine.  i have recently had some requests that we add the ability to preserve rich text formatting such as bold, underline and italics to the essay question text box.  apparently, the mysql data type 'text' doesn't store rich text formatting such as bold and underline.  specifically, i've seen some really nice javascript(?) rich text editors in some high end web based email clients - it would be great to duplicate this type of functionality in our app, as some people would really like to preserve italics and the like in their essays.
RTF is just plain text with special markup commands embedded in it. 
Mysql Text columns can hold them just fine.

You should translate i and b into the corresponding RTF tags and 
then your formatting will be preserved.

i was wondering if anyone has had experience with coding rich text text editors, or similar experience.  if you have any advice for me, i'd really appreciate hearing from you
if you want a fancy GUI editor for your web page, that is not a PHP 
question.  do a search for activex or java text edit widgets.  most of 
them will convert to HTML though, so you'll still have to convert the 
html commands to RTF in your php script.

-jsd-



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mysql_connect() fails randomly

2003-08-19 Thread Jon Drukman
Curt Zirzow wrote:

* Thus wrote Jon Drukman ([EMAIL PROTECTED]):
$dbh=mysql_connect() or die(mysql connect failed:  . mysql_error());
  . Ensure your error_reporting level is high enought to allow
  Warnings, and make sure display_errors is on.
  or

  . Turn on track_errors and use the variable $php_errmsg inplace
  of mysql_error().
die(mysql connecte failed: $php_errmsg);
i have warnings on.  it says Warning: mysql_connect() failed: and then 
there is no error message.  $php_errmsg is empty as well.

it only happens once every hundred or so connects.  it's starting to 
drive me bonkers.

-jsd-



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: in the middle of shift and pop

2003-08-19 Thread Jon Drukman
Decapode Azur wrote:

is it possible to remove an element of an indexed array such as this exemple
$A = array('a', 'b', 'c', 'd', 'e', 'f');
in a way that we can optain this result :
$A = array('a', 'b', 'd', 'e', 'f');
something like that perhaps ?
array_remove($A, 2);
If such a function does not exists, what would be the more efficient way to 
do so a lot of time on very big arrays ?
the function exists and is called array_splice.  eg:

?

$A = array('a', 'b', 'c', 'd', 'e', 'f');

array_splice($A,2,1);

print_r($A);

?

running this produces:

Array
(
[0] = a
[1] = b
[2] = d
[3] = e
[4] = f
)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] mysql_connect() fails randomly

2003-08-18 Thread Jon Drukman
i've got a library file that i require() in all my scripts.  it starts 
with this line:

$dbh=mysql_connect() or die(mysql connect failed:  . mysql_error());

about 5% of the time, this fails for no apparent reason.  it just prints

mysql connect failed:

with no error message.

there's nothing wrong with the mysql server as far as i can tell.  there 
are tons of available connection slots.

any ideas?

it also happens with mysql_pconnect() too.

-jsd-



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: How to open a save-as dialog and then redirect after donwload?

2003-08-18 Thread Jon Drukman
Jean-Christian IMbeault wrote:
I want to create the following:

1- A screen a series files and associated buttons
2- if the user clicks the button a File | save as dialog opens up
3- after the file the user is redirected to a new page
I've gotten 1 and 2 to work but I can't figure out how to do anything 
after the file has finished downloading. I've tried header(Location: ) 
but that doesn't work because it must be used before any input is sent.
you can't really do it.  best thing you can do is open a popup window to 
actually do the downloading.

this is not a php question, btw.

-jsd-



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] preventing output dump of passthru()

2003-08-11 Thread Jon Drukman
At 05:22 PM 8/5/2003, Chris W. Parker wrote:
David Nicholson mailto:[EMAIL PROTECTED]
on Tuesday, August 05, 2003 5:12 PM said:
 $output = array();
 exec(command,$output);
 $output = implode(,$output);
That's a good idea!

Well how about this? (posted in another message)

$output = explode(\n,chop(`$command`));

That is working great and it's only one line. The problem is that I have
no idea WHY it works and what the ` characters do.
Can you fill me in?
`$command` means start up a shell, run $command in that shell, and retrieve 
the output of the command into a string.

-jsd-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP / Oracle support (8/9) under Redhat 9

2003-08-04 Thread Jon Drukman
At 06:33 PM 8/3/2003, Robert Mena wrote:
a) apache

It seems that apache + php does not work well under
heavy load so I should stick with 1.3.X right ?
i don't know about that.  i'm running an extremely high traffic website 
with apache + php + linux and it's a total champ.  we've got 6 compaq 
dl380's (dual xeon 2.8ghz, 4G ram) behind a load balancer and so far there 
hasn't been a single apache/php failure that wasn't caused by me doing 
something stupid (like writing an infinite loop in php).

we're using apache 2.0.47 (prefork model), php 4.3.1, redhat 7.3, mysql 4.0.12.

-jsd-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Regular Expression

2003-08-04 Thread Jon Drukman
At 02:45 PM 8/4/2003, Ralph Guzman wrote:
Been working on this one for a while but can't get it working properly.
I need a regular expression to match if address is
1. PO Box
2. P.O. Box
3. P.O.Box
I'm using /i to make this case insensitive.

I got it working with 1  2, but it's still not matching 3. Any
suggestions?
if(preg_match( /p[\.]o\.* +box/i, trim($_POST['address'])){
   echo Address is P.O. BOX;
}
/p\.?o\.?\s*box/i

p followed by optional period (\.?)
o followed by optional period
zero or more whitespace (\s*)
box
mine has the added advantage of matching po.box and po. box

-jsd-



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] session.cookie_lifetime

2002-01-31 Thread Jon Drukman

can you change session.cookie_lifetime on the fly?  some users might want
their sessions to persist between browser invocations, and others might want
their sessions to expire.

-jsd-




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




[PHP] session.cookie_lifetime

2002-01-31 Thread Jon Drukman

is it possible to have session.cookie_lifetime different for each user?
some users may want their cookies to live past a browser shutdown and others
may not.  i'd like to give them a choice, if possible.

-jsd-




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] session.cookie_lifetime

2002-01-31 Thread Jon Drukman

At 09:03 PM 1/31/2002 -0400, Miles Thompson wrote:
If you want persistence then use a cookie to
- store the information
- to provide a key for fetching data from a database
or accept that if preservation of inter-invocation data is impt enough to 
require registration of users and a login if the client has cookies turned off.

Sessions are supposed to be evanescent!

(If someone else has responed, forgive me.)

hmmm, i think i stated this badly.

when a user logs in to my site, i load a bunch of stuff about them from a 
database and put it in session variables.  right now i have the session 
expiration time set to a pretty large value.

they can come back later in the day and still have all their information 
remembered, or they can hit the logout button to have their session destroyed.

i see what you're saying about using a cookie, but the session IS a 
cookie!  it just seems like it would be better to have just the one 
cookie.  especially as the contents of a session cookie are hard to guess 
at.  i'm not sure what sort of cookie i could give someone for persistent 
login that isn't easily forged.

-jsd-



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




[PHP] Session confusion

2001-12-03 Thread Jon Drukman

I have a file called sessionvars.php that I require() as the very first
thing on all my pages, it has

session_register(blah...) and about 40 or 50 variable names after that.

sometimes I am seeing behavior where a form on one page that references a
session variable doesn't carry over the change to the next page.  in other
words, i filled in a username in a form on page 1, hit submit, got to page 2
and it was remembered.  but now i go back to page 1, change the value in the
form, and when i get to page 2 it has the old value, not the new value!

i have the following options in my apache config:

php_value session.save_path /home/phpsession/
php_value session.name EINFO
php_value session.cookie_lifetime 2592000
php_flag register_globals on

what do i have to do to get the changes to propagate through??

-jsd-




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




[PHP] Re: Session confusion

2001-12-03 Thread Jon Drukman

Jon Drukman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 sometimes I am seeing behavior where a form on one page that references a
 session variable doesn't carry over the change to the next page.

i just figured this out from reading the user comments at php.net.  form
posted variables don't automatically override session vars.

so i added a loop at the top of each page which overwrites all session vars
from posted form vars.  unfortunately if you go straight to one of the
middle pages (this is a 6 page form) you wind up wiping out whatever is
recorded on that page.  i'll figure out something i hope...

-jsd-




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