Re: [PHP] trying to figure out the best/efficient way to tell whoisloggedinto a site..

2005-09-14 Thread Ben Holt

bruce wrote:


ben...

i understand what you've stated, but i was under the impression that a
number of sites (etrade, etc...) can/do track who is/is not logged into
their sites.. and not just by some crude 'timeout' function...
 

Yes they do, the key there being that they are tracking who is logged 
into their site.  You log in, they make a note of it, you log out, they 
make a note of it.  If you don't log out and yet are inactive for a 
period of time your login becomes stale and you are logged out 
automatically by the timeout.





i might be wrong, but it was my understanding that those kinds of sites have
the ability to more or less know when someone kills the browser session, and
is no longer on the system. these kinds of sites also ustilize some form of
a 'timeout' process as well for users who simply have browser sessions that
are inactive...

by your statements, you're pretty much saying that the only approach one has
to this issue is to utilize some sort of timeout function, and if you don't
detect user activity after your timeout, then mark the user as no longer
being active, and proceed accordingly. this apporach doesn't allow an app to
immediately know when a user has killed the browser.

so, the question might be, how does one detect when a user has killed a
session/left your app?
 



Provide a login/logout ability and when they log out you kill their 
session.  This is how an e-trade like site would deal with it.  If they 
don't log out you still won't know they have left your site until their 
session times out though.


Some reading on HTTP would help you understand why what you are looking 
for is not possible.


- Ben

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



Re: [PHP] trying to figure out the best/efficient way to tell whoislogged into a site..

2005-09-13 Thread Ben Holt

bruce wrote:


ben...

your statements/approach is pretty much what i've been thinking of. however,
with regards to the forums/cms apps.. i've yet to find one that actually
keeps a track of the logged in users, that works when the user kills the
browser..

the ones that i've seen, that allow an admin to see who's online, appear to
fail when i've killed the test user. the apps still show the killed user as
being online...

hence my isuue!
 

Bruce, what I have been trying to explain is that this _can_not_ be 
overcome.  The web is stateless.  Connections between server and client 
last only long enough for a file to be requested and sent, once that has 
happened the server and client are no longer connected and have no 
knowledge of each other.  _No_ server-side program will be able to tell 
you when a user closes their browser or goes to another web site.  HTTP 
simply doesn't provide what you are looking for.


- Ben

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



[PHP] Re: unbale to send mails using mail function

2001-11-29 Thread Ben Holt

Have a look at the path to sendmail in your php.ini file.  To get mine 
to work I had to set it to '/usr/sbin/sendmail -t -i'.  Your path may be 
different, but the -t and -i switches are important.

- Ben

Sanjay wrote:

> Hi
> 
> I have successfully installed PHP 4.0.6 with apache 1.3.22 on my mandrake
> Linux box. Now, the problem is I am not able to send email using mail () of
> php. However, I am able to send it using mail command.
> 
> Any help will be highly appreciated.
> 
> Regards
> Sanjay
> 
> 
> 



-- 
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] PDFLib - Builds & Installs, but doesn't show up in phpinfo()

2001-11-28 Thread Ben Holt

Hi all,

I've been banging my head against the wall for a few days and have 
finally decided to consult the list.  Here's what I'm trying to do and 
what is happening:

Platform:

Various version of RH Linux, primary 6.2 (on an i586), but when that 
failed (repeatedly) I started trying it on a 7.1 box (Athlon).

Goal:

Build libpdf support into PHP for dynamic pdf generation

What is Happening:

-libpdf appears to configure, build, and install properly (from source)
-php is rebuilt and appears to configure, build, and install properly
-the output of phpinfo() does _not_ list any information on libpdf and 
libpdf functions do not work

What I've Been Doing:

Aside from beating my head against the wall I have been configuring 
libpdf builds with the following:

./configure --enable-shared-pdflib --enable-php --enable-cxx

The output at the end of the ./configure process indicates that shared 
library, C++, and PHP support (among others) has been enabled.

pdflib then appears to build and install properly with 'make; make install'

* Note, I have been blowing away the pdflib source directory and 
re-untaring each time I do a build.

For PHP builds I have been configuring with the following:

./configure --with-apxs --with-pdflib=/usr/local/lib 
--with-mysql=/usr/local/mysql/lib/mysql --with-zlib=/usr/include 
--with-ttf=/usr/lib --with-jpeg-dir=/usr/lib --with-tiff-dir=/usr/lib

Again, it appears to configure properly. I then build PHP with ./make 
and ./make install.

When apache is restarted and the output of testinfo() is checked pdflib 
is _not_ listed and pdflib specific functions do _not_ work. The 
configure options shown above are listed in the Configure Command 
portion of the output.

Any pointers or tips would be most appreciated.  I would be happy to 
provide any additional information that might explain what I've done.

Thanks,

Ben


-- 
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: checkboxes

2001-10-26 Thread Ben Holt

Sounds like onChange to me...  when you check it you change it, when you 
uncheck it you change it.

- Ben

Boaz Yahav wrote:

> does anyone know the HTML event that knows when a checkbox has been
> checked and unchecked?
> So far I'm using onChange but that is not exactly what I need. I need to
> run one JS function when a checkbox is checked and another when it is
> unchecked.
> 
> NE1?
> 
> 
> berber
> 



-- 
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: Daylight savings and timestamps

2001-10-26 Thread Ben Holt

Your timestamps should be in UTC, and therefore not effected by daylight 
savings.

- Ben

Nathan Cassano wrote:

> Hello fellow PHPer's,
>   Daylight savings is soon upon most of us and I have some
> questions in regard to timestamps. My problem: So we put our clocks an
> hour back. I have database tables with plain integers that store
> timestamps. I like to do comparison operations with these timestamps.
> When daylight savings takes effect the pre-daylight savings timestamps
> are an hour ahead of the daylight saving timestamps and cause time
> operations to calculate incorrectly. What is the solution? Could I
> offset the new timestamps to ignore daylight savings, make all my
> timestamps none-daylight savings timestamps?
> 
> 
> 



-- 
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: Auto-Stretch and the BACK - FORWARD buttons -- HELP!

2001-10-18 Thread Ben Holt

 
> My BODY tag reads as follows:
>  topmargin="0" marginwidth="0" marginheight="0">
> 
> Any tips on how I can correct this?  It needs to be flush irregardless if
> the user presses the BACK button or not.
> 


What is that width setting doing in your body tag?  Is a width setting 
even recognized in a body tag?  Assuming it is (and I have my doubts), 
if someone comes to your site with a browser window width higher or 
lower than 800 the browser will have to chose between your width setting 
and your margin settings.  One of them will have to take priority 
because you can't have a width of 800 and a margin of 0 if the viewer's 
browser window is 1200 px wide... or 640 or any size other than 800 for 
that matter.

- Ben




-- 
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: Running php script with "?var=string" query inside another php script

2001-09-05 Thread Ben Holt

Dave.O wrote:

> I am trying to run a php script with query from wthin another php script.
> 
> I have a php script that adds information to a database and calls another
> php script with query to view those details using the include command but I
> keep getting an error "Failed opening" file.
> 
> Is there anyway of running a php script with the "?var=string" query inside
> another php script ???

using 'include("secondfile.php");' should do the trick.  The second 
script is, for all intents and purposes, essentially inserted into your 
first script at the point of the 'include' statement.  There is no need 
to pass variables, although the usual global/local variables issues 
still apply with regard to functions (ie drop the ?var= stuff).

If you continue to get "Failed opening" type error messages check the 
read and execute permissions on the second script.  Can the second 
script be run directly via a browser?  Is the path to the second script 
used in your include statement correct?

- Ben


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