Re: [PHP] Problems producing an image

2001-12-06 Thread Harshdeep S Jawanda


> Try taking the header line out; that way if there is an error message

> you should be able to see it in 'View Source'.

Finally managed to solve the problem - there was an empty line before
the start tag ("http://greetings.yahoo.com

-- 
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] Extending classes multiple times

2001-12-06 Thread Harshdeep S Jawanda

I am not very sure what your question is, but "multiple inheritance"
means that a derived class can inherit (i.e., be derived from) more
than one class.

In multiple inhericance, you can have:

A   B
|   |
+---+---+
|
C

Here, C is simultaneously derived from A & B. You can't have this in
single inheritance (which is what the PHP manual is saying). This means
that C can be derived from either A or B, not both.

The following is always possible, irrespective of whether multiple
inheritance is supported or not:

A
|
+-B
|
+-C
|
+-D

This is three different classes (B, C and D) derived from A.

Hope this helps clarify your doubts.

--- Matt Friedman <[EMAIL PROTECTED]> wrote:
> I had been under the impression that one could extend a class only
> once.
> That is, if I extend class A with class B I would then not be able to
> extend B again with any other class. 
> 
> See: http://www.php.net/manual/en/keyword.extends.php
> "An extended class is always dependent on a single base class, that
> is,
> multiple inheritance is not supported. Classes are extended using the
> keyword 'extends'."
> 
> With some testing however, it appears that I can extend class B with
> class C and class C with class D and so on...
> 
> Am I misinterpreting the manual? I suspect I am. Or is this a new
> feature. Thoughts?
> 
> Thanks,
> 
> Matt Friedman
> Web Applications Developer
> www.SpryNewMedia.com
> Email: [EMAIL PROTECTED]
>  
> 
> 
> 
> 
> -- 
> 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]
> 
> 
> 


=
Please send all emails to my automatically redirecting
address: [EMAIL PROTECTED]

Regards,
Harshdeep S Jawanda
[[EMAIL PROTECTED]]

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-- 
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] Problems producing an image

2001-12-05 Thread Harshdeep S Jawanda

I am using the following code to try to produce a test image:


I am trying to display this image on the page
http://www.harshdeepjawanda.com/t2.html .

Phpinfo() shows that PHP was compiled with: --with-gd, --with-jpeg-dir
and --with-png-dir, among others. Why then am I not able to see any image?

=
Please send all emails to my automatically redirecting
address: [EMAIL PROTECTED]

Regards,
Harshdeep S Jawanda
[[EMAIL PROTECTED]]

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-- 
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] __ $8/mo php hosting on 24/7, OC3+ web server ___

2001-04-12 Thread Harshdeep S Jawanda

Hey people, is this getting us anywhere at all? If you can help Greer make his
site more secure, GREAT! If you can help him in any other way, fantastic!

But if you have nothing constructive to offer... well, you know, replies to
this thread have already created more spam than Greer himself ;-).

The Hermit Hacker wrote:

> On Tue, 10 Apr 2001, Jeffrey Greer wrote:
>
> > >what about security?  are they on top of the latest versions and
> > >patches.i mean after all...it is REDHACK..
> > >
> >
> > I'm no security expert, but I can apply the most important patches.
> > Yesterday I added mod_ssl to apache.
>
> Okay, can you explain how this improve the security of your RedHat server?
>
> > >spammers are funny people :-)
> > >
> > >~kurth
> > >
> >
> > I'm not your average spammer.  I am a computer scientist dedicated to
> > the struggle against the fascist MS hegemony and all other fascist
> > corporations who try to control computer technology.  Support my
> > business and you'll be doing the world a favor. ;^)
>
> ... and help advocate mail list spam while you are at it ... Woo Hoo ...
>
> --
> 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]

--
Regards,
Harshdeep S Jawanda.


-- 
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] assignment operator works for comparison??

2001-04-11 Thread Harshdeep S Jawanda

Hi,

Dan wrote:

> >  > if($shiny = 0){
> > This does not compare anyting, it assigns 0 to $shiny
>
> yes i know, but shouldnt this operation return true?

No, it doesn't return true.

The "=" operator returns the value of the expression on its right hand side.
Therefore, the statement given above is equivalent to (as far as the if is
concerned):

 if (0) {

because the "=" operator returns 0, the value on its right hand side.

That is why a statement like:

 a = b = c = 2

sets all the above variables to 2. Otherwise, if it were to operate the way you
think it should, it would set "c" to 2 and "a" and "b" to "true" ;-).

Hope that clears up things for you.

--
Regards,
Harshdeep Singh Jawanda.



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

2001-04-08 Thread Harshdeep S Jawanda

Hi,

Just make the modification listed below:

while ($row = mysql_fetch_row($result))
{
  $cell_color = ++$i % 2 ? "#C0C0C0" : "#CC";
  echo "\n";
  for ($i =1;$i$row[$i]";
  }
}

Mike P wrote:

> I can change the column sof a table with the following code but how do I
> change the row colors instead.With the columns I have "i" to manipulate but
> not with rows.
>
> while ($row = mysql_fetch_row($result))
> {{
> echo "\n";
> for ($i =1;$i {$cell_color = "#C0C0C0";
> $i % 2  ? 0: $cell_color = "#CC";
> echo "$row[$i]";
> Thanks
> Mike P
> [EMAIL PROTECTED]
>
> --
> 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]

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] TheCasino.com: You have been removed!

2001-04-05 Thread Harshdeep S Jawanda

_If_ only subscribers are allowed to post to this list (which it should be)
and _if_ [EMAIL PROTECTED] is a subscriber and _if_ this address is setup
to re-send this email to any address that replies things might be getting
a little circular!

Sweet dreams!

Can't somebody unsubscribe [EMAIL PROTECTED]?

[EMAIL PROTECTED] wrote:

> http://www.TheCasino.com: Better Than Life! (tm)
> Since 1999 - Now With 100% "Buffer Bonuses" On All Deposits!!
>
> Dear [EMAIL PROTECTED],
>
> This email is to confirm that we have "removed" you from our mailing
> list - per your request!
>
> You will no longer be considered for TheCasino.com Monhtly Prize Drawings.
>
> Please let us know if we can be of further assistance.
>
> The Support Staff
> TheCasino.com, Corp.
> [EMAIL PROTECTED]
> http://www.theCasino.com
>
> --
> 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]

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] help with parse

2001-04-04 Thread Harshdeep S Jawanda

Hi,

Renze Munnik wrote:

> Have you ever checked the $HTTP_USER_AGENT value from IE?
>
> IE says:
>
> "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95)"
> (for example)
>
> So, you shouldn't be checking for Mozilla. IE says that to.

You should first check for the existence of "IE" in $HTTP_USER_AGENT. If that
doesn't exist, then and only then can you know that the browser is _not_ IE.

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] A ToDo/ task list

2001-03-27 Thread Harshdeep S Jawanda

Hi ppl,

I have been thinking of using PHP to make a ToDo/task list type of
application. I am looking for something different from the usual
Personal Information Managers (PIMs) - they are oriented more towards
appointments than tasks.

Does anybody know of any ongoing (preferably open source) projects in
PHP of a similar nature?

I would like to be able to open/create a task, maybe assign it to
somebody, be able to add comments to it, have user authentication and
the most desired (though uncommon) feature is: a change log. Through a
change log, I want to be able to trace the who and when of comments
added to a task etc.

Any help/pointers will be highly appreciated. Thanks,

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] Seek for the Web Site Info.

2001-03-22 Thread Harshdeep S Jawanda

Go to http://uptime.netcraft.com/ . That should give you part of the
information you want.

Ian wrote:

> Does anybody know that any web site allow me to enter web address example,
> www.yahoo.com, and enter go.
>
> The result will shown me that yahoo server,
> 1. Operating System?
> 2. Programming?
> 3. Database?
> etc 

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] files with html extension

2001-03-22 Thread Harshdeep S Jawanda


Jeff Armstrong wrote:

>  This is exactly why http://www.w3.org recommend that you DONT
>  SPECIFY A FILE TYPE TYPE in your HREFs.

But doth that actually work - how many web servers are able to handle this type
of link correctly?

Ummm... and what happens (or is supposed to happen) to resolve xxx.html and
xxx.php?

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] site root variable (for Generic Unix and Windows)

2001-03-19 Thread Harshdeep S Jawanda

Errata...

Harshdeep S Jawanda wrote:

>  $siteroot = "$HTTP_HOST:$SERVER_PORT"

Sorry, this should be

 $siteroot = "http://$HTTP_HOST:$SERVER_PORT"

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] site root variable (for Generic Unix and Windows)

2001-03-19 Thread Harshdeep S Jawanda

Hi,

[EMAIL PROTECTED] wrote:

> What seems crazy to me is that you cant just set a varable (i.e. siteroot)
> in common.inc and refer to URLs at $siteroot."/page.html".

Are you sure that

 $siteroot = "$HTTP_HOST:$SERVER_PORT"

doesn't work for you (as an absolute link seems ok to you)? Have a look at

 http://www.php.net/manual/it/language.variables.predefined.php

and experiment around.

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] site root variable (for Generic Unix and Windows)

2001-03-19 Thread Harshdeep S Jawanda

Hi,

Matt Williams wrote:

> you could make your links absolute
> ie..
>
> /cat.html

Properly speaking, even this link is relative :-) (it is relative to the
document root of the web server). I like to call such links "impure relative"
links :-). I call links of the type "../cat.html" "pure relative" links ;-)

This type of a link will only work if you're always going to have your pages
served up by a web server (which may be true in your case).

I had wanted to do something similar as far as specifying the path was
concerned. However, in my case, I had to mirror the site on my hard disk and
then work on that too. Therefore, such "impure" relative links would not have
worked for me. I needed to have "pure" relative links so that the whole
structure of the site would hold together even when viewed off the hard disk.

A look at the mail (and the answer to it) titled "Finding the depth" in this
list might prove helpful.

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] Automatic documentation: call for help with C++

2001-03-19 Thread Harshdeep S Jawanda

Hi,

To quickly get to the gist of it...

Geoff Caplan wrote:

> Any takers?

I am definitely interested.

The problem is: I am unlikely to be able to find sufficient time. Therefore,
(unfortunately,) I can only be counted upon as a second or third rung
helper, if at all :-(.

I'll try and have a look at ROOT and evaluate its suitability.

Great posting!

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] unable to fine /htdocs on my linux machine :(

2001-03-18 Thread Harshdeep S Jawanda

Hi,

Nilesh Parmar wrote:

> i am unable to locate the directory /htdocs in my machine

The default location for the htdocs directory is:
/htdocs.

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] Website, Design, hosting and maintenance for only $999.00 per year

2001-03-16 Thread Harshdeep S Jawanda

Hey! What the hell is happening? That's my company's domain name!!

Please don't anybody bother to reply to this posting by "Netmark.Desing" - its
an obvious fake. A visit to www.pspl.co.in will prove to you that we're not into
anything even remotely connected with this posting.

[EMAIL PROTECTED] wrote:

> Website, Design, hosting and maintenance for only $999.00 per year,
> by NetmarkDesign.
>
> Looking for a cost effective, professionally designed website?  Our program
> enables you to budget your internet base expenses upfront.  We offer
> in-house
> design, hosting and marketing.  Put all your internet operations under one
> roof.
>
> If you have an existing site and would like a quotation to convert, upgrade
> or redesign we offer 48 hour no obligation proposals tailored to your needs.
>
> See us at Top Ten Traffic Sites at www.greatfreesite.net/bestten where
> we've been ranked number 5 as the most cost effective website provider and
> take the next step to your success.
>
> NetmarkDesign

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] FAQ - Newbie perspective

2001-03-15 Thread Harshdeep S Jawanda

Hi,

I don't want to argue about anything, just point out something that occurred
to me.

First of all, I am a newbie as far as PHP is concerned, though I am more
than comfortable with programming.

I recently asked a pretty simple question on this list ("Finding the
depth"). I could have found out the answer to it in about 10-15 minutes on
my own, thanks to my experience with programming. Still, I posted the
question to this list. Why?

What did I gain:

   * I saved time.
   * I got to see _PHP_code_ for solving my problem. Any solution from me
 would have been more C++ than PHP. I got to become more familiar with
 thinking the PHP way.

What did I lose:

   * Nothing, because reading the code snippet and investigating the
 functions used therein taught me all I needed to know (for this
 instance). Following the "See also" links taught me some more.

Did I _waste_ somebody else's time? I don't really think so. Plus, a posting
can always be ignored...

An answer saying "RTFM" and pointing me the relevant functions (even if they
were just function names) would have been good enough too. But then I
wouldn't have gotten to see an experienced person's PHP code.

The question is: how many of you think that that posting was "ok" and how
many had to curb the temptation to flame me :-)?

Btw, I too don't like all those "PHP editor" and "How to loop" type of
questions ;-). But then, I simply delete them and that's it!

Rick St Jean wrote:

> It is there a list of most frequently asked questions?
> It seems that people ask the same questions, again and again,
> they do not READ THE MANUAL.  Yes I have asked 2 stupid
> questions, but I really did search and I am reading my manuals,
> the PHP and the book that I bought.
>
> Also I would like to know if there would be a demand for an
> experienced mailing list?  I am just frustrated by the same 3
> questions that pop up about once a day. The rest of the posts
> are great.

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] Finding the depth

2001-03-15 Thread Harshdeep S Jawanda

Hi,

Chris Lee wrote:

> ok, this is what you asked for 

Thanks! I haven't tried it, but I am sure it will work.

> but why cant you just do this.
>
> echo "
> 
> ";

I don't want to do that because that sort of link will work only when this page is 
served up by a web server.
It won't work if I mirror my site onto a hard disk :-).

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] Finding the depth

2001-03-15 Thread Harshdeep S Jawanda


Hi all,

To explain my problem, I'll have to draw a directory structure (please
bear with me :-):

  
|
+--
|
+--
||
|+--
|
+--
 |
 +--
 ||
 |+--
 |
 +--

The directory  contains some pictures that will be common
to the whole site. I want to use purely relative links, of the form
../../..//pic1.gif (for files in the directory
), to link to these common images (this link will be
../..//pic1.gif for ,  and
 etc.).

How can I (essentially) determine the depth of a document wrt the
document root? Basically, I want to have a funtion (say, findDepth())
that I can use to write out my image tags in the following form:

  

which will produce the correct number of double-dot-slash (../)
strings.

What help can PHP offer me - i.e., how can I write my hypothetical
findDepth() function? Please help!!

COROLLARY 1:

  If the hypothetical function findDepth() returns the appropriate
  string, does it _need_ to be echoed or will just putting
   in the correct place work?

Thanks!

-- 
Regards,
Harshdeep Singh Jawanda.


-- 
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] Good Free PHP Editor?

2001-03-12 Thread Harshdeep S Jawanda

Hi,

Andrew Halliday wrote:

> Does anyone know of a good PHP enabled editor that fits the following
> criteria:?
>
> (in order of importance)
> - Is free
> - Runs under Windows
> - Has colors (syntax highlighting)
> - Can edit multiple files (ie multi threaded)
> - Reports line numbers
> - Has good search & replace functionality

Have you tried GNU emacs yet? It has all of the above and much more. You may
need to separately download and install a package for PHP, though.

--
Regards,
Harshdeep Singh Jawanda.



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

2001-03-12 Thread Harshdeep S Jawanda

Hi,

Harshdeep S Jawanda wrote:

> I suppose you must already have tried sending mail to
> [EMAIL PROTECTED] by now.

I tried this address and it worked for me.

--
Regards,
Harshdeep Singh Jawanda.



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

2001-03-12 Thread Harshdeep S Jawanda



> On Mon, Mar 12, 2001 at 11:59:37AM +1030, David Robley wrote:
> > On Mon, 12 Mar 2001 11:54, Thomas Anderson wrote:
> > > Ok, I've tried time and time again to unsubscribe from php.net's
> > > mailing list unisubscribe instructions but it doesn't work. So how do I
> > > get off the list?

I suppose you must already have tried sending mail to
[EMAIL PROTECTED] by now.

Just one small point: is the email address from which you send off your
unsubscription request the one at which you receive mail from this list?

Another point to consider: it may be that you are subscribed to the list using
a redirecting email address. If that is the case, you'll have to send your
unsubscription email from that address. Could you check that up?

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] IE 5.5,authentication,PHP sessions: IE never stops running?

2001-03-04 Thread Harshdeep S Jawanda

Hi,

Ken wrote:

> I'm experiencing strange behavior with my user authentication scheme in my PHP app, 
>with users using IE 5.5 (PC and Mac).
>
> I am using browser authentication (WWW-Authenticate and 401 headers), "no cache" 
>headers, and PHP 4 sessions.
>
> I am finding that even when the user totally quits IE, if he then restarts IE, one 
>or both (haven't isolated for sure yet) of the following happen:
>
> - The browser still knows the user and password, and so will send it to the server 
>upon an authentication request under the same realm, without prompting the user.  
>(The user does NOT have "save this password" checked on the user/password prompt when 
>it first comes up.)
> - The session is still active.  A call to session_start() returns the pre-existing 
>session, instead of getting a new one.

Yes, this is a problem with IE. A lot depends on how IE is configured and exactly what 
shortcut users are using to start IE.

In IE's Tools > Internet Options > Advanced tab, make sure that the "Launch browser 
windows in separate processes" option is checked.

DO NOT use Ctrl + N to start up a new IE window - that way users will not get prompted 
for passwords.

Using any other shortcut to start IE should make it prompt for password.

All of the above is based on my experience with IE 5.0 but should be equally 
applicable to IE 5.5.

--
Regards,
Harshdeep Singh Jawanda.




-- 
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] Munging hidden/form variables

2001-03-02 Thread Harshdeep S Jawanda

Hi,

How about the following:

  1. Assign a session id to the form every time you generate it.
  2. Maintain that session id on the server side in a sort of cache for a
 specific amount of time (say, T) only. Time-out and delete session id
 entries that haven't been used within time period T.
  3. Have the form page refresh itself every T minutes/seconds etc. (for the
 convenience[1] of a genuine user).
  4. Ensure that a form with a particular session id can be submitted only
 once.
   1. Deleting the session id from the session id cache the first time a
  form is submitted should ensure this. This would lead to the concept
  of "using up" or "consuming" a session id.
  5. Don't process any form that doesn't have a corresponding valid session id
 stored in the session id cache.

While the approach I have outlined above will be susceptible to eavesdropping
(session ids can be sniffed out), that can easily be taken care of by sending
out the form over an HTTPS session.

Of course, if the attacker sets up a robot to request forms from the actual
server and then keeps on submitting spurious data, you're in trouble. There's
very little that can be done against an attack of this sort. You could perhaps
try to keep track of the time difference between the serving of the form and
its submission. This too, is open to subversion.

Please do point out any loopholes you find in the approach mentioned above.



[1]

 If a "genuine" user stops to do something else after partially
 filling out the form, then this setup could become a nuisance.

"Boget, Chris" wrote:

> Well, this was part of what I was going to do.  I was going to check
> to see if the request method was post and if the referer was from
> our host (not just the form/page).  If all that was true, then process
> the form.  If not, don't.
> However, I know that the $HTTP_REFERER variable is not at all
> reliable.  On that note, what browsers/versions would not send this
> information for Apache/PHP to set?  I know it is because of the browser
> that the client is using that this variable is unreliable.  But what those
> browsers/versions are, I don't know and am hoping someone can
> answer.
>
> Chris

--
Regards,
Harshdeep Singh Jawanda.

~~~
Member of Technical Staff, [O]+91-020-5676700 X-474
Persistent Systems Pvt. Ltd.,  [R]+91-020-5890053
[EMAIL PROTECTED]   [EMAIL PROTECTED]
~~~



-- 
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] Bitwise solution?

2001-03-01 Thread Harshdeep S Jawanda

Hi,

"Boget, Chris" wrote:

> I have 2 values.  The first is a constant while the second is not.

Is the first value a numerical value (real/integer?) or a string value?

If it is numerical, then one of the things you could do for using a
numerical value of (say) less than 100 could be:

$finalVar = ($var2 * 10) + $var2;

This is one of the simplest things you could do and meant only as a
rough example. A faster way would be to right-shift by 4 (if that can be
done in PHP) instead of multiplying by 10. This well essentially
multiply the number by 16.

I am relatively new to PHP, so the syntax I have used may not be
correct. Sorry about that.

Does this come anywhere close to what you would like to do?

--
Regards,
Harshdeep Singh Jawanda.



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

2001-03-01 Thread Harshdeep S Jawanda


Marcos wrote:

> index.php
> include ('info.html)

I think

 readfile($inputFileName);

would be a better option.

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] A small Q

2001-02-28 Thread Harshdeep S Jawanda

Hi,

Does the extension of files that are require()-d or include()-d in PHP
have to be ".inc"? Can it be ".php"?

All examples seem to show this extension as ".inc". Could there be any
problems if the extension is kept ".php"?

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] Newbie: why do I get this error?

2001-02-26 Thread Harshdeep S Jawanda

Hi,

Steve Edberg wrote:

> In your HTMLTable() function, use
>
> $this->attributes[] = array("border", "0");
> $this->attributes[] = array("cellpadding", "0");
>
> otherwise, PHP thinks $attributes is a variable local to that
> function, rather that a class variable.

Yes, that did the trick :-) - thank you!

--
Regards,
Harshdeep Singh Jawanda.



-- 
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] Newbie: why do I get this error?

2001-02-26 Thread Harshdeep S Jawanda


Hi all,

I changed

> function HTMLTable() {
>   $attributes[] = array("border", "0");
>   $attributes[] = array("cellpadding", "0");
>   // and some other things
> }

to

$attributes = array(array("border", "0"),
array("cellpadding", "0"));

but am still getting the same error.

What am I doing wrong here?

-- 
Regards,
Harshdeep Singh Jawanda.


-- 
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] Newbie: why do I get this error?

2001-02-26 Thread Harshdeep S Jawanda


Hello everybody,

I am a newbie, so please help me out with my rather basic question.

Please take a look at the following code snippet:

  class HTMLTable extends HTMLElement {
var $attributes;

function HTMLTable() {
  $attributes[] = array("border", "0");
  $attributes[] = array("cellpadding", "0");
  // and some other things
}

function emit() {
  // I get an error on this line
  $arrLength = count($this->attributes[1]);
}
  }

On the line indicated above, I get the error: "Warning: Undefined
property: attributes in html_base_classes.inc on line "

Can anybody give me a clue as to why this is happening?

-- 
Regards,
Harshdeep Singh Jawanda.


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