Re: [PHP] Loading a File into Variable - How??

2002-07-18 Thread Alberto Serra

ðÒÉ×ÅÔ!

Monty wrote:
> But it returns nothing. If I use readfile() the file contents is displayed,
> but, what I really want to do is store it in a string variable, not output
> it directly. How can I do this?

Look 4 implode() in the function list

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Cookies - good or bad???

2002-07-18 Thread Alberto Serra

ðÒÉ×ÅÔ!

Analysis & Solutions wrote:

> What increased cost?  If someone does the right thing in the first place,
> there's no cost.  The developers are either gettting paid to develop
> something that works right in the first place or they're getting paid to
> develop something that doesn't.

LOL, we are all but prostitutes, my dear :) we get paid to do exactly 
what the customer wants and *how* he wants it to be done. As for myself 
there are *many* of my customers choices that I would not use on a site 
of mine, but once I have written them a formal letter saying why I 
suggest doing something else in instead and have got a formal receipt I 
feel no longer interested in whatever they decide. I am only interested 
in another sort of *how*, that is *howmuch* :)

> Let's use your Iframes example.  My client was using them.  I replaced 
> such with proper layout for local content and importing remote content 
> through implode('', file()).  How does that cost more?

Yes, since you have to replace something that is already in place. It 
means you spend mantime to do it. Besides, they love iframes, so let's 
give them iframes. All they want is a scrolling bar *within* a fixed 
graphical frame, and only an iframe can do that.

> Anyway, cutting out potential long term revenue by alienating potential 
> customers is a bad business decision.

A one year long log shown that we are talking about 0.2% of their 
potential audience (and we include *my* verifications, which amounts to 
half of the events). Such decisions are not taken just like that. They 
watched the data and decided that 0.2% isn't worth a dime (and a minute) 
of theirs. It's their right to decide it.

Site targets a very specific audience (that is, the dental market). I 
don't think many a dentist will surf on Lynx, personally. And dentists 
just love to show their money, so I cannot think of a dentist using 
Netscape 4 and a 640x480 monitor.

I do (sometimes), you do, but we belong in a minority. Linguistic 
minorities make much more profit than browser minorities will ever do, 
simply because they make larger numbers. Having a site translated in 
french is making *much* more money than having it work on Lynx, believe 
me :) The good thing for them to do is have their site translated in as 
many languages as they can. That's from a profit-oriented point of view 
(mine too, since I sell language repositories as well) :) Europe is 
*not* america. Browsers here aren't a commercial issue, but local 
cultures are.

After all, if you and I are clever enough to use Lynx, we are also 
clever enough for us to download Mozilla and surf like standard people 
do, right? :)

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] spawning scripts to different graphical targets

2002-07-18 Thread Alberto Serra

ðÒÉ×ÅÔ!

Martin Clifford wrote:
> Click here to see the content

Looks like I was not clear in my question :) This way you just redirect 
*all* the outoput to another target. I need to output at more targets at 
the same time with one link. That is, since links cannot accept multiple 
targets, having my script spawn out a second script that will output to 
the second (third, and so on) target.

> The same applies to JavaScript.

Can't use Jscript at all in this context. The onload event on frame "A" 
would do fine, but what if jscript is not there? Besides, having this 
based an an Onload chain makes it quite slow and the user has the 
impression that only A is changing until the A load process is not over. 
Since b is almost always some sort of menu, this makes pages look weird 
for some seconds on slow connections (that is, one page has the "wrong" 
menu) I need something that will clear and reload both iframes at the 
same time with one single click (and no Jscript).

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

> 
>>>>Alberto Serra <[EMAIL PROTECTED]> 07/18/02 03:12PM >>>
>>>
> ??!
> 
> Is there a way I can decide where to target my output from server side?
> 
> suppose my page has two iframes
> 
> +---++---+
> ! A !! b !
> +---++---+
> 
> while executing a script that is called by A can I spawn another script 
> that will output to "b"? And no, I cant' use any Jscript, but I do know 
> from server side what my target names are (A and b, that is).
> 
> Bear in mind that A and b might be even different windows, but I'd more 
> than happy even if it worked with iframes on a single window.

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] spawning scripts to different graphical targets

2002-07-18 Thread Alberto Serra

ðÒÉ×ÅÔ!

Is there a way I can decide where to target my output from server side?

suppose my page has two iframes

+---++---+
! A !! b !
+---++---+

while executing a script that is called by A can I spawn another script 
that will output to "b"? And no, I cant' use any Jscript, but I do know 
from server side what my target names are (A and b, that is).

Bear in mind that A and b might be even different windows, but I'd more 
than happy even if it worked with iframes on a single window.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Cookies - good or bad???

2002-07-18 Thread Alberto Serra

ðÒÉ×ÅÔ!

PHPCoder wrote:
> application useless unless I code a "plan B" into my code; meaning I can 
> just as well NOT use cookies from the start...
> "catch 22 dejavu..."
> What are the general feeling out there amongst developers about the use 
> of cookies?
--snip--
> I gather that 
> the "alternative" url method is not 100% the same as the cookie method 
> inthat it doesn't work with IFRAMES etc. Leaving me to think that there 
> will potentially be people out there that will NOT be able to use the 
> application, that could lead to messy discussions between developer and 
> client...

We use but one cookie, for returning user recognition. That is, the sort 
of info your soft can survive without. As for passing values on the GET 
channel to iframes, we do it all the time and have never seen a single 
problem.

Problems with iframes are in that you consciously loose all users 
working on Netscape 4 (once you have 7 interrelated iframes on a window 
you cannot really expect to have 7 indipendent windows open *and* your 
site still usable. Lynx people are cut out too. If you want to support 
*everybody* you should work one one single page.

It's a customer's choice, obviously. Most customers do not give a damn 
about minorities (and so do not want to increase budgets to develop an 
alternate solution that will address a minor community).

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Good instruction for installing webserver using RPM andtar.gz files???

2002-07-18 Thread Alberto Serra

ðÒÉ×ÅÔ!

Scott Fletcher wrote:
> I'm pretty used to installing OpenSSL, Mod_SSL, Mcrypt, cURL, PHP and Apache
> with all of them in tar.gz files.  Now I'm experiementing it on the Linux
> and mySQL.  Never tried it on both Linux and mySQL before.

In my very limited Linux experience I found out that if you just ignore 
the RPMs and install the tarballs in instead everything works great. 
It's what I usually do.

If you cannot avoid using RPMs you might want to check for the --force 
option. But IMHO it's stupid to waste the solid experience you already have.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Classes vs. Functions

2002-07-16 Thread Alberto Serra

ðÒÉ×ÅÔ!

Martin Clifford wrote:
> Could someone please explain the difference between classes and functions
> and how to use a class. 

Well, that's a 1 billion $$ question. I don't think one can fully grasp 
that difference by reading an email. I strongly suggest you to buy 
yourself a book about OOP and have a go at it. That is, if you really 
care about knowing.

Whether you should like OOP or not is a religious matter, so I will not 
enter the field. OOP has its pluses and its minuses. It's a technique, 
not an ultimate truth, although it is often presented as such. And as 
any technique, it can do wonders and it can do plain bull**t when not 
properly used.

Nowadays 100% of my work is OOP based, but I worked some 15 years on 
functions and I cannot blame those who keep working that way. There are 
reasons for doing it and reason for not to do it. Get yourself a good 
clear book, then make a decision.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] I can't echo object variables

2002-07-16 Thread Alberto Serra

ðÒÉ×ÅÔ!

Michael Zornek wrote:
> We all know this works:
> 
> echo "$someVar";
> 
> However this does not:
> 
> echo "$db->field('name_long')";
> 
> I know this slight variation will make it work:
> 
> echo "" . $db->field('name_long');
> 
> But it's cumbersome .. Anyway to get the first way to work?
> 
> ~ Mike

In your example you try and execute a "method" within a quoted string. 
That would not work even with a traditional function call, AFAIK.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Crazy idea about detecting visitor's connection speed

2002-07-16 Thread Alberto Serra

ðÒÉ×ÅÔ!

[EMAIL PROTECTED] wrote:
>>I feel the idea is not accurate. My ip address (a static one from my 
>>isp) would remain the same if I went to ADSL from my current 
>>dial-up access.
>>
>>HTH
>>Chris
> 
> 
> Yes. And how about all corporate networks? If I'm accessing your site from
> our office I would get the low-speed version until you added our domainname
> to your list. Then what if I connect to our modem-pool from home... Then you
> wouldn't know I connected through a modem.
> 
> And my ISP at home doesn't have anything in their dns-names to differentiate
> adsl from dial-up users.
> Just my thoughts...
> Regards
> Joakim Andersson

Yes, although the problem of determining users' bandwidth *is* real, I 
guess solution is not to be found in whatver IP address processing you 
might do.

But you might consider sampling your actual communication, like sending 
the browser a sample document of fixed length that will execute some 
answer action from the browser. If you can time the lenght of this loop 
you can have a rought idea of what the user bandwidth is at the moment.

Besides, no matter what your bandwidth to your ISP is, connection 
performance is influenced by server bandwidth as well. So I guess the 
only reliable factor would be some *real* measure. Which is far from 
being absolute, as the network continuously varies its state. Probably 
you should repeat this step over and over in time to get some average 
valuable value, that you could then use (for example) to reprocess 
images on the fly and have output graphic resolution degrade with 
connection quality to keep speed close to constant (just an idea, not 
that I'll try to do that very soon) :).

Still your test must take the most minimal transmission load ever 
because it would add up and further lower the bandwidth of those who are 
sitting on a poor connection. Maybe you could add it to the banners. It 
could serve both as an "okay, printed" mark *and* a performance 
benchmark. Just have the timestamp recomputed on an invisible iframe (or 
have something sent along within the link the next time you load a 
banner, it depends on how quick you need an answer).

Won't work for *all* browsers, but say 90% of your users will give you 
the data you look for. You'll have a default strategy that appies when 
no answer comes, of course.

For those having banners sent out at regular intervals the average value 
would be reasonably close to the truth, and with little overhead. Of 
course you would need to take off the graphical load (size of the image) 
from your *packet* dimension, when computing the result.

Just my 2 kopeki :)

ðÏËÁ
áÌØÂÅÒÔÏ
óÅÒÒÁ


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] Tales of brave Ulysses?

2002-07-15 Thread Alberto Serra

ðÒÉ×ÅÔ!

I just got this. Not sure whether it's the stupidest commercial I ever 
seen or a new virus (as you see in the headers it stepped thru the check 
with no warnings), or just a joke.

I'd say it's a joke, as nobody would add anything clearly stating itself 
as "decrypt-password.exe", but I will not make any experiments on my box.

Looks like it didn't have any effect on a text-based email running on a 
Linux box, but those of you running Windows might be careful in opening 
any such stuff. I'll never have HTML enabled on email mainly because of 
this.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

---

 From - Mon Jul 15 12:20:25 2002
X-UIDL: 2828
X-Mozilla-Status: 0011
X-Mozilla-Status2: 
Return-Path: <[EMAIL PROTECTED]>
X-Sieve: cmu-sieve 2.0
Return-path: <[EMAIL PROTECTED]>
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Mon, 15 Jul 2002 07:54:27 +0300
Received: from avcheck by mail.gala.net with antivirus-scanned (Exim 
3.22 (GalaMail))
id 17TxsR-0001za-00
 for <[EMAIL PROTECTED]>; Mon, 15 Jul 2002 07:54:27 +0300
Received: from ns.gala.net ([194.183.188.131] helo=relay.gala.net)
by mail.gala.net with esmtp (Exim 3.22 (GalaMail))
id 17TxsQ-0001z6-00
 for <[EMAIL PROTECTED]>; Mon, 15 Jul 2002 07:54:26 +0300
Received: from public-smtp.telkom.net.id ([202.134.0.35] 
helo=out-mta2.plasa.com)
by relay.gala.net with esmtp (Exim 3.35 (GalaMail))
id 17TxSm-0004ON-00
 for <[EMAIL PROTECTED]>; Mon, 15 Jul 2002 07:27:58 +0300
Received: from smtp.telkom.co.id ([192.168.17.123])
by out-mta2.plasa.com with esmtp (Exim 4.02)
id 17TxMG-000tqP-00
for [EMAIL PROTECTED]; Mon, 15 Jul 2002 11:21:12 +0700
Received: from web3.telkom.co.id ([192.168.17.34] helo=AFRICA)
by smtp.telkom.co.id with smtp (Exim 4.02)
id 17TxFT-0005yx-00
for [EMAIL PROTECTED]; Mon, 15 Jul 2002 11:14:11 +0700
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Your password!
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary=L1db82sd319dm2ns0f4383dhG
Message-Id: <[EMAIL PROTECTED]>
Date: Mon, 15 Jul 2002 11:14:11 +0700
X-Envelope-To: [EMAIL PROTECTED]

--L1db82sd319dm2ns0f4383dhG
Content-Type: text/html;
Content-Transfer-Encoding: quoted-printable



ATTENTION!
You can access
very important
information by
this password
DO NOT SAVE
password to disk
use your mind
now press
cancel
(Charindra P)
cid:W8dqwq8q918213 height=3D0 width=3D0>

--L1db82sd319dm2ns0f4383dhG
Content-Type: audio/x-midi;
name=decrypt-password.exe
Content-Transfer-Encoding: base64
Content-ID: 

here it followed the decrypt-password.exe code...


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Does not work

2002-07-15 Thread Alberto Serra

ðÒÉ×ÅÔ!

Saci wrote:
> Who cares about privacy on my own company Intranet ?

Anyone not willing to show where they has been surfing on the net to any 
unexperienced bycomer. Youu may read the history, but you just have *no* 
warranty that it will not be cleared at runtime.

Since you have control on the machines (which you should have said at 
the beginning to have people help you) you'd be better off by having 
them configured to actually give the HTTP_referer string to Apache. It 
would be much more solid.

Besides, there *are* international laws concerning privacy at work, so I 
am not sure a determined employee could not getting your company into 
trouble because of your watching what he is doing.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] (Exact) Difference between -> and ::

2002-07-14 Thread Alberto Serra

ðÒÉ×ÅÔ!

Micha wrote:
> Hi,
> 
> I would like to know the exact difference between -> and ::.
> I know that I can use as class directcly by using :: but I still don't
> know the exact meaning
> So why do they use in Example 8 on
> http://www.php.net/source.php?url=/zend2_example.phps $this->id =
> self::$id++ and not self::id++ or $this->id++ ... ?
> 

Some OO languages (notably smalltalk does it) name a difference between 
Class methods (and variables) and instance variables. What is "class" 
can be used and executed even when lacking any actual instance of the 
class.

PHP has not fully implemented this model (we miss class variables, that 
is, a value that is common and general to all instances of a given 
class) but does have a bit of it.

So :: is mainly used to execute a method without needing to create an 
instance for it. If your class "Printer" has a method 
"changeCartridge()" you can use Printer::changeCartridge() without the 
need of any prior
$myPrinter = new Printer()

That is, you use a class as a common library. This has a limitation in 
that you cannot dinamically say $myclass::changeCartridge(), while you 
can say:

$a = "printer";
$p = new $a();
$p->changeCartridge();

The operator :: cannot address internal variables directly like -> does 
for the simple reason that no variable exists, in the absence of the 
instance. Which is why you declare $ signs. :: operator is also handy 
when you need to call an overriden method. By saying parent::myMethod() 
you call your parent's method, while $this->myMethod would execute the 
locally redeclared code.

-> operator can be read (maybe it must be read, I don't know) as 
"belongs to". So "this->a" means "the $a that belongs to $this" (the 
object in which you are executing class code). -> obviously only applies 
to single instances and not to classes.

Hope it was clear.


ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Does not work

2002-07-14 Thread Alberto Serra

ðÒÉ×ÅÔ!

Saci wrote:
> // HTTP_REFERER as a feature. In  short, it cannot really be trusted.
> 
> Anybody know how to do that using JAva history with PHP together , or any
> other methode that works and can be trusted.

Thank god no method can be trusted :) History even less the the 
referrer. Just think of the frequency at which people in their offices 
clear it to avoid bosses seeing where they surfed while they were 
supposed to work...

You'll never get a secure method, and if you do I'll personally report 
you to the authority for protection of privacy :) Marketing dotcoms 
would just love to do it, but fortunately it cannot be done :) Relax, 
you can live without knowing where some of the guys came from. Most 
won't mind telling you. But I just cleared my history immediately after 
reading your msg :) Pavlovian reaction ;)

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Newbie question

2002-07-13 Thread Alberto Serra

ðÒÉ×ÅÔ!

Cal Evans wrote:
> ++ is an incrementor. 

He may also consider the position of the inc/decrementor.
Example (note that the first element of an array has index 0):

$a = Array(1,2,3,4,5);
$i = 1;

executing

echo $a[++$i]
will output
3 2

echo $a[$i++]
will output
2 2

In both cases $i gets incremented, but the value used to access the 
array might be before or after the increment takes place, according to 
the incrementor (or decrementor, if you use --) position. A subtle, but 
often very handy nuance.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] objects in an array

2002-07-13 Thread Alberto Serra

ðÒÉ×ÅÔ!

Alexander Ross wrote:
> I have an array filled with objects.  Each object has a method called
> "display".
> 
> I have
> 
> $var = $arr[0];
> $var->display();
> 
> but I keep getting an error.  What am I doing wrong?
> (I do a print_r of the array immediately before this code and there is an
> object at array[0])

What classes? Which error? Can't say anything with the scarce info you 
gave in.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] hello the list

2002-07-13 Thread Alberto Serra

ðÒÉ×ÅÔ!

Nicolas GUILLOU wrote:

You may either write:

> echo "$cd_id";

or

> echo "size=1>$cd_compositeur";

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Inheritance

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

> if you have multilayered inheritance you may explicitely say which 
> anceStor class you are calling, like foo::print().

two typos in a few words are definitely too much, sorry :)

BTW, although almost all class specification is dynamic you cannot 
dynamically specify a class name in fron of the :: operator. A bug, most 
probably.

$myclass = 'foo';
$myclass::print();

will produce a weird parse error.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Inheritance

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

Jason White wrote:
> I have a class Foo{} which has a method Print().
> I have another class FooBar{} which extends Foo{} and has its own method
> Print().
> 
> How do I invoke Foo{}'s Print() method from within FooBar{} once its been
> overridden?

parent::print();

if you have multilayered inheritance you may explicitely say which 
ancemtor class you are calling, like foo:print().

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] checkboxes / form elements

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

Analysis & Solutions wrote:
> On Fri, Jul 12, 2002 at 10:59:00PM -0400, Blue Presley wrote:
> 
>>Hello.  I have a form that I would like to use checkboxes.
>>... snip ...
>>I've been told that if I want to manipulate each
>>one then I should use 'name=checkbox[]' and make an array out of it.  okay,
>>fine.  but how do i access them in my PHP script? I know I have to use the
>>$_POST[] array, but this creates a multidiminsional array, yes? do i access
>>it like $_POST[checkbox[1]]?? or $_POST[checkbox][1]??
> 
> 
> The latter.  But note, if a box isn't checked, it's not going to be 
> sent, so won't be in the array.
> 
>
> NV
> NH
> NJ
>
> 
> In this case $_POST['checkbox'][0] would be 33 and ...[1] would be 34.
> 
> Sometimes it's handy to identify the key upfront:
> 
>
> NV
> NH
> NJ
>
> 
> That would yield $_POST['checkbox']['34'] = 40.
> 
> A nice way to handle incomming checkboxes is this:
> 
>while ( list($Key, $Val) = each($checkbox) ) {
>   #  do what you need to do...
>   #  for example, show what was sent...
>   echo "$Key = $Val\n";
>}

Just one thing, as someone noted a week ago or so, you can't use the [] 
syntax *and* javascript. If you also need to process your checks from 
jscript side you shall resort to some older method and have your 
variables called like

 NV
 NV

then process it with variable variable names (the $$ syntax).

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Advice needed

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

Mike Tuller wrote:
> So I would have the progressive key inside the addvolume window? Can you
> explain how to go about doing this?

How you organize your HTML output should *never* interfere with the way 
you organize your data, they are two different things and must be kept 
well separated. In a perfect world design, process flow and datamodeling 
should be free to evolve without stepping into each other's way. It's 
obviously impossible to fully meet this condition in the real world, but 
one should always try and get as close to it as he can.

Just do this:

Think of your data as a temporary table, in which you have two keys:
1) the real key, whenever available (will be blank on the stuff you 
haven't written in the database yet)
2) a progressive key, assigned by your php scripts by some means

You just have the two keys constantly in your forms as hidden fields, so 
that at process time you can still tell which is which when it comes to 
relations, even if you do not have an already established relation 
system (which is the case on new data).

So:
you load your hdw components, they all have a db id already, so your 
dataset will look like this:

1) hdw 1, its real id, your own internal key (say 1), rest of the data
2) hdw 2, its real id, your own internal key (say 2), rest of the data
...

you add a new component and save the result on a temporary table, now 
your temporary dataset is:

1) hdw 1, its real id, your own internal key (say 1), rest of the data
2) hdw 2, its real id, your own internal key (say 2), rest of the data
3) hdw new, no real id, your own internal key (say 3), rest of the data
...

You add a new volume and stock the data on a second temporary table, 
which contains:

1) vol 1, no real id, your own hdw internal key (should be 3 since you 
are adding to the last new hdw), your own internal volume id (say 1), 
rest of the data

You can repeat this step all over as much as you want (like fully 
building up a number of new disks, volumes or whatever), and have it as 
multilayered as you want (it will just take as many temporary tables as 
are the real tables involved).

Once your user finally reviews his/her data (say you entered a totally 
new system, reviewed it and felt satisfied with it) he will have a 
"fire" button somewhere.

At this point your final script just takes the data off the temporary 
tables and uses them to build the real thing.

Notice that this way you also sort of implemented a transaction. Not a 
real one, since it will not protect you if your final script fails at 
runtime. Yet you can be sure no unconsistent data from unterminated 
sessions will ever enter your stable datamodel, and that's were 99.99% 
of the risk would come from.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] Librep (yes it's definitely OT)

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

Sorry, got no time to surf around for a Linux list, so please answer 
privately since this is totally OT.

I am running gnome on top of rh 7.1, since I upgraded to librep 0.15.1 
and sawfish 1.0.1 I need to reinstall librep once a week.

Apart from the annoying fact in itself, when rep goes astray it simply 
blocks everything (even ctrl-alt-bspace won't kill X anymore), so that I 
have to switch the power down and end up having to run fsck to repair my 
filesystem afterwards. Not a pleasant situation indeed.

Anyone can give me a suggestion about it? Any help would be appreciated, 
Ineed to finish my job and go on vacation, I can risk having to 
reinstall my machine from scratch at every step I take :(

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Advice needed

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

Mike Tuller wrote:
> The hardwareID is created in MySql when the information entered for the hardware is 
>submitted, which hasn't been done yet.

You don't need it immediately. Just have a progressive key (like 
1,2,3,4...) stored in a hidden field along with the new info you are 
getting. Once you'll process the final result you will substitute it 
with the values assigned by your DB engine. Sort of "temporary primary 
key", if you want :)

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] problem with cookies and some browsers

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

Andy wrote:
> I am wondering if there is a possiblity that some browsers like IE 5.1 do
> not accespt cookies by default. 

No, it's that they do not accept standards by default :) Try this and 
have M$ go to hell:

// send/refresh cookie
  $time = mktime()+ $lifeInDays*86400;
  $date = date("l, d-M-y H:i:s", ($time));
  header("Set-Cookie: YourCookie=YourValue; expires=$date GMT");

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] PHP and ORACLE

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

I hope you are not really living in the early 70's, are you?

Ricardo Fitzgerald wrote:
> Hi,
> 
> I started with PHP and MYSQL a while ago and now I've been involved in
> a huge database project with ORACLE. 

Have the Oracle box do most of it. Make sure that:
1) there is  a well defined API for external application (including your 
PHP client) to access data. This *must* written an paper and documented. 
No code writing prior to this.
2) all about referential integrity is done within Oracle
3) use triggers and SPs to enforce data consistency (handle with care, 
they load the db server if used unproperly)
4) find a good DBA to maintain the system (Oracle can degrade quite 
dramatically if not properly maintained)
5) interact very little with the DB, to avoid loading its server. (That 
is, call an SP, get the result set from a tmp table)
6) avoid locking as much as you can
7) Prey the current Oracle bugs are not too evil.
8) get ready to say good bye to your vacations.
9) ask for a paycheck raise

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Emulating Java Exceptions

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

Garland Foster wrote:
> Alberto,
> 
> I might have expressed the problem wrongly, if you have lets suposse you 
> have:
> $obj = new foo();
> $obj->some();
> And some might return an "exception" object.
> 
> The problem is that some may call a lot of other methods from foo and I 
> don't want to check if the return value of each method call is an 
> exception.
> 
> Example:
> 
> function some() {
>   $x = $this->other_method();
> }
> 
> If other_method produces an exception then I want the exception returned 
> directly to the "some" caller without the need to check in the "Some" 
> method if "other_method" returned a normal "x" or an exception object...

Well, *what* exactly you will do depends on your class architechture 
(which I don't know). But I suppose you want your exception to behave as 
an object, while parameters (and returned values) are mostly scalars.

So, you either
1) avoid using scalars at all and spend some time in implementing the 
base classes you need to emulate scalars (after that you can just do 
what you asked for as all types will be consistent and you are basically 
writing smalltalk code, and also performing like a sleeping polar bear 
accordingly). I'd never do that, personally.
2) create an "exception server" (as we do) to whom you delegate all 
exception management. When you create a new instance of *any* class of 
yours you pass it in the constructor a reference to this "exception 
server" and from then on you can have your exception solved by 
themselves, while your methods still do not break the chain and continue 
to return whatever they needed to return (that is, mostly quick scalars).

It's going to take you months of careful planning, though (as always 
when playing with classes) and 99% of what you do depends on what you 
really need. You probably will need to "register" your client ($obj in 
your example) on the server when you issue the call, so that client and 
server can talk on a peer-to-peer basis, but that again is an 
architecture dependant issue.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Final Year Computer Science Project involving PHP

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

Martin Clifford wrote:
> If completely developing a fully functional and optimized E-commerce site isn't good 
>enough, 
>I don't know what is.  I can understand how it may not necessarily be innovative 
>(though it could 
>have innovative features), but designing such a site would prove to anyone I know 
>that you have a 
>great knowledge of the language the site was created in.

The uni env tends to rate real life as "vulgar" :) I suggest you 
concentrate on demonstrating something more "cultural". It will be of no 
use in real life but it's going to get you good grades, which is what 
you mostly need at the moment, right?

Something like an automatic translator from Klingon to Elvish will do. I 
AM SERIOUS AND SOBER, keep reading. Just make sure your implemented 
versions of Klingon and Elvish have sufficiently *mad* grammars to allow 
some linguist to step in and join the project team. You may wanna check 
W3c docs about the two x-languages in question. They *do* exist.

At that point you'll be doing a cross-speciality work, none of your 
tuitors will have the skills required to judge the project without 
insulting a collegue and they will be all forced to give you guys good 
grades just to get rid of the problem ASAP.

If Klings and Elves won't do (which I doubt, since Tolkien is still 
a-la-page) you may wanna protect some linguistic minority in the 
Amazonas or in the deepest parts of the central Siberian plains... Won't 
keep you from killing them by printing your work on the paper made with 
their trees, but it will look s politically correct ;)

You think I'm joking? I am not. But if you miss the guts to go straight 
and cheat them, then make a Linux online updater that will work. What? 
You like Klingon better? I had no doubts :)

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Emulating Java Exceptions

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

Garland Foster wrote:
> Hi All,
> 
> I'm porting Java Code to PHP, my question is: What is the best approach 
> to emulate Java exceptions in PHP4? (I know ZE2 adds exceptions but I 
> can't wait).

If the exceptions you have to manage are code generated at runtime you 
actually may simply write your own manager. Have a root class  with a 
method called

Function exception($yourparms) {
   treat exception here;
}

Game over, since everybody inherits from your root class you can manage 
whatever you want your own way. It's objects, so work in OO and forget 
about java lingo.

Mind you, it won't manage a parse error, that's for sure.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] Weird :: behaviour

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!



This will not work. It will produce in instead a:
parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting ',' or ';'

Funnily enough, the NEKUDOTA part looks slavian (sort of "nowhereToGo", 
not russian, maybe it's polish), so I suspect it means it cannot resolve 
a parametrized call. It might be a coincidence.

Everything else *does* support calling class methods by dynamically 
referencing a class name. For those working with plugins this a 
*serious* minus. Right now I found a way not to need the call, but 
please let me know if you ever met this thing.

For those who aren't into OOPHP the :: operator is supposed to execute a 
function call on a class, instead of doing it on an instance. So you do 
not need to create an instance and can use a class as a normal library 
when you need to do so. But this way your plugin classes cannot be used 
as libraries.

Static calls like a::test() or b::test() will work as expected.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] mysql question

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!
John Holmes wrote:
> Gesundheit
>>*if* that was on Oracle *and* the table was big you'd notice that your
>>performance goes down. Don't ask me why. And I never checked it on
>>MySql. But watch out for betweens. Check them.
> 
> Yes, good point. I don't know if it matters in MySQL either, but always
> test your queries and see which is faster. EXPLAIN may come in handy
> here. I don't see why it would be different, it seems like both would be
> interpreted the same...

Most PHP apps underlying storage simply does not reach the dimensions 
needed for the difference to show up (that is, when rows come in hundred 
of thousands and you have a fairly good normalized data structure, say 
at least in the third form). Yest if you don't normalize data you might 
see it degrade when you are just in the pale realm of thousands.

For what I could make out of it myself, it has to do with the fact that 
an SQL macro instruction (if you pardon the use of the "macro" term in 
this context) needs to be translated to some set of "and...or" clauses 
before the engine can actually execute it. Some engine does the 
translation on a "per row" basis, which is why they can end-up killing 
your performance.

That's just my own fantasy about it, no such assertion is in *any* docs 
that I saw. But if it was done just once the size of your query set 
should be irrilevant to performance, methinks.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] how to know upload progress status

2002-07-12 Thread Alberto Serra

ðÒÉ×ÅÔ!

John Holmes wrote:
> Not possible with HTTP, as far as I know. The file is simply sent,
> there's no communication back and forth.
> 
> ---John Holmes...

That's from within a single script. But it becvomes possible if you have 
a page like this

+---+
! +---+ !
!  main   ! c ! !
! +---+ !
+---+

where main is executing the upload and c runs by metarefresh a second 
script that watches how the temp file is growing on the server. So the 
guy is right in his second try to it.

Sadly the $_FILES variables will be available only after the upload is 
completed, so in order to have that up and running he will also need to:

1) create a uniquely identified dir to which only that user upload will 
be sent (that's done when dynamically creating the upload form)
2) pass the dir name along to the monitoring script.
3) clear the directory on upload successful completion
4) periodically clear the amount of temporary dirs that have remained on 
the server as a result for process failures.

If all you do is managing file uploads all the time you might want to 
limit your number of concurrent uploads by creating a pool of TMP dirs 
that you will share among users. When they are all got your users have 
to wait, but you don't freak out because of an exponential growth of 
abandoned dirs.

It *is* complicated. But if you really have to do it... I wish you not 
to need it, anyway.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Re: cookie ?

2002-07-11 Thread Alberto Serra

ðÒÉ×ÅÔ!

> The stuff about using time/directory is an IE bug.
> You can supply *BOTH* time and directory, but not just time.
> This is not the way the Cookie spec reads, but Microsoft never reads specs
> properly, much less implements them properly, mostly on purpose.

Not sure I am saying the truth but I'd say Mozilla 1.1 alpha does the 
same. I stepped thru it while I was (am) in a hurry, so I just sent the 
headers in instead and everything worked out. But setcookie() 
appearantly did not.

Maybe someone else did investigate a bit more. Maybe it was my code 
being broken. It's just a suspect.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Development Tools

2002-07-11 Thread Alberto Serra

ðÒÉ×ÅÔ!

Martin Clifford wrote:
> I usually always have my content dynamically generated by functions, 
 >or displayed in include files.  I'm not a  fan of cluttering up my 
apps with content.

me neither. You can mix up code and content only as long as you work 
alone. But in most project (even very small ones) design resources and 
coding resources are not the same person, as design is largely a matter 
of customer taste, while proper coding is not.

Sometimes you have two people that are *far* from each other. Sometimes 
they do not even have a common language. So the less they need to 
interact, the better.

Besides, if the two things are well separeted you can port an 
application from one design to another with little effort. Sort of 
changing "skin" to a site. But you are attempting suicide when you do 
that on a site that mixes the two components.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] MAIL FROM NO ONE

2002-07-11 Thread Alberto Serra

Chris Knipe wrote:
> On Thu, Jul 11, 2002 at 02:29:11PM +0200, vins wrote:
> Allot of SMTP servers does quite a bit of sanity checking on the headers
> received from an email message.  

Not in the west. They are too busy allowing in the commercial spam they 
are sending themselves. Otherwise you'd never be reading mail from a 
server called Lena.tut, as you are right now. And thank god they are 
not, since our ISP as a *lousy* SMTP service and I have to resort to 
this to make sure I can keep on working.

What I do not understand is why you would need to build anything to bomb 
the guy. Just make sure you get an ISP that cannot track the phisical 
call (here many are still on protostoric pulse stations, you can find 
that somewhere at your place too, pretty sure).

Then invent yourself a server name and run straight from sendmail, over. 
  All you need is a temporary account from a dial-up. You are not 
robbing a bank, so nobody will look for you (your abuse.somewhere.co.za 
will say they never knew anybody, just like they said from norway and 
they will keep on drinking their beers).

Personally I would not be cruel to anyone that has been already that 
mistreated by Mother Nature. Let him live with himself, it's the worst 
you can do to him. We got rid of Erik, but he never will :) *that* makes 
me happy.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] mysql question

2002-07-11 Thread Alberto Serra

ðÒÉ×ÅÔ!

Alexander Ross wrote:
> I realize this isn't a php question, but I figured that someone here knows
> of a good mysql newsgroup and in the mean time someone here probaby knows
> the answer to my question.
> 
> Can I set up a query like this:
> 
> select * from table where start_shot <= $current_shot and end_shot >=
> $current_shot
> 
> note everything will be of type INT

Yes, you can, providing that those fields would exist and be of a 
comparable type.
Just one question, wasn't it quicker to just give it a try? :)

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Re: header()

2002-07-11 Thread Alberto Serra

ðÒÉ×ÅÔ!

> Richard Lynch wrote:
>>
>> You can't upgrade somebody's stupid IE browser to Mozilla just by sending
>> them a new User-Agent header, no matter how attractive a solution it 
>> might seem :-)

LOL sounds like having a supermodel pic sticked on the face of any girl 
you don't like :) Or boy, for what it matters :) Just make sure your 
glue holds properly :) Reality is not *that* virtual, yet...

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] mysql question

2002-07-11 Thread Alberto Serra

ðÒÉ×ÅÔ!

1LT John W. Holmes wrote:
> How about
> 
> SELECT * FROM table WHERE $current_shot BETWEEN start_shot AND end_shot

*if* that was on Oracle *and* the table was big you'd notice that your 
performance goes down. Don't ask me why. And I never checked it on 
MySql. But watch out for betweens. Check them.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Dumb session / cookie / password questions

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

Martin Clifford wrote:
> Firstly, you should ALWAYS use an encryption algorithm for passwords. 
 > For my site, I used md5() and match with that.
 > That way, even if someone does get a hold of the encrypted password, 
it's not in their best interest
> (or maybe it is, if they're bored) to crack it.

NO need for decryption. I can just present it "as is" and your soft's 
gonna drink it (and may burp afterwards) :)

 > Putting that at the top of the page would check to see if any
 > information was sent to the page from the $_GET superglobal, and if it
 > was, reload the page without any URL extensions.

Using Register globals off would do the same without any code add-on. 
And it *does* work, as many a user lately found out, in anguish for 
his/her vanished parameters/sessions/cookies/umbrellas and girlfriends 
:) Yet it cannot block your MD5 stuff from being presented back to you 
on the right channel (not so difficult to guess, it's three channels in 
all).

If you don't hold CC numbers, military stuff, bank transactions or mafia 
secrets I can hardly see any need for paranoia (in case you do MD5ing is 
a *poor* solution). Having your CC processed by a secure third party 
will cost you much less than implementing a 90% secure system from 
scratch. When you have nothing to hide you also have nothing to fear :)

Think about it. Most users exchange their user/passwords in emails. 
"Hey! Wanna see what discount prices I got from that site, dude? Look, 
user Mickey pass MOuse (capital O, mind you, I love security, ya know). 
And don't tell anyone, okay?"

Users do it all the time. And sites, too. How many automated mails 
containing right the passwords you are trying to protect you'll be 
forced to send along the net for the sake of "customer satisfaction"?

Most of those "forgot your password? Tell us what email you gave us, 
we'll do the rest!" will be received on public email servers, because 
nobody in his mind would send a commercial site his real email (I 
canceled my first yahoo account when I was already receiving some 50 
commercials a day, mostly about penis enlargement and marijuana 
replacers). Those emails will remain on the account for ages, just in 
case the user forgot the pass again.

Would you rate yahoo as a "secure" site? Any time I walk into a computer 
club while I'm on vacation I end up into somebody else's yahoo/ICQ or 
whatever account... I am usually trying to log out from the session that 
was left open. Maybe because I am too stupid to understand yahoo's 
security policy LOL

That was just for the sake of throwing my 2 kopeki in before going to 
sleep (we are in no euro/dollar/sterling area either :)

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] SQL field problem

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

[EMAIL PROTECTED] wrote:
> You see that all entries are not unique.So i want to list as output all entries but 
>only once.If the word "Dark" is in the table 6 times php should output dark only 1 
>time. 
> How should i solve this problem ?

select distinct

and RTFM

:)

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Development Tools

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

gEdit rulez! :) well, I seldom make files any bigger than a couple of 
scrolls, so... much depends on your programming style. And habits.
But I am with Uwe. Nothing like a plain text editor.

Maybe I am just too old to understand novelty LOL

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×
@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




php-general@lists.php.net

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

when your instances contain references and you prepare ther references 
in the constructor, you should remember to call the *new* function with 
an &.

Otherwise all you get is a copy, and all the references you prepared are 
invalid.

use *new and all you trouble vanishes away :)

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] strange stuff in a class

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

>  
>   class test {
> function test() {
>   $globals['test2'] = &$this;
> }
>   }
> 
>   $test1 = new test();
> 
> ?>
> 
> The problem hier is that $globals['test2'] is a copy of $globals['test1'] not a 
> references.

It is, but you are looking in the wrong direction. the copy is in test1, 
test2 holds the reference.

This should work:


 >   class test {
 > function &test() {
 >   $globals['test2'] = &$this;
 > }
 >   }
 >
 >   $test1 = new test();
 >
 > ?>

To output a reference instead of a copy a function *must* be declared 
with an &. Not sure whether you might also need it here:

$test1 = new &test();

check it out

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] cookie ?

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

[EMAIL PROTECTED] wrote:
> hi all,
> (yes it's me again)
> i've got an other problem.
> i've got an login system, and it has to put an cookie, but it seems he 
> doesn't do it.

1) users may block your cookie.
2) browsers (they often do) may not respond properly to a setcookie()
command when it specifies more than just name and value for the
cookie (that is, when you set an expiration date or limit your
cookie's visibility scope to a subdirectory)

If you have problem 1 there's nothing you can do. Change strategy. No 
user will be able to log to your system if they don't accept cookies.

If that happens to you when debugging and you know your browser *does* 
accept cookies, then try and send the cookie in the headers instead of 
using setcookie()

Like this:

// send/refresh cookie
$time = mktime()+ YourCookieLifeTimeInDays*86400;
$date = date("l, d-M-y H:i:s", ($time));
header("Set-Cookie: yourCookieName=Y; expires=$date GMT");

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×
@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] strange php output

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

Calvin Spealman wrote:
>  if (!$page=="datetime") // Not using index.php
> {
> include("header.php");
> }
> ?>
> 
> this code works when datetime.php is included by index.php, but on its 
> own the script just outputs .  Even ignoring 
> the xhtml code outside the php code in the file.  its like the entire 
> file is ignored.  i really have no clue why.  anyone else have one?

Before using a variable (in a comparison or wherever) you should make 
sure it *does* exist.

try

if (isset($page) && !($page=="datetime")) // Not using index.php
{
  include("header.php");
}

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] Operator missing?

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

in PHP we have a set of comparison operators going like

$a == $b (has same value)
$a === $b (has same value and type)

shouldn't we have also something like
$a =&= $b (is same instance)?

Maybe we already have it and I just don't know about it. Is that so?
Because of the copy/reference mechanism it would really be helpful in 
order to check one's work in referencing objects.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Generate a file

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

Phillip S. Baker wrote:
> Now if that is cool, how would I get the data into the downloaded.xls 
> file to have this work?

1) Save the data as a comma-separated list (pap.data.csv).
2) make an excel macro that will load it into a preexisting sheet and 
treat it
3) put the macro as the auto starter of the sheet.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] (OT) Our Spam Friend

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

Brian McGarvie wrote:
> we should make a script that constantly emails him single characters and all of us 
>run it in a back ground process ;)

He is lucky we have all to much to do in our lives anyway :) But if 
anyone has got spare time... the guy's mailbox (unlike most russian 
public mail servers) *will* accept mail from a dial-up SMTP server 
having f**k.you (or whatever, just take the ** off and replace with 
proper coding) as an host name. I just happened to check ;)

Not that I was willing to. But we are having SMTP problems so I just 
send the mail from the SMTP rauuning on the box I sit at while the 
trouble gets solved.

Western addresses will get it (including our friend's address and this 
list) while my own address returns me the mail saying that "no, you 
cannot just login from a dial-up and pretend you were an internet 
server. Now your server is blacklisted" LOL

My 2 kopeki (cents). :)

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

2002-07-09 Thread Alberto Serra

ðÒÉ×ÅÔ!

Daniel Negron/KBE wrote:
> Is this retaliation ?

People are so stupid they cannot even understand that we will simply 
filter him out of our mail right to trash bin :) I'm just sorry Mozilla 
is missing an autoresponder. I would have him mailed back with some 
HUUGE .doc any time he writes (after automatically putting his stuff 
right on the trash bin, which I already do).

And nothing would be in the doc apart from infinite copies of the 
instruction for unsubscribing from the list :) Up to a meg or so :)

But okay, let the hengy-baby play :) He cannot do any harm LOLOL

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] $_REQUEST???

2002-07-09 Thread Alberto Serra

ðÒÉ×ÅÔ!

Patrick Teague wrote:
> Hello,
> 
> Considering all of this...  Would it be better simply to turn
> register_globals = On if the vast majority of the stuff you have on your
> site is simple search engine type stuff and/or GET variables?

Well, such stuff needs NOT security, nedless to say. But *any* site 
needs to work properly. Besides, having the register_globals off does 
not require gigantic mental efforts to get your values.

Personally I think that a register_globals off environment is educative, 
in that it forces you to think about the way data gets passed a bit more 
than usually. And an aware programmer is better then one who just 
"believes" in the fact that his next script is gonna get the stuff it 
needs.

But whether you have your register_globals on or off variable content 
validation is still up to your own code, and that's where 99% of 
security lies. Blocking the globals just bloks anyone from poisoning an 
*internal* variable of your scripts, legally passed values must be 
validated as they where before.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Script File Permissions

2002-07-09 Thread Alberto Serra

ðÒÉ×ÅÔ!

Chris Earle wrote:
> Thank you for the reply (I don't speak or read Russian if that's what that
> other stuff is).  
It is, but it's nothing more than "hello" and my signature, so you did 
not miss any basic content :)

> I forgot to mention that the server is a Win2k server with
> IIS 5 running.  Obviously I'm not the server admin (otherwise I would be
> using Apache).
Dunno. Never had that running myself. BUt as far as I can remember Ms 
security should be directory based. So the guy actually *might* allow 
you writing somewhere if you can convince him that it would show how 
clever he is ;)

> I hope that I can get permissions, but I bet you're right.  Probably just
> have to create a database, which I planned on doing (and know how to).  I
> really did want to use XML though, oh well.

Besides, sooner or later you might need to just log events out to a flat 
file, right?

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] PHP vs. Java

2002-07-09 Thread Alberto Serra

ðÒÉ×ÅÔ!

IMHO java is to be avoided. fullstop. Still, it might be unavoidable 
from a commercial point of view. In that case, you should avoid being 
involved in the project and let the marketing dept have their fun on 
their own.

There's a lot of pleasantly paid jobs that won't kill your nerves on 
this planet. Whatever you say now *you* will be responsible for it. So 
keep away from suicidal attempts.

Java *may* properly work (but it will never work half as fast as PHP 
will) but you are not going to find an adequate number of skilled 
resources to make that happen.

And when your unproper underpaid resources will turn your java soup into 
a slw boiling mess, guess who will pay for that? Got a mirror home? :)

I saw a project based on IBM San Francisco last ONE YEAR before being 
thrown out of the window (along with its manager). The best result of 
the project was in that it could query a table of 500 rows in only... 45 
seconds. New olympic record.

And no, I was not the manager. My spider sense told me to keep well away 
from it :)

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Cookies

2002-07-09 Thread Alberto Serra

ðÒÉ×ÅÔ!

Varsha Agarwal wrote:
> Hi,
> Can anyone tell me what a cookie is in simple language
> with an example??
> -Varsha

A web connection is made by two machines:
  1) the server, where the site is
  2) the client, that is, the machine at which sits the user

Once the client sends a request for a web page (an URL, in tech 
language) some sort of program gets executed on the server. At the very 
least a program called "Web Server" will receive the request, look for a 
file that has that name and send it back to the client.

But usually the file does not end in .html, so something more gets 
executed, like PHP.

Well, this new thing being executed may need to write data somewhere, 
and it usually does write it in a database (that is, a set of tables). 
When it does so, it writes data on the server, that is, the very same 
machine it is running on.

But for some reasons it is sometimes useful to write data on the remote 
machine, that is, the client. This process of writing data on the client 
machine is called "sending a cookie".

The client machine may actually accept or refuse doing so, the server 
cannot know that, so no important data should ever be written in a 
cookie, as it may not get written.

Now suppose I (the program coder) need to now that you like to receive 
pages with lots of flowers and hate to receive pages with lots of 
machine code diagrams. I put a menu on my page and let you choose, 
right? Only it would be nice, if the next time you come to visit the 
site you were immediately presented the pages you like.

But, unfortunately, I have no way to stock this information on the 
server, because I cannot associate it with you in anyway (thank god, 
otherwise bye bye privacy).

So what I do is writing on a cookie that you like flower pages and hate 
machine code diagrams.

Next time the client machine (your comp) will connect to my site it will 
first look in its cookies list. It will find that there is a cookie for 
this particular site and send it to the server along with the request. 
Bingo! now I know you hate machine code diagrams.

I oversimplified, of course, cookies have much more than just this. Thay 
have expiration dates, limits on directory tree validity and so on, but 
that's the root of it.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] passing objects in url

2002-07-09 Thread Alberto Serra

ðÒÉ×ÅÔ!

Marek Kilimajer wrote:
> This won't work, you must register it within a session, just remember to 
> declare the class befor session_start()

This can be pretty risky if your object contains references to external 
objects. Works okay for insulated instances, though. Yet I would suggest 
not trusting sessions with objects.

You never know how your class is going to evolve on time and you never 
know how sessions are going to evolve on time either (just think of the 
register globals thingy).

I'd rather map object attributes to a good old table of mine and be sure 
I can build it back whenever I want to, no matter what surprises lie 
ahead on technology boulevard. Well, almost sure :)

ÐÏËÁ
áÌØÂÅÒÔÏ


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] passing objects in url

2002-07-09 Thread Alberto Serra

ðÒÉ×ÅÔ!

Alexander Ross wrote:
> If $this is an object, can I have the following link?
> 
> Process
> 
> Will the URL become too long?  Will teh info get passed correctly? thanks
> 

99% you are right, it will definitely be too long for a GET. Besides, 
before writing the process_this.php?this=$this thing your *$this* should 
be serialized. Watch the docs for it.

Most probably you have access to some database, so you can just save 
your serialized version to a table (the type depends on the size of your 
serialized object) and just pass a pointer to the row for the process 
script to retrieve and unserialize the object back to normal life.

Just one more thing: if your object contains any reference they will 
definitely become invalid, methinks. And I would never do object 
serializing if I expected performance to be there. But this really 
depends on the nature of your object, so handle the suggestion with 
care, it's just way too generic.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Script File Permissions

2002-07-09 Thread Alberto Serra

ðÒÉ×ÅÔ!

Chris Earle wrote:
> So my question is this: how do I get my script to have permissions to write
> or append to any file?

Ask your sysadmin (I can almost bet the answer will be NO, I have to 
tell you).

Apache should be running on your system as user nobody, and most 
probably does NOT have the permission to write anything at all (apart 
from file uploads).

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] "Invalid content" using FastTemplates

2002-07-09 Thread Alberto Serra


ðÒÉ×ÅÔ!

PeterV wrote:
>> Warning:  Invalid content of \{\} in 
>> /home/httpd/includes/fasttemplate.class.php on line 199

You are on windows, aren't you? I remember seeing such a thing some two 
years ago. It vanished after php reinstallation. After that I did the 
right thing and had microsoft vanish from my life forever.

Anyway, it was something in the ereg that gets the symbols to substitute 
in the template. You should look there. But before you turn your HTML 
templates upside down do try and reinstall PHP. As far as I can remember 
everything worked by taking away the {} containers around the symbol 
(and in the ereg expression). Which is to say you should go thru 
thousands of HTML fragments. But really, it's been a long time.

As for version problems, I use FastTemplate since ages and never saw 
anything like that on a LinuxBox. Right now I am running the last 
version on the machine I am writing from. And FastTemplate runs with no 
problems.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Stupid install ???

2002-07-09 Thread Alberto Serra

ðÒÉ×ÅÔ!

Hopp3r wrote:
> I have installed PHP4.2.1 and when I open a browser to look at a test php
> page? all I see is the php code, not the output of phpinfo(). I know it is
> something small that I have overlooked. Can someone help? Please???
> 

Yes, you forgot reading the instructions :) You are missing these lines:

 AddType application/x-httpd-php .php
 AddType application/x-httpd-php .phtml
 AddType application/x-httpd-php .php3
 AddType application/x-httpd-php-source .phps

in your /usr/local/apache/conf/httpd.conf file

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] Somehone having a problem to write to the list

2002-07-09 Thread Alberto Serra

To the *list* *maintainers*: this guy says he is registered but cannot 
write to the list. So he wrote me in instead.

úÄÒÁ×Ï! (it's like that, right?)

Djurovski Dejan wrote:
> $aDBLink=@mysql_connect("$host", "$user", "$password");
> mysql_select_db("$db", $aDBLink);

you might want to take the @ sign off the connection step to get the 
error message. Looks like you did not connect at all but got no warning 
because you told your function to keep shut.

At that point you cannot query anything, but you cannot know about it.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Re: mbstring: Japanese conversion not working for me

2002-07-09 Thread Alberto Serra

ðÒÉ×ÅÔ!

Jean-Christian Imbeault wrote:
> I tried EUC-JP and ISO-2022-JPand neither worked. Ah well ... so much 
> for a nice idea quick hack to displaying multiple charsets at once.

They should. I checked out w3c.org at that and it definitely should. No 
exception for japanese mentioned anywhere.

The two parameters actually open a local exception from the




headers. And SPAN sections can be nested. At least, so the standard goes.

Besides, while checking the docs I stepped onto something really funny 
(to say the very least). I quote from

http://www.htmlcompendium.org/attributes-list/attributes-notes/lang.htm

---
The argument to the "lang=" attribute is made up of two parts; a primary 
code and an optional subcode (separated by a "-" hyphen). The primary 
code is a two character language code.
i.e.

The subcode is "understood to be a (ISO 3166) country code". However, 
W3C also gives several examples:
  

They also propose a method of handling such "artificial languages" as 
Elfish and Klingon. For such languages they propose the primary code of "x"
-

Now I hope I shall never manage a porting to a Klingon repository LOLOL

Anyway, if you do not need it for your application but just for a 
debugging procedure you can just forget about it :)

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Re: mbstring: Japanese conversion not working for me

2002-07-09 Thread Alberto Serra

ðÒÉ×ÅÔ!

 > 
 > 2 : 111??1235
 > 

language codes are
zh = chinese
ko = korean
ja = japanese

the charset codes must be fully specified, such as
ISO-2022-JP (the one you are using yourself)
SHIFT-JIS
EUC-JP

otherwise it will make no sense to your browser. Usually looking at what 
you can find in your "preferences->navigator->languages" will do the 
trick (talking about Mozilla).

EUC-KR would mean korean, and so on, which is which just EUC will not 
mean anything.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Re: mbstring: Japanese conversion not working for me

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!

> Can you explain that SPAN thing a bit more. You said to use:
> 
>  your text 
> 
> I can understand the charset param but what is the lang param used for?

Basically it might even be useless. But id does not harm to use it. Like 
this:



this text uses the header charset language setting


This is russian text in KOI-8 format
Á ×ÏÔ ÜÔÏ ÒÏÄÎÏÊ ÑÚÙË!


This again uses your header settings


This is english text in basic format
yes, it is


This again uses your header settings



Note that SPAN will not change anything in your formatting (like tables 
and so on).

Another (and safer) way to do it, is to define classes in a CSS sheet 
and apply the to SPAN areas. So you keep a centralized control on your 
char formatting.

But if you just need it to debug output you can be happy with a direct 
charset/lan specification.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Re: Postgres and chinese, korean, japanese charsets

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!

Jean-Christian Imbeault wrote:
> Don't know the answer to your question exactly but how about 
> transforming all user input into something like unicode/UTF-8 (or 
> UTF-16) and *then* putting it into the DB?
> 
> That way all the DB input has the same charset.

That was my first idea, yes. Normalizing to utf and get read of whatever 
trouble might lie on the way. Then I read on the MBlib docs that 
japanase chars may take up to 6 byte each, and that would hardly fit 
into a utf-16 format.

Again, all my worries are probably based on the sole fact that I never 
treated chinese/korean/japanese text in my life so I easily get deceived 
in my elaboration.

Thanks a lot for starting the subject. You saved me a lot of trouble in 
the coming winter :)

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Re: mbstring: Japanese conversion not working for me

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!

Jean-Christian Imbeault wrote:
> Found my problem.There was no problem. I was trying to test my code by
> displaying the INPUT and OUTPUT in a web browser. I forgot to realize
> that my input and oupts were in different encodings.
> 

Now THAT'S NEWS! :) Okay, just put the SPAN thing around your different 
output sections and you'll be able to check both in and out on the same 
page :)

uuuf... I feel better now :)

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] mbstring: Japanese conversion not working for me

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!

Jean-Christian Imbeault wrote:
> Worry and worry a lot ...

I already do :( The most terrorizing thing is that desolating "There are 
no user contributed notes for this page." that appears almost on every 
function in the online manual.

And the fact that there is no pointer for people in trouble to contact 
the developers of the library. The few user notes are from us europeans 
and tend to focus on how you can port utf-8 to old ISO standards.

IMHO such delicate matters would deserve a bit more of a detailed 
explanation, especially since most of us are going to use those 
functions to treat strings that they cannot read themselves to check the 
output result. Anyone knows how to get hold of the mblib developers mail 
address?

But okay, there *is* such a thing as a chinese/korean/japanese internet, 
so it means it can be done. Whether you and I can make it... well, it's 
another question :(

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] Postgres and chinese, korean, japanese charsets

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!

Jean-Christian Imbeault wrote:
> Alberto Serra wrote:
>> I hope you mean one charset per language. Otherwise I can just cancel 
>> POstgres from my list of usable engines. But yes, it can't be just one.
> 
> I'm no pgsql expert but I think that yes, it will only accept input in 
> one charset. But for charsets that use only 8-bits I think you can 
> insert data that is in more than one charset.
> 
> But for charsets that use more than 8-bits I think pgsql actually checks 
> that the input is in the charset the DB expects it to be in.

Can anyone say something about this? It would mean that a content 
repository ported to Postgres would not be able to hold chinese, korean 
and japanese content at the same time. Quite a big minus, I'd say.

Any chinese, korean or japanese programmers on this list? (I put the 
countries list in alphabetical order, no personal preferences implied).

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] mbstring: Japanese conversion not working for me

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!
> Jean-Christian Imbeault wrote:
>> My page is always in the same charset, the problem is that the user 
>> input might not be ...

Okay, I went thru a bit of docs on the japanese multibyte problem and 
got some surface understanding of the problem. Yes, since char 
dimensions are going to be different I see why browser would end-up 
mixing up the input. If you find any interesting site explaining how to 
do this please share. I'll be extending an existing content-repository 
to add chinese text management in the winter so I'll better start to 
worry about it. Thanks in advance.

As for your problem, I am afraid you would better turn to a japanese 
programmers' mailing list. That's if you speak japanese yourself, but 
you seem to do, so...

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] mbstring: Japanese conversion not working for me

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!

Jean-Christian Imbeault wrote:
> Impossible, though it would be nice. Postgres can only accept one 
> charset for it's input not multiple.

I hope you mean one charset per language. Otherwise I can just cancel 
POstgres from my list of usable engines. But yes, it can't be just one.

>> *charset forcing* have your input page always delivered in standard 
>> format,
> My page is always in the same charset, the problem is that the user 
> input might not be ...

You mean that browsers will accept charset mixing in japanese? You 
explicitely declare charset="mycharset" in the page headers and the 
damned thing returns input in charset="hischarset"??? Now that's a awful 
surprise to me. What browser does that?

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Re: PHP and Object-Orientated Programming

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!

Manuel Lemos wrote:
> Hello,
> 
> On 07/08/2002 06:56 PM, Cm wrote:
> 
>> I have a medium sized project that I'm started in PHP and mySQL.  I 
>> think an
>> object-orientated approach may be the best to reduce the amount of code.
>> My question is if I'm using PHP should I even try to do it an
>> object-orientated manner.  I've seen some posts that say that doing it 
>> this
>> way will really slow down PHP and that if you're doing OO you should 
>> really
>> do it in a language like Java.
> 
> 
> Non-sense. You can do OOP in PHP just fine, just differently than you 
> would do some things in Java. That did not stop thousands of people 
> using hundreds of PHP classes written in by many PHP developers and made 
> available here for free:
> 
> http://www.phpclasses.org/

We do OOP and never noticed a performance downgrade, right the opposite. 
Again, *any* tech solution will downgrade performance if unproperly 
coded. If you can do efficient OOP you can do it in whatever language 
you choose (well, maybe smalltalk and java qualify as an exception LOL)

I won't repeat the usual warnings about correct OOP in itself as it's OT 
here. Just watch out *PHP returns copies from the assignement operator = 
and not references*. That's it. Once you know that, you know everything. 
Learn to use the & sign when you need a reference (which *is* slower, so 
use it only when needed) and everything will be just fine. And *much* 
quicker than any java OOP will ever be.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] mbstring: Japanese conversion not working for me

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!

As for deciding what your user language/charset requests are (in terms 
of his/her browser settings) you might use this function

 // this function remains unchanged. It returns an array
 //  0 : negotiated charset
 //  1 : negotiated lancode
 function negotiated_langset() {
   // process charset request header and build charset request array
   $headchrreq = explode(',',$_SERVER['HTTP_ACCEPT_CHARSET']);
   $i = 0;
   while ($ihas_content($language[$i]) ) { $i++; }

# did we get anything?
if (isset($language[$i])) {
   $lancode = $language[$i];
   if ($i==0) { $charset=$charsets[0]; }
   else {
 // default charset when first choice unavailable
 $charset="ISO-8859-1";
   }
}
else {
  // default on nothing found
  $charset = "ISO-8859-1";
  $lancode  = "en";
}

$result[0] = $charset;
$result[1] = $lancode;

return $result;
 }

*NOTE* the !$this->has_content($language[$i]) call goes to a local 
function of yours that will return true/false, depending on whether you 
have available content for this language.

Charset request will default to ISO-8859-1 when your first languace 
choice is unavailable, because there is no data about further languages 
in the headers. You might want this to became a utf-8 value.

Function will not negotiate charset against content availability (as 
usually you will not have separate content editions for different 
charsets in your content repository). But you may easily add up the code 
snippet needed to do it, if that is your case.

If you do please share the result :)


ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] mbstring: Japanese conversion not working for me

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!

Jean-Christian Imbeault wrote:
> Warning:  PostgreSQL query failed:  ERROR:  Invalid EUC_JP character
> sequence found (0x8140) in /www/htdocs/test.php on line 31
> 
> So I assumed that I should first convert user input into EUC-JP.

Now, let's make sure we have a clear background:
   1) japanese chars come in three flavours:
   a) ISO-2022-JP (the one you are using yourself)
   b) SHIFT-JIS
   c) EUC-JP
   2) your database setting requires you input in c) style while
  you present it values in a) style.

if all that describes your problem you have two ways out of it, which I 
cannot evaluate myself (no personal knowledge of the differences among 
the three charsets).

*Database configuration* if possible, turn your Postgres configuration 
into one that will all three charsets (this will leave you with mixed 
input, though, and it will kill your chances to do a search in your db 
later)
*charset forcing* have your input page always delivered in standard 
format, that is, just one charset. This will free you from charset 
trouble when doing the query, but might end up in having all of your 
forms showing out with a different charset, if your site uses mixed 
charset output.

I usually use the charset approach, because russian all flavours contain 
the same set of characters, it's just a different way of coding them. 
But this solution is not so painless when ported to charset that might 
be "simplified" (like chinese) or not. AFAIK Japanese should be a 
syllabic alphabeth, so probably you can do that just as I can.

If you need to have your pages using a given charset (that is, you have
legacy docs coming in one flavour but your forms need another) you can
simply SPAN your page sections into different charset areas.
that is  your text 

Mind you, this is handy *and* dangerous. In russian the two SPANned 
sections will look exactly the same, while actually being different. So 
people might end-up cut-and-pasting data from CP-1251 to KOI-8. Not sure 
whether browsers will convert that themselves on the fly. You better 
check it out.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] $_REQUEST???

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!

Scott Fletcher wrote:
> Can the $_REQUEST be trusted??  The documentation said it is the combination
> of $_GET, $_POST, $_COOKIE & $_FILE.  If the PHPSESSID is found in
> $_REQUEST, I can tell it is from $_COOKIE.  I wonder if the PHPSESSID can be
> stored into $_REQUEST if hte $_COOKIE is unavailable or turned off?
> 

Think of it as channels. You have 4 channels your data can come in:
1) GET (the link parameters or a form sent on the GET channel)
2) POST (a POSTed form)
3) COOKIE (data stored on the client machine IF the client machine
  will accept doing that for you)

Now, as the song goes, "you only get what you give". If you tried 
storing your data in a cookie $_REQUEST will have the data *only* if the 
cookie worked. For you to find it in there anyway you should send it 
back on multiple channels (but them why should you need a cookie when 
you are sure you are going to get anyway from another channel?)

The basic weak spot in using $_REQUEST is in that people may have your 
software believe that it received the input while they do send it from 
another channel:
   1) me disables the cookies on my browser
   2) me adds ?yourCookieName=myValue on the link (or
  &yourCookieName=myValue if you already have stuff on the GET line)
   3) you (your software) thinks you got the cookie and uses it. What
  happens next depends on the nature of data involved.

That's possible if you use the $_REQUEST. Again, it might mean nothing 
in your context (that is cookie value might be absolutely irrilevant 
from a security point-of-view). But it should be taken in consideration.

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] is their a jobs mailing list?

2002-07-08 Thread Alberto Serra

ðÒÉ×ÅÔ!

Peter wrote:
> I think a mailing list would be ...

I think the basic question is WHERE this thing will be. HOW it works 
becomes a secondary decision, once you know whether it makes sense to 
spend time on the project or not.

IF php.net wants to add up a job-oriented location this makes sense and 
can be discussed in depth. As for myself I can throw in a few ours a day 
of my scarce time (beginning in autumn). It's a nice way for offshore 
companies like ours to make themselves visible so it's totally worth the 
effort.

IF this is going to be the 1 billionth indipendent effort to capture 
audience share you must ask yourself first whether you can reasonably 
expect yourself to be able to position this site into a visible place. 
You hardly will have the money needed to support full-time marketing 
activity (we all already have quite a lot of things to do and tend to 
work on sundays anyway).

So I guess the first question is: do PHP.NET people need/want this thing?

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] HTTPS vs. HTTP ?

2002-07-07 Thread Alberto Serra

ðÒÉ×ÅÔ!

This is for Chris and Miguel and all the people who threw in infos.

I just wanted to thank you all :) It's been really useful, and yes 
Chris, I guess you should post an explanation of the process somewhere. 
Most of us are prepared to use HTTPS but we can hardly explain our 
customers (and ourselves) what the hell we are doing.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] MING

2002-07-07 Thread Alberto Serra

ðÒÉ×ÅÔ!

has anyone been using MING extension in a production environment? Is it 
robust?

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] HTTPS vs. HTTP ?

2002-07-07 Thread Alberto Serra

ðÒÉ×ÅÔ!

>> Chris Shiflett wrote:
> it is very misleading and would indicate that I 
> have very little knowledge about PKI systems, 

Come on, nobody here would ever think of that. Especially since most of 
us (put me as first one in the list) should know much more about PKI 
ourselves before judging anybody's knowledge :) Which is why we keep 
making questions that sometimes may be pretty absurd.

> I was trying to point out 
> how insecure this model would be if encryption were all that SSL 
> provided and the only trust involved was the trust of a domain name.

Yes, I've got it now.

> No government, as far as I know, can break the public key cryptography 
> currently being used by most SSL-enabled sites (using the strong 
> security - 128 bit certificates). This includes the United States.

I was saying this because I remember (maaany years ago, when the whole 
PGP thing started) reading some fire exchanges about RSA keys and the 
way the encrypting chips were going to be "friendly" to american eyes. 
Honestly, at that time I was not that interested to the issue and I just 
gave it a quick read, which left me with a wrong opinion.

> Now, SSL only encrypts your communication in transit, of course. I'm 
> sure your local government could find a way to make the entity you are 
> communicating with release the information in the communication to them. 
> This is, of course, outside the scope of SSL.

And outside the scope of my worries :) I am responsible for the software 
I deliver, whatever happens out of it is none of my bag :)

> However, it is adequate to know that one key is used to do the 
> encrypting, while the other is used for the decrypting. These are 
> generally referred to as public and private keys, because one is made 
> available to the public while the other is kept safely stored (in the 
> case of Web browsers, it is stored in the certificate repository of the 
> browser).

Yes, glad that I did use PGP sometimes :) this part is clear :) So 
Verisign is actually just "signing" the key as I did on PGP and that 
means anyone trusting me can trust you if they receive a message signed 
with your key, because when evaluating the message they will now it';s 
been signed by a key that I would trust myself. Right? Man, I don't even 
wanna imagine where and how Verisign password is kept LOLOL

> Digital certificates solve this problem. A digital certificate, as RSA 
> describes it, is a document that says:
> 
> "I guarantee that this particular public key is associated with this 
> particular user; Trust me!"

So actually, when you spend your $200 what happens is:
   1) Verisign (or whoever) starts a process to control they really wanna
  play with you (and this has nothing to do with IT or SSL, they will
  have their own policies)
   2) Verisign (or whoever) starts a process to control your public key
  and possibly something else in your system
   3) If the above has a positive answer they just sign your kay and hand
  it over to you. So there is no need for a central db. Trust is *in*
  the key and need not be searched for. The only thing to do is to
  verify that the trusting key has not been revoked.

That is, if it works like PGP. But this is probably too easy, as this 
way they would have no way to revoke my key without invalidating all 
keys on this planet. So this is a simplification. But just tell me if I 
got the basic message.

> So, assuming for the moment that we trust the certificate, we can assume 
> that a particular public key belongs to a particular user. For example, 
> you can be guaranteed that a public key belongs to me (Chris Shiflett) 
> and thus, only Chris Shiflett will be able to decrypt the communication. 
> If someone is trying to pose as me, you may send them encrypted 
> communication, but they won't be able to decrypt it.

Yes, because they have stolen the public key and could crypt the 
question but since they have not the private key they cannot open the 
answer.

> Well, I disagree that this has nothing to do with the SSL protocol 
> itself. Identification is a very important part of enabling secure 
> transactions to take place over the Web. Without this, there would be no 
> "ecommerce" as it has been dubbed.
...
> Of course, as users of Web browsers such as Netscape and Internet 
> Explorer, we have to trust AOL/Time Warner and Microsoft, respectively, 
> (yeah, scary thought) to only trust CAs that have high integrity, 
> security, etc. An extensive C&A (Certification and Accredidation) 
> process is used to make this guarantee.

Yes, but this is the part I doubt. When I buy a certificate from Kiev, 
how on earth those guys sitting in Washington are to know who I am and 
what I do for a living? They will have to handle the job to someone 
else. This layering of delegations will include banks and governmental 
stuff, and there is no such thing as a government that will not accept 
bribery.

Chris, what me and Richard doubt is *NOT*

Re: [PHP] flip function

2002-07-07 Thread Alberto Serra

ðÒÉ×ÅÔ!

> I've tried with create function, for example:
> 
> function flip($f,$arg) {
>   return create_function('$y','return '.$f."($arg".',$y);');
> }
> 
> But if you use flip("foo",$o1) where o1 is an object then it won't work.

Never tried that on Haskell coding, but it did solve most of my trouble 
with objects:

function &flip(&$f,&$arg) {
return create_function('$y','return '.$f."(&$arg".',$y);');
}

then

flip("foo",&$o1)

I guess you will need same experimental work (and a lot of patience), 
but once you can fix the root problem usually everything else goes okay.

Just watch out for null returns. If you return an unassigned variable 
from an object member the most fantastic things begin to happen. And 
before reinstalling PHP from scratch (and exploring all of the 4 letters 
words you can think of) you should really check that you just simply did 
not end over an unassigned variable :)

ÐÏËÁ
áÌØÂÅÒÔÏ


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Problem with SQL query

2002-07-07 Thread Alberto Serra

ðÒÉ×ÅÔ!

Mark Charette wrote:
> LIMIT was not included in the SQL92 SQL standards and very few vendors
> implement all of SQL99; the use of ANSI standards to promote "portable"
> programs has always been beset by this kind of problems.

Yes, and vendors just love to have proprietary standards to protect 
their market shares. The basic idea is that since you cannot just switch 
from an engine to another without seriously risking your application 
stability you will tolerate the "yes, it's a known bug" answer, whenever 
your 100 thousand dollars application cannot print a simple data report 
because trying to set fonts size will crash the current job. Or when 
real numbers are returned with a different values from the one you wrote 
in.

Not talking about MeAndMyFriendJoe'sXperimentalSQLMachineGun 0.0, That 
was Oracle 7.3 with Developer (fonts) and Oracle 8.something under WinNT 
("floating" real number values).

Eventually they solved both the problems (I have to say they even did it 
quick) but you can imagine the atmosphere when the final customer had to 
be told that they had invested an overall amount of 25k$ a day for 2 
years just not to be able to print a common report and that Oracle just 
answered "yes, it's a known bug - bug precedence level: low".

Which actually meant: "go ** yourselves, we ain't got no time for your 
stupid customers". If only they could switch engine... But they switched 
to their lawyers in instead and kept the engine running, because no ANSI 
was there (and because we all knew that no better stability was to be 
found on other vendors anyway).

Some things in escaping the ANSI standard are useful, though. Things like
Oracle's DECODE and the LIMIT clause do make query sets smaller and 
quicker.
And yet, IMHO most of the opposition to ANSI comes from a mere 
commercial point of view.

This way vendors can keep releasing poor alpha stuff and call it a 
"stable" release without having to worry about spending test money. Test 
is something you are going to do yourself, paying for it with your own 
money and your own professional credibility. No wonder vendors are happy 
with it.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] transporting variable via post to another site

2002-07-07 Thread Alberto Serra


ðÒÉ×ÅÔ!

andy wrote:
> sorry maybe I did explain it not good enough.
> 
> The problem is that if a user has entered data in form 2 goes back to form 1
> and forward to form 2 again, the data he entered once in form 2 is lost. And
> I do not find a way how the get the data out of form 2 because the back
> button is placed in form 3 (same site as form2 ) to allow a different action
> since we have to link to another site then in form 2.
> 
> sounds confusing? I know but I hope I explained it ok

Honestly yes, it does :( Cant't you draw a sort of diagram? Besides, I 
will probably also need to know how data is modelled (that is, what your 
tables look like) to give you meaningful advice.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] transporting variable via post to another site

2002-07-07 Thread Alberto Serra

ðÒÉ×ÅÔ!

andy wrote:
> Everything works fine exept of error handling. Which means if a user wants
> to go back from step 2 to one and has already filled in some data in site 2
> he will loose this data for sure. It is not possible to transport the data
> via get anymor because the text is way to long.

Okay, this means Form 1 can be entered from two directions:
   1) the usual sequence (that is, the way users usually get to it)
   2) getting back from Form 2

If you place a button on Form2 saying "go back to form 1" when your user 
presses it just post your current data back to the script of form1. 
*PLUS* you add a hidden field called *FLAGBACK* (or whatever you want to 
call it like.

when the script that prepares form1 is called it must check for 
*FLAGBACK* being present. If not, it will do the same old stuff, if yes 
you just write a new branch that will put the data back into form 1. Easy.

*BUT* all this will never protect your user in case he just presses 
*back* on his browser. Make sure this is well explained on the page.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] About submitting multipart.forms

2002-07-07 Thread Alberto Serra

ðÒÉ×ÅÔ!

MG Lim wrote:
> has anyone met with this problem.. using IE to submit multipart forms. in
> text fields if there is "&" ... all text after it will disappear..quite a
> nuisance when submitting

yes, all dangerous chars should be substituted. Like " for the " 
symbol. It's not just IE, it's any browser.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] inserting linebrakes in multisite forms

2002-07-07 Thread Alberto Serra

ðÒÉ×ÅÔ!

andy wrote:
> One Form has a textfield, I submit it to another html site where there is
> another form with a textfield. Inside this textfield I place a hidden field
> with the value of the field from page 1 then I submit to the actual php site
> inserting the values into a db.

So, let's see if I got you right:

Form 1: a textfield, you submit it to another page (no matter whether it 
is on the same host or not, this should not make any difference)

Form 2 contains:
   1) a hidden field with the value from form 1
   2) another text field for new user input
You submit form 2 and nl2br does not work on the values of the hidden 
field. Right?

If that is so it's simply because once the value gets put in 
form2/field1 it has already lost the new lines.
So you should run nl2br on it *before* it gets submitted the second 
time. Do it when you send the value to form2.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Splitting up a timestamp?

2002-07-07 Thread Alberto Serra

Tony Harrison wrote:
> Hi. I please need some help with converting a MySQL timestamp into something
> easily read. Any help at all is most appreciated, thanks.
> 


ðÒÉ×ÅÔ!

use DATE_FORMAT. (it's a MYSQL function, not a PHP one). Look for it in 
the online MySQL manual.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Problem with SQL query

2002-07-07 Thread Alberto Serra

ðÒÉ×ÅÔ!

I forgot to add:

SELECT
extract('year', time),
extract('month', time),
count(*) as monthly_views
FROM
visitors
group by
   extract('year', time),
   extract('month', time)
order by
   monthly_view desc
limit 1

I take it that you have a *monthly_view* column in your table that is 
not the *monthly_views* alias yoiu use in your query. if that's a typo 
and you mean to order by the numebr of visitors (that is, you want the 
most visited month on top of the result) your query should probably look 
like:

SELECT
extract('year', time),
extract('month', time),
count(*) as monthly_views
FROM
visitors
group by
   extract('year', time),
   extract('month', time)
order by
   3 desc
limit 1

That's because most databases (and I guess MySql is no exception) will 
not be able to use an alias in their GROUP BY, ORDER BY clauses. But you 
may want to try, maybe MySql *is* an exception, after all.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Problem with SQL query

2002-07-07 Thread Alberto Serra

ðÒÉ×ÅÔ!

> I can't figure out what is wrong with this:
> 
> $query = "select count(*) as monthly_views from visitors group by
 > extract('year', time), extract('month', time) order by monthly_view desc
 > limit 1";

AFAIK this is no ANSI SQL, which is why is not portable. Your query 
should really be

SELECT
extract('year', time),
extract('month', time)
count(*) as monthly_views
FROM
visitors
group by
   extract('year', time),
   extract('month', time)
order by
   monthly_view desc
limit 1

*BUT* extract doesn't seem to be a MYSQL function, you most probably 
need to use DATE_FORMAT. Look in the Mysql docs for this.

As a general ANSI rule group by functions *need* the fields on which 
result is grouped to appear *first* in the query. Take half an hour to 
look at the GROUP BY docs in MySQL online manual, everything will become 
much clearer.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Linked drop down selection lists and dynamically generatedlinks

2002-07-06 Thread Alberto Serra

Naintara Jain wrote:
> this is of course, keeping in mind, that your backend (database data) is not
> changing every few seconds. If you are dealing with dynamic data, such that
> the list options might be changing at every moment then you would need the
> latest database data and PHP would need to be used after the selection in
> the 1st list.

ðÒÉ×ÅÔ!

True! If you have dynamic stuff you might consider having an invisible 
entity on your page that gets refreshed at constant intervals with a 
server call and contains a flag result. Any time the flag is set 
user-interaction will fire the PHP refresh, while you will still be 
using javascript when possible.

This will save you a lot of user complaints. People hate to wait for a 
second. It's maaad world :)

This road leaves a potential inconsistency problem that you shall solve 
on the final PHP call: user might send in the data before the flag is 
set. In that case you shall refresh the data and ask the user to repeat 
input. It's called an "optimistic strategy" :)

Actually, whether you can use it or not depends on the update frequency 
of your dynamic data. Plus some tailoring on the intervals (you don't 
want to kill your server by sending it millions of "check-the-content" 
requests). Decision is based on the number of users and the update 
frequency.

ÐÏËÁ
áÌØÂÅÒÔÏ


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Mailing all the elements of a form

2002-07-06 Thread Alberto Serra

Jeremy Bowen wrote:
> Hey,
> 
> I have looked in PHP manual but I cannot seem to find what I am looking for.
> 
> I have a very large form that I need to be able to mail. I just don't want
> to have to code all of the field into my mail() function.
> 
> Thanks,
> 
> Jeremy
> 
> 

ðÒÉ×ÅÔ!

*IF* the form is only to be mailed, and no other action shall be taken 
on the data it contains, you can use CGI processing instead of calling 
PHP. Can't remember the name of the call now, but there is something 
like that on every site.

*IF* you also want to process data *AND* mail it, you will have to to 
build the $body mail function or do some tricky things to have a second 
copy of your form built in a self-closing entity (DHTML can do that) 
which will perform the CGI action while your PHP script takes care of 
processing the original form.

Usually is much quicker to code the mail body. It depends on the context 
you are in.

ÐÏËÁ
áÌØÂÅÒÔÏ

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Thanks -> Actually POSTING without javascript

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!


> an image of brintney spear and a text on it telling the user to click on 
>  sounds appealing to you? ;)

LOLOL yes, something like that :) when the second execution fails (that 
is, the refresh META sends back no data on the POST channel) we show the 
user a form with the local logo, where he just says what the dimensions 
of his screen are and we assume that javascript is not present within 
the sesion :)) The problem was just in not losing the referer and the 
passed link while doing all this snake-like contorsions :)

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×



-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Linked drop down selection lists and dynamically generatedlinks

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!

Peter Goggin wrote:
> Can this be done using only PHP or do I need to use Javascripts?

managing this in PHP should be considered *only* when jscript is not 
available. It's a matter of load distribution.

When doing client server applications (like the web is) you shall always 
remember that any interaction about the two entities adds up time to the 
result. Which, incidentally, is the point in using Stored Procedures 
(when they are properly coded and the db engine is capable of supporting 
them) instead of making tons of single SQL calls from a single PHP script.

Now, if all of your data is already on the client (somehow stoked in 
jscript variables) your user interaction will be quick and easy. If you 
call PHP any time you will get a serious delay (because you do issue a 
request along the net, then the server processes it and sends it back to 
your browser, that again processes it and shows it). So this should be 
considered an emergency solution only.

A 100% robust solution should contain both, and call PHP only if jscript 
is not available on the client. But this is costly and requires the two 
procedures to be realigned everytime you have some change going on. Most 
applications can just use javascript and forget about it.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Having more problems

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!

Shiloh Madsen wrote:
> 

> $LoginDB=@mysql_connect($dbhost, $dbuser, $dbpass);
> if (! $LoginDB) {
>   print "Unable to connect to the database server at this time.";
>   exit();
> } else {

This can be just:

$LoginDB=@mysql_connect($dbhost, $dbuser, $dbpass) or die('Unable to 
connect to the database server at this time.')


>  }
> ?>

Sorry, what exactly are you trying to do here?

As for a general advice:
   1) use libraries. Make yourself a public dibconnect funcion. Chances
  are your user/password will differ depending on where the code gets
  executed (production or development) You don't want to go thru
  hundreds of scripts the recode that, right?
   2) Look for a very old PD class called FastTemplate. I know people
  will object that it adds to general execution and lowers
  performance, but that will allow you to keep your HTML code
  well separated by your scripting. And it does help, especially
  when you are not sure about what you are doing.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Thanks -> Actually POSTING without javascript

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!

B.C. Lance wrote:
> hm... how about sticking couple of iframes that will load the piece of 
> javascript and have each of the javascript in the iframe firing at 
> different time? i suppose at least 1 copy of javascript will be there to 
> do the intended work.

I realize I was being obscure :) BTW, the solution was obvious, I'll 
better explain what I am doing.

This is a "loader" utility that is put instead of the index.php script 
to configure a session by understanding what kind of client is calling, 
so it's very generical software that is shared among many a project.

In short, what index.php does is:
1) accept command line parameters (and the docs referrer) that are 
received and stock them somewhere for later use
2) sets a test cookie
3) generate a page that shows "loading..."

javascript in this page verifies user configuration (screen, java 
enabled, platform etc) and stuffs this data into a hidden form then 
sends it back to index.html where data will be used to understand 
whether we can rely on jscript and cookies within this session.

*The problem was here*. What if this second step fails? easy, I just 
leave the META as is and stock previous data on a session during the 
first execution of index.php

At this point index.php knows all it needs to fill in cionfiguration 
data and it just includes the real home page. From now on we will be 
able to tailor channelling (that is, cookies or not, jscript or not) 
without reasonable doubts. Yes, the user *may* change it's configuration 
during the session, but this is very low percentage of cases and we can 
live with it.

Well, that's the most general part of it. But at least it's clearer.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×



-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Thanks

2002-07-06 Thread Alberto Serra

B.C. Lance wrote:
> you might wanna fire that javascript using onload from the body tag. 
> that kinda assure the page is loaded successfully before the event takes 
> off.

ðÒÉ×ÅÔ!

It is there already. My problem is to do it something that will save my 
*ss in case jscript is *NOT* there. So it must be a no thrills HTML 
solution that will run anyway, no matter how poor in resources the 
browser is.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Thanks

2002-07-06 Thread Alberto Serra

B.C. Lance wrote:
> not from meta refresh. but javascript could do that. set a timeout that 
> will fire the submit event after 2 seconds. that will work.
> 
> b.c. lance
> 

ðÒÉ×ÅÔ!

I already have that and it works fine. The problem is when jscript is 
not working (or missing). I was trying to build up some panic tree in 
case jscript fails.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×




-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] Привет!

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!

I detach this from current thread as it has nothing to do with it :)

now:
   ðÒÉ×ÅÔ! means "hello" (pronounce "preevjet", accent goes on je)
   ÐÏËÁmeans "bye"   (pronounce "paka" accent on last a)

The rest is just my name (Alberto, I am italian as of original 
nationality) and the name of the place I am, that is, Kiev, the capital 
of Ukraine :)

I got SOOO annoyed by charset trouble in the last week that I decided to 
do something to enhance people's consciousness on the matter, by mixing 
alphabeths and languages in all of my mails.

Yes, it IS a pointless effort made by a powerless dwarf. :)

ðÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] Posting with refresh META

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!

Sorry, I forgot writing a intelligible subject on previous posting :( So 
I repeat.

Probably a stupid question. Is there anyway to force POSTing a form from
the refresh META?



IMHO that is NOT possible, but maybe I am wrong.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Thanks

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!

Probably a stupid question. Is there anyway to force POSTing a form from
the refresh META?



IMHO that is NOT possible, but maybe I am wrong.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] HTTPS vs. HTTP ?

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!

Chris Shiflett wrote:
> Richard,
>> Do you really believe that for $200 (or $119, or $500) that they "proven"
>> themselves trustworthy?

LOL no, I don't. As a matter of fact crooks usually have more money in 
their pockets than honest people do, so it's highly possible that a 
crook will pay the money while the innocent will save his last cent :))

> Now you've changed from "secure" to "secure from snooping." Notice the 
> difference? It is significant. Like I said before, encrypting the 
> transmission is useless by itself. To put it plainly:
> 
> encryption != security
> 
> What if you trust your friend who owns safeplace.org, and you want to do 
> business with him? Maybe you visit his site and enter a credit card 
> number somewhere. Thankfully, you notice that the lock icon is showing, 
> and that he is using SSL. With this warped idea of SSL where encryption 
> is all that counts, what if you find out that you're not really on 
> safeplace.org? You're really at evilcriminal.org, and he has a virtual 
> domain setup for safeplace.org. Also, he generated his own certificate 
> for safeplace.org using his own CA (good thing there was not C&A process 
> to undergo). So you have now sent the evil criminal your credit card 
> number because you trusted his domain name. Good thing it's secure, right?

So, let's see if I got you right:

   1) SSL just says we our packets are difficult to open, that is,
  they are encrypted. Nothing more

   2) Our packets are difficult to open but they are totally open
  to Uncle Sam's control software, as the RSA thingy cannot
  shield them from "governmental inspection", which makes sense
  if you are writing software for an american citizen but
  it's pretty annoying if your customer is from somewhere else.

   3) A key is nothing more than a negotiation token, a mere building
  brick that is used to fire the process.

   4) the "trust" you buy is something like a fixed IP number, that is
  the guys in the major do certify that you *are* who you pretend
  to be.

   5) If the one I am pretending to be is a criminal, being trusted by
  Verisign (or whoever in their place) won't make any difference.
  Their "license" just means that you are really dealing with those
  you think you are dealing with and that they do bear legal
  responsibility for whatever will happen in the transaction.
  Again, legal action will eventually have different
  results depending on where the trusted company is based, since
  not all countries have the same normative set. But that has
  nothing to do with the SSL protocol in itself.

Now, there's a question regarding point 4). What if someone from 
www.goodguys.com
gets the certified key pair and hands it over to some crook outside the 
company? I hope this is not just as easy as it sounds (the key pairs 
will probably check something in the environment before starting to 
shout "YEAAAH!! IT'S MEEE!!!") but still...

As for point 2), please get me right. I have my own political opinions 
as anybody
else, but my concern here is a professional one, since my customers are 99%
not americans. Small-mid sized companies (including mine) usually do not 
give a
damn about having their messages read by american eyes (we are simply 
not worth the trouble of looking in our archives) but large companies 
and Govt. organizations are *much* less indifferent to the subject, and 
I guess it's understandable, they want their privacy to be for real.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] issue with script after php upgrade

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!

Jamie Novak wrote:
> http://myserver/index.php?dir2=somedirectory
> 
> In 4.1.2, if I echo $dir2 at the beginning of the script just for
> testing, it will echo the value of the variable without issue.  In
> 4.2.1, the variable never appears to get set at all, although it does
> show up just the same in $QUERY_STRING under both versions of PHP, so I
> know something is at least being passed back to the server.
> 
> Does this make sense how I explained it?  Can anybody tell me what's
> changed between versions that would make the script (or, really, PHP)
> ignore the value I'm passing back?  (I looked at the changelog, but
> didn't really see anything that I understood to be related to the
> problem I'm experiencing.)
> 
> TIA,
> Jamie
> 

You did look for a leaf and missed the tree :)) Look for 
Register_globals in your php.ini file. It's *off* in the new versions 
and it should be so for security reasons. Just check the docs in the 
online manual and everything will be clear :))

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] Re: Sort with PHP or SQL?

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!

Pekka Saarinen wrote:
> Also, many virtual hosts share MySQL server(s), so offering a choice to 
> use PHP for pagination and sorting on "own server RAM/CPU" may by 
> beneficial. I also believe that anything that produces less load to 
> MySQL is good.

Absolutely true. First time a customer of mine wanted to host in the 
States he got offered Oracle on dedicated machine. Looked quite good, as 
usually having DB server on a dedicated machine performs *much* better.

Eventually, we found out that the yanks had *one* db server for 
something like 50 overloaded webservers. The poor dbbox was actually 
serving an incredible amount of MySql dbs, too.

So poor configuration must be taken into account. Especially when you 
are hired into a project and cannot really choose who the provider is 
going to be. In that case an oracle instance was *much* slower than a 
PHP sort out of a plain text file. And we are talking about a ridicolous 
amount of rows...

Everything may happen...

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] help help help!!!!!!pls........

2002-07-06 Thread Alberto Serra

Balaji Ankem wrote:

> I have multiple check boxes ...and I gave the single name to all check
> boxes.
> 
> If I post to my php script I am not getting all the values as an
> array.I am getting only one value(last value).

Correct. Since they are all named in the same way, the last one kills 
them all.

> If I give name as OptionList[] I am getting an error for selectAll
> option. 

I never came to think about it, but the [] thing may actually disturb 
jscript.

I usually do it like this:

HTML side


   
 
 
   Option 2
 

Hi


   
 
 
   Option 2
 

Hi



PHP side
-
   # put the received input into an ordered structure
   ##
   $count = 0;
   while ( isset($control[$count]) ) {

 # Build variable names;
 ###
 $w_OptionList = "OptionList_".$count;

 # get actual form values
 
 $OptionList[$count] = $$OptionList;

 $count++;
   }

Javascript
--
I never use selectAll. But you can easily walk the array down in the 
very same way.


ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




Re: [PHP] mail help, and php.ini help.

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!

Greg Scotts wrote:
> $to #
> $from #
> $subject #
> $message #
> mail($to, $from, $subject, $message)

It always worked for me... you obviously checked variable content, did 
you? And I am not sure I got you right. Mail gets sent, it's just the 
sender address being wrong?

> Also, i was wondering how i could use my own PHP.INI config file on a =
> remote webserver which hosts my site.

You need a shell with root access. I doubt you will be given one.

> And can i set .php to something else, like .he for example?

Yes, if you are root :) You need to do it in your httpd.conf (that's 
actually something Apache must now. For PHP file extension is totally 
equivalent, you could have no extension at all and they would work. It's 
Apache that needs some rule for it to know how it's going to process the 
request).

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×


-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




[PHP] Charset/language request headers. Yes, it's true :(

2002-07-06 Thread Alberto Serra

ðÒÉ×ÅÔ!

Doing multiligual sites presumes you can somehow understand what the 
client expects from you. Browsers all are full of language settings, 
but... The HTTP specification is very little language negotiation 
oriented in itself (this is probably a consequence of its having started 
out in a 100% english speaking environment).

I have been checking the docs here and there, but that's the way it is. 
  If russian was my second choice there would be no way to decide 
whether I should be sent a KOI-8 doc or its cp-1251 equivalent. And 
although I am not a chinese speaker I do suspect the same problem to 
arise there. Now I finally understood what was the need for a russian 
edition of Apache.

You can check some docs here: http://www.cs.tut.fi/~jkorpela/http.html 
it's a pretty handy site.

All language negotiation specification ignores the charset issue. It 
appears as if the two things had been projected separetely, by people 
that simply did not know about each other. And since people speaking 
more than one language are a minority I would expect this issue to 
remain "as is" for a century or so...

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

-- 


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


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




  1   2   >