[PHP] Re: Why the difference in email transit times?

2013-08-13 Thread Ian
On 13/08/2013 16:20, Tedd Sperling wrote:
 Hi gang:
 
 I'm using the class.phpmailer.php code to send email -- it works neat -- very 
 classy (no pun intended).
 
 I can send an email from my sperling.com domain and it arrives almost 
 immediately.
 
 However, when I use the exact same code (except for the FROM address) from 
 kvyv.com (another domain I own), the email literally takes hours (up to 12) 
 to arrive.
 
 Any idea of why there is a difference of email transit times between the two 
 domains?
 
 Cheers,
 
 tedd
 
 PS: Note, my receiving email addresses are handled by gmail.com.

Hi,

Have a look at the Received: headers of each email.  They are in
reverse order.  I.e. the one at the top is the most recently added.

Take into account timezone differences too.


12 hours seems like a very long time for a delay.  I suspect one of the
receiving hosts in the chain employs greylisting, and the sending
network employs many different sending servers (ie like Google) in a
round-robin fashion.  The greylisting server may not be configured to
recognise the many different servers as one 'set'.

All speculation of course ;)

Feel free to send the headers off list and I'll take a look.

Regards

Ian
-- 







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



[PHP] Re: why is this SIMPLE elseif not firing?

2009-07-15 Thread Govinda

nevermind..  sorry for the noise.
It was my if clause that was firing too much, and never even reaching  
that elseif.

-G

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



[PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Colin Guthrie

Ashley Sheridan wrote:

Would it be totally off topic if everyone were to say what their
favourite OS was and why? I'm just a little curious as to what OS's
people use in this field.


Well I've been using various flavours of Linux since uni where it was 
used in most to the labs. It was a RH version and as I started playing 
with it on my own PCs I opted for a RH derivative that gaining momentum 
at the time, Mandrake. I've been using it ever since with little forrays 
into Fedora, Ubuntu and Suse land. For me Mandriva is an ideal distro. 
It's secure, business orientated but still very desktop friendly. The 
people involved are excellent and the community is both very supportive 
and fun (similar feeling to this list).


For me a linux distro is not all about having the latest and greatest 
packages shoved at you whenever they are available. To me the job of the 
distro is to have defined cycles and defined distribution channels. 
While they have their place, having random repositories of packages is 
IMO not a good idea. Different people package things in different ways 
and with different names etc. which can make upgrading difficult when 
official packages conflict with third party ones.


So the Mandriva system for me works best. I can use happily in my home 
computing life and I can deploy it to the network of machines in my 
office without worry.


I have a lot of time of OSX, but I like to fiddle and break and be 
different, and OSX doesn't give me quite what I want in that respect.



Windows? Nah.


--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Robert Cummings
On Tue, 2008-09-16 at 20:11 +0100, Ashley Sheridan wrote:

 Would it be totally off topic if everyone were to say what their
 favourite OS was and why? I'm just a little curious as to what OS's
 people use in this field.

I originally started using Linux 8 years ago at my first job out of
school. At that time I was using Debian. At home though I started
playing around with Mandrake. Over time though I liked Mandrake less and
less and Finally moved to Ubuntu about 3 years ago for my desktop. I
haven't looked back since I find the apt repositories have plenty of
bleeding edge stuff while I can still compile whatever else I need from
source. For server side stuff though, I still find myself leaning
towards Debian although I'm quite at home using Red Hat, Fedora, and
Cent OS also. Ultimately though, I have to say I much prefer apt over
yum.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Philip Thompson

On Sep 16, 2008, at 6:26 PM, tedd wrote:


At 8:11 PM +0100 9/16/08, Ashley Sheridan wrote:
Would it be totally off topic if everyone were to say what their  
favourite OS was and why? I'm just a little curious as to what OS's  
people use in this field.


Obviously, mine is Mac and OSX 10.4.11. My next one will be whatever  
is the top of the line Apple has at the time I have to money for it.


The question is... why aren't you on 10.5.4? I never miss an update...  
=D


~Philip

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Stut

On 16 Sep 2008, at 23:54, tedd wrote:

At 7:40 PM +0100 9/16/08, Stut wrote:

On 16 Sep 2008, at 15:59, tedd wrote:
Then one day, M$ sent out notice that they would no longer support  
QuickBasic and that was the end of that. All of our current, and  
past work, was on a dead-end street. We were left to fend for  
ourselves.


I don't mean any disrespect but devoting your livelihood on a  
technology with a single provider is probably not the smartest move  
you've made.


No offense taken and what you say at face value is true. However,  
that was a past lifetime -- how smart were you 20 years ago?


I was 11 so it's kinda hard to tell, but I remember thinking I was  
doing ok ;)


And I didn't really devote MY livelihood to one technology nor  
industry for that matter -- never have. That's the reason why I have  
several businesses going concurrently. I just wished one of them  
would hit the log-ball so I could retire and program for a hobby.


Don't we all!

It's not nice for Microsoft to have pulled support for it but  
they're a business and they made that decision because they didn't  
see a profitable future there, they weren't out to screw you.


Of course they were not out to screw me, but even if they were,  
that's not relevant.


I think the important point here is that if you create a development  
product which requires others to have faith in you, then you also  
inherent a responsibility to those who have invested their time into  
helping you secure your product. Software development is a symbiotic  
relationship.


Indeed it is, but in any one to many arrangement the first to go is  
the smallest. My guess would be that QuickBasic was *the* smallest in  
terms of user base.


If you want to pull the plug and cut that relationship, that's your  
choice. But that action comes with a cost. From my perspective, M$  
is just reaping what it sowed.


I just love the way everyone ignores all the good they've done and  
focuses on the evil. With so many customers/users do you really expect  
them to be able to keep them all happy? Seriously?


If you feel you need to hold a grudge, by all means do so, but I  
personally have grown out of name-calling and stick to logical  
argument instead. Does wonders for my BP!



Besides, grant me my windmills to tilt.


Gimme a sec to mount my trusty steed.

Imagine if PHP suddenly stopped development and you had to find a  
different language (i.e., ruby). Sure we could all do it, but we  
picked this language for a reason and now we have to choose again  
-- and perhaps that choice was our second choice. I don't like  
being forced to settle for my second choice.


Speaking only for myself I would have no problem with it at all,  
for a few reasons...


I've been there before and survived -- like you, I have numerous  
languages under my belt -- in fact they all look the same to me now.  
So, that wouldn't be a big problem, just an annoying one.


While I have no faith of which to speak in anything except science, I  
try to live by the philosophy set out in the serenity prayer. It's  
worked pretty well for me so far.


Now, should have M$ continued to support a product that wasn't  
making sufficient money for them? I dunno, but I don't care either  
-- they screwed with my life and I'll spend the rest of it calling  
M$, M$.


That's your choice, but don't take offence when I say that's  
changed my opinion of you somewhat.


No offense taken, but if your opinion of me has changed over that,  
be advised I've done far worse than name calling.


I realize that you take the high-road on things like this -- I  
respect that -- that used to be my practice as well. It's very  
predicable from a business perspective. But times change and I kind  
of like telling people what I really think -- somewhat like the  
member of the family who no longer cares if he farts in public -- if  
you get the drift.


I have no issue with people giving their opinion, but to do so with  
childish (IMHO) name-calling makes the reasonable argument, if there  
is one, much harder to take seriously.


Similarly, I had a run-in with American Express over 30 years ago  
and even to this day I return all their sales promotion in their  
self-addressed no-postage envelope they provide. Over the years, I  
suspect they have paid postage for over 100 pounds of profitless  
correspondence and the time for their staff to examine it.


You're not alone in doing this, but how much a dent do you really  
think you've made in their profits? It's like spam, if it wasn't  
worth doing they wouldn't do it. Your efforts would be better spent  
trying to get your address blacklisted... or learning Scala!


Well... that was the idea, to get blacklisted. Just about every  
thing I sent back had my address on it and included a message which  
basically said This what I think of your service and you just paid  
the postage for me to say it. Now take me off your list! But, it  
hasn't happened yet.

Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Jason Pruim


On Sep 17, 2008, at 3:24 PM, Stut wrote:


On 16 Sep 2008, at 23:54, tedd wrote:

At 7:40 PM +0100 9/16/08, Stut wrote:

On 16 Sep 2008, at 15:59, tedd wrote:




Snail-mail spam relies upon the same basic fact that electronic spam  
does... everyone hates it until it offers them something they want.  
Unfortunately in most cases it happens often enough to be  
profitable. Oh, and because everyone's doing it these days there  
doesn't seem to be any noticeable effect on a company's reputation  
which is unfortunate.


I like what you said right here stut... It's only junk until someone  
hits the nail on the head with it! Maybe 9 out of 10 people don't need  
another credit card... but it's that 1 person they do it for. Average  
response rates to direct mail marketing campaigns are about 2% being  
considered good.





It's possible that if more people returned it, possible with some  
extra weight they might stop, but I don't see it happening. You  
might have better luck getting removed if you mark the envelope No  
longer at this address rather than writing a rant. They're less  
likely to continue sending you stuff if they don't think you're  
there anymore. I do the same with spam email using the bounce  
feature in Apple Mail and it's worked pretty well both on and offline.


As the resident direct mail specialist on this list... :)

I can say that the amount of mail that is returned to the customer  
won't affect in any way shape or form how much mail they send out.  
Presumably they are working of a rented list where you can get any  
info you could possible ever think of... I registered a domain and not  
more then 1 month later I had a business credit card offer from  
Capitol One... Who is the largest direct mailer in the US. I barely  
even had a crappy site up before that happened! :)


And as far as returning the mail to them in their envelopes, it  
doesn't cost that much... $500/year for the permit, per piece returned  
fee + Weighted first class rate... All in all, not that big of a deal :)


But what ever makes you happy! :)


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
[EMAIL PROTECTED]





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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-17 Thread Ashley Sheridan
On Wed, 2008-09-17 at 15:36 -0400, Jason Pruim wrote:
 On Sep 17, 2008, at 3:24 PM, Stut wrote:
 
  On 16 Sep 2008, at 23:54, tedd wrote:
  At 7:40 PM +0100 9/16/08, Stut wrote:
  On 16 Sep 2008, at 15:59, tedd wrote:
 
 
  Snail-mail spam relies upon the same basic fact that electronic spam  
  does... everyone hates it until it offers them something they want.  
  Unfortunately in most cases it happens often enough to be  
  profitable. Oh, and because everyone's doing it these days there  
  doesn't seem to be any noticeable effect on a company's reputation  
  which is unfortunate.
 
 I like what you said right here stut... It's only junk until someone  
 hits the nail on the head with it! Maybe 9 out of 10 people don't need  
 another credit card... but it's that 1 person they do it for. Average  
 response rates to direct mail marketing campaigns are about 2% being  
 considered good.
 
 
 
  It's possible that if more people returned it, possible with some  
  extra weight they might stop, but I don't see it happening. You  
  might have better luck getting removed if you mark the envelope No  
  longer at this address rather than writing a rant. They're less  
  likely to continue sending you stuff if they don't think you're  
  there anymore. I do the same with spam email using the bounce  
  feature in Apple Mail and it's worked pretty well both on and offline.
 
 As the resident direct mail specialist on this list... :)
 
 I can say that the amount of mail that is returned to the customer  
 won't affect in any way shape or form how much mail they send out.  
 Presumably they are working of a rented list where you can get any  
 info you could possible ever think of... I registered a domain and not  
 more then 1 month later I had a business credit card offer from  
 Capitol One... Who is the largest direct mailer in the US. I barely  
 even had a crappy site up before that happened! :)
 
 And as far as returning the mail to them in their envelopes, it  
 doesn't cost that much... $500/year for the permit, per piece returned  
 fee + Weighted first class rate... All in all, not that big of a deal :)
 
 But what ever makes you happy! :)
 
 
 --
 
 Jason Pruim
 Raoset Inc.
 Technology Manager
 MQC Specialist
 11287 James St
 Holland, MI 49424
 www.raoset.com
 [EMAIL PROTECTED]
 
 
 
 
 
It's all about weighing those suckers down some more with loose change
that we all have accumulating everywhere. For the cost of 10p of mine, I
know i've just put their costs up way more. Of course, if you don't have
coins to spare, stones work equally well...

As for weighing the good merits of Microshaft, well it's all relative
isn't it? For everything they do good, there's a bunch of things they've
done on the way, whether it was muscling someone else out of the market,
or just making it even easier for virus writers to attack us. At the end
of the day, everyone will weigh this out on both their own experience
and what they've heard. If the majority of what is said about them is
bad, well, no smoke without fire and all that...


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread tedd

At 4:27 PM -0500 9/15/08, Philip Thompson wrote:
Has anyone seen the new M$ commercial where they are asking these 
people to review the next version of their OS. Some of the responses 
of the people were that they really thought this new OS was 
cool/neat/whatever. Then afterwards, M$ told them it was Vista.


Yes, I saw that commercial.

It's one of those type of commercials that if you like the product, 
you'll like the commercial -- if you don't, then you'll find fault 
with it.


I look at the commercial as M$'s attempt to try to patch up a failing product.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread tedd

At 10:35 PM +0100 9/15/08, Ashley Sheridan wrote:

Ah I'd heard of this story. What you've forgotten to mention was that
the computers were all set up on hardware chosen by Microsoft, and all
running software especially picked by Microsoft. Now, I'd hazard a guess
that even Microsoft is smart enough to pick a combination that is
extremely unlikely to crash on the end user. I'd love to see the same
test on the same people set up by Mac people and Linux gurus. I think
that as this is not really a fair test, you can pretty much get any
answer you want.


Ash
www.ashleysheridan.co.uk


Of course, when it's your dime, you present things the way you like.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread tedd

At 9:53 PM +0100 9/15/08, Stut wrote:
As for Microsoft (will people please stop screwing with their name, 
it's impolite), they've certainly made some bad choices over the 
years and Windows has suffered for it.


I screw with the M$ name because I don't like them!

It's not due to their questionable business practices that ultimately 
ended Gates in front of Congress answering questions; or running 
Netscape out of business; or the hundreds of other instances of them 
being a dick, but rather what they did to *me*.


You see, many years ago M$ developed and provided QuickBasic for the 
Mac. Myself and hundreds of other developers devoted our livelihoods 
to that product.


Then one day, M$ sent out notice that they would no longer support 
QuickBasic and that was the end of that. All of our current, and past 
work, was on a dead-end street. We were left to fend for ourselves.


Imagine if PHP suddenly stopped development and you had to find a 
different language (i.e., ruby). Sure we could all do it, but we 
picked this language for a reason and now we have to choose again -- 
and perhaps that choice was our second choice. I don't like being 
forced to settle for my second choice.


Now, should have M$ continued to support a product that wasn't making 
sufficient money for them? I dunno, but I don't care either -- they 
screwed with my life and I'll spend the rest of it calling M$, M$.


Similarly, I had a run-in with American Express over 30 years ago and 
even to this day I return all their sales promotion in their 
self-addressed no-postage envelope they provide. Over the years, I 
suspect they have paid postage for over 100 pounds of profitless 
correspondence and the time for their staff to examine it.


Now, do I have problems? Perhaps, but I'm happy. :-)

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread tedd

At 11:30 PM +0100 9/15/08, Stut wrote:
Wow, talk about hitting the nail on the head. When Microsoft pick 
the hardware their OS runs on and the software it runs with it works 
perfectly.


Not exactly.

I seem to remember when Gates gave a presentation at Mac World and 
his slide show locked up. I actually felt sorry for the guy, but I 
had a cookie and the feeling passed.


Cheers,

tedd


--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread tedd

At 11:57 PM +0100 9/15/08, Ashley Sheridan wrote:

I agree on your point about trying before bashing. I've tried Vista.
Hell, I had to use it for 2 months solid while I was working in India,
so I really got to test it out. I had more crashes on that in the 2
months I was using it than I had on Fedora in 2 years. Now, admittedly I
was working on Vista during every working hour, and I only use my Fedora
machine at weekends and evenings, but I think if you tally up the total
time, it was really not in Windows' favour. As an OS, XP was not all
that bad, but I've found I really do prefer the way Linux behaves, that
and I can get pretty much whatever software I want for free, which just
isn't always so easy with Windows.


I spend at least 10 to 12 hours per day (including weekends) working 
on my machine and I've been running my current Mac for over 6 years 
with my Mac experience dating back to 1984 (the original 128k Mac, 
which I still have).


In the last 6 years, I remember my current Mac locking up only once 
and that was on start-up after I had installed additional drive. I 
had to hold the on button to get it to shut down. But, the next 
boot was uneventful.


Yet people think that the occasional crash is acceptable when working 
with computers. I can only say, they must not be Mac people.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Colin Guthrie

tedd wrote:
Imagine if PHP suddenly stopped development and you had to find a 
different language (i.e., ruby). Sure we could all do it, but we picked 
this language for a reason and now we have to choose again -- and 
perhaps that choice was our second choice. I don't like being forced to 
settle for my second choice.


Careful Tedd... that came perilously close to being on-topic again there! :p

/me hides for playing no small part in stretching out this thread...

Col

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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



[PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread tedd

At 8:42 AM +0100 9/16/08, Colin Guthrie wrote:

tedd wrote:
3. wasn't something I was going to work on -- not because I refused 
to do it for her but rather because I refuse to work with windozes 
-- period.


In this case I would have blitzed windows and slapped on linux 
distro of choice instread (see below for *my* choice :))


I've done this recently... a friend aquired a tablet PC thing. It 
didn't let him in as it came with some XP+admin password and while I 
could have just made windows work, there were no apps on it and he 
only wanted it for surfing the web from his sofa... so the simple 
answer there is: put linux on it!


Personally, if I have to help out someone who has a niche little 
computer or a niche need, it's a no brainer these days. Linux isn't 
hard to use, and if I have to help out my friends every couple years 
doing an upgrade than so be it. It's a price I pay gladly for making 
my life far less painful in the meantime!


Co:

Yes, but this is where I lack the experience you have. All of the 
above you say is foreign to me. My abilities (if any) are to be found 
elsewhere.


I know how to set Mac's up -- actually that's not an accomplishment 
because you don't have to do anything, so there's nothing complicated 
about that -- you just need to explain to people how to use them.


I often set the elderly (yes, there are people older than me) up with 
Mac's so they can email one another and surf the net. The biggest 
problem I've encountered with older-than-me types is having them RTM 
-- they simply don't want to do it! So the more obvious things are, 
the better it is and I've found Macs to be more obvious and easier 
for the elderly to use.


Many years ago (circa 1987) I created a survey about computer usage 
and sent it to over 10,000 companies world-wide. I received about a 
12 percent return -- this was an outstanding return because 2 percent 
is common. I think the survey hit a nerve.


One of the questions I asked on the survey was On a scale of 1-10, 
should a computer be as easy to use as a telephone?


I sorted the answers per age and found the older you are, the more 
you want the computer to be as easy to use as a telephone.


There were a lot of interesting things that came from that survey and 
I published my results in the AAPG.


But the point here was there are differences between how people use 
computers and how useful computers are -- it's almost a clique that 
Mac's are easier and my experience supports that.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread tedd

At 4:41 PM +0100 9/16/08, Colin Guthrie wrote:

tedd wrote:
Imagine if PHP suddenly stopped development and you had to find a 
different language (i.e., ruby). Sure we could all do it, but we 
picked this language for a reason and now we have to choose again 
-- and perhaps that choice was our second choice. I don't like 
being forced to settle for my second choice.


Careful Tedd... that came perilously close to being on-topic again there! :p

/me hides for playing no small part in stretching out this thread...

Col


LOL !!!

My meandering often makes wide circles but usually returns to the 
point. My first and second posts to a thread are usually on topic. 
But if it takes more than that, then something went horribly wrong.


My post are like salt and pepper. You can't make a whole meal of 
them, but they're nice to have around to spice things up.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Stut

On 16 Sep 2008, at 16:06, tedd wrote:

At 11:30 PM +0100 9/15/08, Stut wrote:
Wow, talk about hitting the nail on the head. When Microsoft pick  
the hardware their OS runs on and the software it runs with it  
works perfectly.


Not exactly.

I seem to remember when Gates gave a presentation at Mac World and  
his slide show locked up. I actually felt sorry for the guy, but I  
had a cookie and the feeling passed.


You're making the huge assumption that they chose the hardware on that  
occasion, something that is in no way reasonable to do in my opinion.


-Stut

--
http://stut.net/

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Stut

On 16 Sep 2008, at 15:59, tedd wrote:

At 9:53 PM +0100 9/15/08, Stut wrote:
As for Microsoft (will people please stop screwing with their name,  
it's impolite), they've certainly made some bad choices over the  
years and Windows has suffered for it.


I screw with the M$ name because I don't like them!

It's not due to their questionable business practices that  
ultimately ended Gates in front of Congress answering questions; or  
running Netscape out of business; or the hundreds of other instances  
of them being a dick, but rather what they did to *me*.


You see, many years ago M$ developed and provided QuickBasic for the  
Mac. Myself and hundreds of other developers devoted our livelihoods  
to that product.


Then one day, M$ sent out notice that they would no longer support  
QuickBasic and that was the end of that. All of our current, and  
past work, was on a dead-end street. We were left to fend for  
ourselves.


I don't mean any disrespect but devoting your livelihood on a  
technology with a single provider is probably not the smartest move  
you've made. It's not nice for Microsoft to have pulled support for it  
but they're a business and they made that decision because they didn't  
see a profitable future there, they weren't out to screw you.


Imagine if PHP suddenly stopped development and you had to find a  
different language (i.e., ruby). Sure we could all do it, but we  
picked this language for a reason and now we have to choose again --  
and perhaps that choice was our second choice. I don't like being  
forced to settle for my second choice.


Speaking only for myself I would have no problem with it at all, for a  
few reasons...


1) PHP is open source so the chances of development stopping dead is  
highly unlikely even if Zend were to cease to be.


2) PHP is not my strongest language, and it definitely isn't the only  
language I know. I work hard to make sure I'm up with current  
developments in C/C++, C#, Ruby and a number of other languages. I've  
recently started learning Scala. I've also engineered my career so it  
involves more than one core language/technology at any one time so my  
CV stays fresh and my options stay plentiful.


3) I have no real preference for a particular language or technology.  
Throughout my career I've had the attitude that the method of software  
engineering is far more important than the tools. I feel confident  
that I could apply my skills using any language, something that's been  
tested a few times over the years.


Now, should have M$ continued to support a product that wasn't  
making sufficient money for them? I dunno, but I don't care either  
-- they screwed with my life and I'll spend the rest of it calling M 
$, M$.


That's your choice, but don't take offence when I say that's changed  
my opinion of you somewhat.


Similarly, I had a run-in with American Express over 30 years ago  
and even to this day I return all their sales promotion in their  
self-addressed no-postage envelope they provide. Over the years, I  
suspect they have paid postage for over 100 pounds of profitless  
correspondence and the time for their staff to examine it.


You're not alone in doing this, but how much a dent do you really  
think you've made in their profits? It's like spam, if it wasn't worth  
doing they wouldn't do it. Your efforts would be better spent trying  
to get your address blacklisted... or learning Scala!



Now, do I have problems? Perhaps, but I'm happy. :-)


Good for you.

-Stut

--
http://stut.net/

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Ashley Sheridan
On Tue, 2008-09-16 at 10:59 -0400, tedd wrote:

 Similarly, I had a run-in with American Express over 30 years ago and 
 even to this day I return all their sales promotion in their 
 self-addressed no-postage envelope they provide. Over the years, I 
 suspect they have paid postage for over 100 pounds of profitless 
 correspondence and the time for their staff to examine it. 


I do the same with all that sort of post, but I recently found en evil
use for all of that spare change in the form of 1p's and 2p's... Funnily
enough, I've not had much for a while...


Ash
www.ashleysheridan.co.uk


Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Ashley Sheridan
On Tue, 2008-09-16 at 11:26 -0400, tedd wrote:
 At 11:57 PM +0100 9/15/08, Ashley Sheridan wrote:
 I agree on your point about trying before bashing. I've tried Vista.
 Hell, I had to use it for 2 months solid while I was working in India,
 so I really got to test it out. I had more crashes on that in the 2
 months I was using it than I had on Fedora in 2 years. Now, admittedly I
 was working on Vista during every working hour, and I only use my Fedora
 machine at weekends and evenings, but I think if you tally up the total
 time, it was really not in Windows' favour. As an OS, XP was not all
 that bad, but I've found I really do prefer the way Linux behaves, that
 and I can get pretty much whatever software I want for free, which just
 isn't always so easy with Windows.
 
 I spend at least 10 to 12 hours per day (including weekends) working 
 on my machine and I've been running my current Mac for over 6 years 
 with my Mac experience dating back to 1984 (the original 128k Mac, 
 which I still have).
 
 In the last 6 years, I remember my current Mac locking up only once 
 and that was on start-up after I had installed additional drive. I 
 had to hold the on button to get it to shut down. But, the next 
 boot was uneventful.
 
 Yet people think that the occasional crash is acceptable when working 
 with computers. I can only say, they must not be Mac people.
 
 Cheers,
 
 tedd
 
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
I rarely get any crashes with Linux, probably about the same as my
flatmate gets, on his Mac. Both are very stable and secure, which is
what you want from an OS. The OS is there to make your life easier, not
to get in the way with dozens of warning message, blockades and
workarounds.


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Eric Butera
On Tue, Sep 16, 2008 at 2:51 PM, Ashley Sheridan
[EMAIL PROTECTED] wrote:
 On Tue, 2008-09-16 at 11:26 -0400, tedd wrote:
 At 11:57 PM +0100 9/15/08, Ashley Sheridan wrote:
 I agree on your point about trying before bashing. I've tried Vista.
 Hell, I had to use it for 2 months solid while I was working in India,
 so I really got to test it out. I had more crashes on that in the 2
 months I was using it than I had on Fedora in 2 years. Now, admittedly I
 was working on Vista during every working hour, and I only use my Fedora
 machine at weekends and evenings, but I think if you tally up the total
 time, it was really not in Windows' favour. As an OS, XP was not all
 that bad, but I've found I really do prefer the way Linux behaves, that
 and I can get pretty much whatever software I want for free, which just
 isn't always so easy with Windows.

 I spend at least 10 to 12 hours per day (including weekends) working
 on my machine and I've been running my current Mac for over 6 years
 with my Mac experience dating back to 1984 (the original 128k Mac,
 which I still have).

 In the last 6 years, I remember my current Mac locking up only once
 and that was on start-up after I had installed additional drive. I
 had to hold the on button to get it to shut down. But, the next
 boot was uneventful.

 Yet people think that the occasional crash is acceptable when working
 with computers. I can only say, they must not be Mac people.

 Cheers,

 tedd

 --
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com

 I rarely get any crashes with Linux, probably about the same as my
 flatmate gets, on his Mac. Both are very stable and secure, which is
 what you want from an OS. The OS is there to make your life easier, not
 to get in the way with dozens of warning message, blockades and
 workarounds.


 Ash
 www.ashleysheridan.co.uk


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



I regularly use Windows XP  Vista, OS X, and Ubuntu.  All three do
exactly what I ask of them without crashes or errors.  I use them on a
variety of different hardware too.  Unfortunately in the year 2008 no
operating system is the ultimate solution for my needs.  I do have
lots of opinions good and bad on each of them.  I would say that
Ubuntu is my favorite though.

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Ashley Sheridan
On Tue, 2008-09-16 at 15:04 -0400, Eric Butera wrote:

 On Tue, Sep 16, 2008 at 2:51 PM, Ashley Sheridan
 [EMAIL PROTECTED] wrote:
  On Tue, 2008-09-16 at 11:26 -0400, tedd wrote:
  At 11:57 PM +0100 9/15/08, Ashley Sheridan wrote:
  I agree on your point about trying before bashing. I've tried Vista.
  Hell, I had to use it for 2 months solid while I was working in India,
  so I really got to test it out. I had more crashes on that in the 2
  months I was using it than I had on Fedora in 2 years. Now, admittedly I
  was working on Vista during every working hour, and I only use my Fedora
  machine at weekends and evenings, but I think if you tally up the total
  time, it was really not in Windows' favour. As an OS, XP was not all
  that bad, but I've found I really do prefer the way Linux behaves, that
  and I can get pretty much whatever software I want for free, which just
  isn't always so easy with Windows.
 
  I spend at least 10 to 12 hours per day (including weekends) working
  on my machine and I've been running my current Mac for over 6 years
  with my Mac experience dating back to 1984 (the original 128k Mac,
  which I still have).
 
  In the last 6 years, I remember my current Mac locking up only once
  and that was on start-up after I had installed additional drive. I
  had to hold the on button to get it to shut down. But, the next
  boot was uneventful.
 
  Yet people think that the occasional crash is acceptable when working
  with computers. I can only say, they must not be Mac people.
 
  Cheers,
 
  tedd
 
  --
  ---
  http://sperling.com  http://ancientstones.com  http://earthstones.com
 
  I rarely get any crashes with Linux, probably about the same as my
  flatmate gets, on his Mac. Both are very stable and secure, which is
  what you want from an OS. The OS is there to make your life easier, not
  to get in the way with dozens of warning message, blockades and
  workarounds.
 
 
  Ash
  www.ashleysheridan.co.uk
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 I regularly use Windows XP  Vista, OS X, and Ubuntu.  All three do
 exactly what I ask of them without crashes or errors.  I use them on a
 variety of different hardware too.  Unfortunately in the year 2008 no
 operating system is the ultimate solution for my needs.  I do have
 lots of opinions good and bad on each of them.  I would say that
 Ubuntu is my favorite though.


Would it be totally off topic if everyone were to say what their
favourite OS was and why? I'm just a little curious as to what OS's
people use in this field.


Ash
www.ashleysheridan.co.uk


Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Bastien Koert
On Tue, Sep 16, 2008 at 3:11 PM, Ashley Sheridan
[EMAIL PROTECTED]wrote:

 On Tue, 2008-09-16 at 15:04 -0400, Eric Butera wrote:

  On Tue, Sep 16, 2008 at 2:51 PM, Ashley Sheridan
  [EMAIL PROTECTED] wrote:
   On Tue, 2008-09-16 at 11:26 -0400, tedd wrote:
   At 11:57 PM +0100 9/15/08, Ashley Sheridan wrote:
   I agree on your point about trying before bashing. I've tried Vista.
   Hell, I had to use it for 2 months solid while I was working in
 India,
   so I really got to test it out. I had more crashes on that in the 2
   months I was using it than I had on Fedora in 2 years. Now,
 admittedly I
   was working on Vista during every working hour, and I only use my
 Fedora
   machine at weekends and evenings, but I think if you tally up the
 total
   time, it was really not in Windows' favour. As an OS, XP was not all
   that bad, but I've found I really do prefer the way Linux behaves,
 that
   and I can get pretty much whatever software I want for free, which
 just
   isn't always so easy with Windows.
  
   I spend at least 10 to 12 hours per day (including weekends) working
   on my machine and I've been running my current Mac for over 6 years
   with my Mac experience dating back to 1984 (the original 128k Mac,
   which I still have).
  
   In the last 6 years, I remember my current Mac locking up only once
   and that was on start-up after I had installed additional drive. I
   had to hold the on button to get it to shut down. But, the next
   boot was uneventful.
  
   Yet people think that the occasional crash is acceptable when working
   with computers. I can only say, they must not be Mac people.
  
   Cheers,
  
   tedd
  
   --
   ---
   http://sperling.com  http://ancientstones.com  http://earthstones.com
  
   I rarely get any crashes with Linux, probably about the same as my
   flatmate gets, on his Mac. Both are very stable and secure, which is
   what you want from an OS. The OS is there to make your life easier, not
   to get in the way with dozens of warning message, blockades and
   workarounds.
  
  
   Ash
   www.ashleysheridan.co.uk
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
  I regularly use Windows XP  Vista, OS X, and Ubuntu.  All three do
  exactly what I ask of them without crashes or errors.  I use them on a
  variety of different hardware too.  Unfortunately in the year 2008 no
  operating system is the ultimate solution for my needs.  I do have
  lots of opinions good and bad on each of them.  I would say that
  Ubuntu is my favorite though.


 Would it be totally off topic if everyone were to say what their
 favourite OS was and why? I'm just a little curious as to what OS's
 people use in this field.


 Ash
 www.ashleysheridan.co.uk


To paraphrase

 You are about to insult Microsoft. Cancel or Allow?

-- 

Bastien

Cat, the other other white meat


Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Ashley Sheridan
On Tue, 2008-09-16 at 16:50 -0400, Bastien Koert wrote:
 On Tue, Sep 16, 2008 at 3:11 PM, Ashley Sheridan
 [EMAIL PROTECTED]wrote:
 
  On Tue, 2008-09-16 at 15:04 -0400, Eric Butera wrote:
 
   On Tue, Sep 16, 2008 at 2:51 PM, Ashley Sheridan
   [EMAIL PROTECTED] wrote:
On Tue, 2008-09-16 at 11:26 -0400, tedd wrote:
At 11:57 PM +0100 9/15/08, Ashley Sheridan wrote:
I agree on your point about trying before bashing. I've tried Vista.
Hell, I had to use it for 2 months solid while I was working in
  India,
so I really got to test it out. I had more crashes on that in the 2
months I was using it than I had on Fedora in 2 years. Now,
  admittedly I
was working on Vista during every working hour, and I only use my
  Fedora
machine at weekends and evenings, but I think if you tally up the
  total
time, it was really not in Windows' favour. As an OS, XP was not all
that bad, but I've found I really do prefer the way Linux behaves,
  that
and I can get pretty much whatever software I want for free, which
  just
isn't always so easy with Windows.
   
I spend at least 10 to 12 hours per day (including weekends) working
on my machine and I've been running my current Mac for over 6 years
with my Mac experience dating back to 1984 (the original 128k Mac,
which I still have).
   
In the last 6 years, I remember my current Mac locking up only once
and that was on start-up after I had installed additional drive. I
had to hold the on button to get it to shut down. But, the next
boot was uneventful.
   
Yet people think that the occasional crash is acceptable when working
with computers. I can only say, they must not be Mac people.
   
Cheers,
   
tedd
   
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com
   
I rarely get any crashes with Linux, probably about the same as my
flatmate gets, on his Mac. Both are very stable and secure, which is
what you want from an OS. The OS is there to make your life easier, not
to get in the way with dozens of warning message, blockades and
workarounds.
   
   
Ash
www.ashleysheridan.co.uk
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
   
  
   I regularly use Windows XP  Vista, OS X, and Ubuntu.  All three do
   exactly what I ask of them without crashes or errors.  I use them on a
   variety of different hardware too.  Unfortunately in the year 2008 no
   operating system is the ultimate solution for my needs.  I do have
   lots of opinions good and bad on each of them.  I would say that
   Ubuntu is my favorite though.
 
 
  Would it be totally off topic if everyone were to say what their
  favourite OS was and why? I'm just a little curious as to what OS's
  people use in this field.
 
 
  Ash
  www.ashleysheridan.co.uk
 
 
 To paraphrase
 
  You are about to insult Microsoft. Cancel or Allow?
 
Hmm, not sure, both ways lead to a General Protection Fault...


Ash
www.ashleysheridan.co.uk


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



RE: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Boyd, Todd M.
 -Original Message-
 From: tedd [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2008 10:06 AM
 To: Stut; [EMAIL PROTECTED]
 Cc: Philip Thompson; PHP General list
 Subject: Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet
 Explorer 8 beater 2
 
 At 11:30 PM +0100 9/15/08, Stut wrote:
 Wow, talk about hitting the nail on the head. When Microsoft pick
 the hardware their OS runs on and the software it runs with it works
 perfectly.
 
 Not exactly.
 
 I seem to remember when Gates gave a presentation at Mac World and
 his slide show locked up. I actually felt sorry for the guy, but I
 had a cookie and the feeling passed.

I read a hilarious article not too long ago (just before Gates stepped
down as CEO.. or maybe after, but before he completely cut corporate
ties with MSFT) about Bill Gates' end user experience with Windows XP.
Needless to say: he was pissed off. Nothing worked like he wanted it to,
and he had to download 8 extra software packages and STILL didn't wind
up getting what he wanted (Windows Movie Maker).

I found it on Fark, maybe I can track it down again. Fantastic read.


Todd Boyd
Web Programmer




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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread tedd

At 7:40 PM +0100 9/16/08, Stut wrote:

On 16 Sep 2008, at 15:59, tedd wrote:
Then one day, M$ sent out notice that they would no longer support 
QuickBasic and that was the end of that. All of our current, and 
past work, was on a dead-end street. We were left to fend for 
ourselves.


I don't mean any disrespect but devoting your livelihood on a 
technology with a single provider is probably not the smartest move 
you've made.


No offense taken and what you say at face value is true. However, 
that was a past lifetime -- how smart were you 20 years ago?


And I didn't really devote MY livelihood to one technology nor 
industry for that matter -- never have. That's the reason why I have 
several businesses going concurrently. I just wished one of them 
would hit the log-ball so I could retire and program for a hobby.


---

It's not nice for Microsoft to have pulled support for it but 
they're a business and they made that decision because they didn't 
see a profitable future there, they weren't out to screw you.


Of course they were not out to screw me, but even if they were, 
that's not relevant.


I think the important point here is that if you create a development 
product which requires others to have faith in you, then you also 
inherent a responsibility to those who have invested their time into 
helping you secure your product. Software development is a symbiotic 
relationship.


If you want to pull the plug and cut that relationship, that's your 
choice. But that action comes with a cost. From my perspective, M$ is 
just reaping what it sowed.


Besides, grant me my windmills to tilt.

---

Imagine if PHP suddenly stopped development and you had to find a 
different language (i.e., ruby). Sure we could all do it, but we 
picked this language for a reason and now we have to choose again 
-- and perhaps that choice was our second choice. I don't like 
being forced to settle for my second choice.


Speaking only for myself I would have no problem with it at all, for 
a few reasons...


I've been there before and survived -- like you, I have numerous 
languages under my belt -- in fact they all look the same to me now. 
So, that wouldn't be a big problem, just an annoying one.


---

Now, should have M$ continued to support a product that wasn't 
making sufficient money for them? I dunno, but I don't care either 
-- they screwed with my life and I'll spend the rest of it calling 
M$, M$.


That's your choice, but don't take offence when I say that's changed 
my opinion of you somewhat.


No offense taken, but if your opinion of me has changed over that, be 
advised I've done far worse than name calling.


I realize that you take the high-road on things like this -- I 
respect that -- that used to be my practice as well. It's very 
predicable from a business perspective. But times change and I kind 
of like telling people what I really think -- somewhat like the 
member of the family who no longer cares if he farts in public -- if 
you get the drift.


---

Similarly, I had a run-in with American Express over 30 years ago 
and even to this day I return all their sales promotion in their 
self-addressed no-postage envelope they provide. Over the years, I 
suspect they have paid postage for over 100 pounds of profitless 
correspondence and the time for their staff to examine it.


You're not alone in doing this, but how much a dent do you really 
think you've made in their profits? It's like spam, if it wasn't 
worth doing they wouldn't do it. Your efforts would be better spent 
trying to get your address blacklisted... or learning Scala!


Well... that was the idea, to get blacklisted. Just about every thing 
I sent back had my address on it and included a message which 
basically said This what I think of your service and you just paid 
the postage for me to say it. Now take me off your list! But, it 
hasn't happened yet.


How much has it cost them? I could estimate, but I'm sure the total 
amount wouldn't be substantial. However, if everyone did what I do, 
then spam mail would halt pretty quick. Companies don't like spending 
more than they take in on anything.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Robert Cummings
On Tue, 2008-09-16 at 18:54 -0400, tedd wrote:

 I realize that you take the high-road on things like this -- I 
 respect that -- that used to be my practice as well. It's very 
 predicable from a business perspective. But times change and I kind 
 of like telling people what I really think -- somewhat like the 
 member of the family who no longer cares if he farts in public -- if 
 you get the drift.

Mother of Mercy... it's drifitng over here!! LIGHT A MATCH!

:B

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread tedd

At 8:11 PM +0100 9/16/08, Ashley Sheridan wrote:
Would it be totally off topic if everyone were to say what their 
favourite OS was and why? I'm just a little curious as to what OS's 
people use in this field.


Obviously, mine is Mac and OSX 10.4.11. My next one will be whatever 
is the top of the line Apple has at the time I have to money for it.


Why?

Long story -- I won't go into my pre-Apple days building various 
computers, but I started my relationship with Apple in 1977 when I 
bought a mail order a 16k integer Apple ][. I wrote a lot of software 
for the critter as it evolved over the years.


I bought my first Mac in 1984, and have continued with Mac's ever since.

My current system provides me with everything I want better than any 
development system I have had before -- and I've had many. I don't 
want to change to something else, because this works great for me and 
until I'm faced with something I can't do, then I'll continue the 
current course.


But another consideration -- I watched the micro-computer industry 
change from kids in a garage wanting to show the world what they 
can do -- to the world's largest corporations maximizing profits.


Sure the kids in a garage have matured and care about profits like 
any other business, but they still seem to want to show people what 
they can do rather than maximizing profits. There appears to be a 
difference, at least to me.


So, partly what I have chosen is not only based upon on how stable 
the platform is, and what it can do for me, but what I perceive the 
parent company to be. Call it naive if you want, maybe I'm just a 
treckie who doesn't know any better, or some washed up has-been -- 
but -- I've done some amazing things in programming efforts by simply 
not knowing better and relying on Apple to do their part. Thus far, 
they haven't let me down -- at least from a product point of view.


With respect to management, advertising, and establishing their 
product as their product should be, they suck! How someone can lose 
the market share to a problem prone second rate product is beyond me 
-- but, that's another topic.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-16 Thread Ross McKay
On Tue, 16 Sep 2008 20:11:22 +0100, Ashley Sheridan wrote:

Would it be totally off topic if everyone were to say what their
favourite OS was and why? I'm just a little curious as to what OS's
people use in this field.

Likely yes, but: Fedora 9 works nicely for me and SWMBO. Essentially
though, any Linux with a decent desktop manager would do. I just wish I
could find a Linux-native data modelling tool I liked, then I could
ditch WinXP for all except testing in IE! :)

(actually, not quite true; some customers manage to create incredible
concoctions in Microsoft Word that just don't come across right in any
Linux word processor, so I still need to open up Microsoft Word
occasionally)
-- 
Ross McKay, Toronto, NSW Australia
Let the laddie play wi the knife - he'll learn
- The Wee Book of Calvin

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



[PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Colin Guthrie

Sancar Saran wrote:

Don't expect anything good from M$...


Oh I don't expect anything good from them, never have, never will, but 
that still doesn't change my point that sunset dates would probably be 
better for them in the long run... looking for a reason up upgrade a 
subborn user who wont drink the vista kool aid? Stop them surfing and 
get them to upgrade!


Other browsers muscling in? just make IE not suck and deploy it on older 
OSes.. It's not really that hard to do (or wouldn't have been if IE 
wasn't a critial part of the OS!).


Still not holding out much hope and there is not much point in musing 
over what could have's, but I really do hope that future browsers have 
this built in (again not much hope!)


Col

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Luke
I wouldn't say Microsoft are strictly anti-web, anymore.

They appear to be changing the model of their next operating system to cater
for 'the cloud.'

I think they finally see that they missed the Internet, and they need it?

2008/9/12 Colin Guthrie [EMAIL PROTECTED]

 Sancar Saran wrote:

 Don't expect anything good from M$...


 Oh I don't expect anything good from them, never have, never will, but that
 still doesn't change my point that sunset dates would probably be better for
 them in the long run... looking for a reason up upgrade a subborn user who
 wont drink the vista kool aid? Stop them surfing and get them to upgrade!

 Other browsers muscling in? just make IE not suck and deploy it on older
 OSes.. It's not really that hard to do (or wouldn't have been if IE wasn't a
 critial part of the OS!).

 Still not holding out much hope and there is not much point in musing over
 what could have's, but I really do hope that future browsers have this
 built in (again not much hope!)

 Col

 --

 Colin Guthrie
 gmane(at)colin.guthr.ie
 http://colin.guthr.ie/

 Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
 Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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




-- 
Luke Slater


Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Lester Caine

Colin Guthrie wrote:

Sancar Saran wrote:

Don't expect anything good from M$...


Oh I don't expect anything good from them, never have, never will, but 
that still doesn't change my point that sunset dates would probably be 
better for them in the long run... looking for a reason up upgrade a 
subborn user who wont drink the vista kool aid? Stop them surfing and 
get them to upgrade!


Except that this is the same argument that has been applied to PHP4. There is 
nothing stopping people continuing to use PHP4 if they want to. Finally it is 
just not being supported.


M$ want to end of life XP, but ITX and similar small profile systems simply 
can't even load Vista so what do we use then? These boxes are happier running 
W2k!
Linux goes on fine, and in many cases all you need is a browser running 
accessing pages on the PHP server. But when a customer says NO to Linux where 
can one go? At least my sites are now happier to accept Linux simply because 
many have not STARTED moving to XP and already they have assessed that they 
can't afford the hardware upgrade for Vista!


M$ may want to kill off older versions of windows, but they are also killing 
off whole swaths of customers in the process?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



[PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Colin Guthrie

Lester Caine wrote:

Colin Guthrie wrote:

Sancar Saran wrote:

Don't expect anything good from M$...


Oh I don't expect anything good from them, never have, never will, but 
that still doesn't change my point that sunset dates would probably be 
better for them in the long run... looking for a reason up upgrade a 
subborn user who wont drink the vista kool aid? Stop them surfing and 
get them to upgrade!


Except that this is the same argument that has been applied to PHP4. 
There is nothing stopping people continuing to use PHP4 if they want to. 
Finally it is just not being supported.


That's different tho'. Being limited to PHP 4 is the choice of the 
people who deploy the application. Those same people cannot choose how 
said application is *consumed*, which then limits what techniques they 
can use with confidence etc. So this argument doesn't really apply here.


M$ want to end of life XP, but ITX and similar small profile systems 
simply can't even load Vista so what do we use then? These boxes are 
happier running W2k!


Which goes back to my previous point whereby if MS do not support their 
IE in older distros... sorry OSes, and people do not want to upgrade, 
then other browsers should fill that void. It's a MS choice pure and 
simple as to whether they support their own older products.


M$ may want to kill off older versions of windows, but they are also 
killing off whole swaths of customers in the process?


Well they either create a browser that continues to work for their older 
OS's or let someone else do it. If there is a need then someone will 
fill it, that's the point.


A sunset date for old browsers would take any assessment out of the 
equation.


Most devs stop supporting older browsers at some point, but the trick is 
knowing exactly when to do it, and doing so in a way that still allows 
commercial web developers to cater for their target audience. Many 
people running older, outdated browsers simply don't know they are out 
of date, but if this information is much closer to the surface (e.g. 
every time they start their browser and consistent and persistent 
nagging), then they would know about it and perhaps look at rectifying 
the situation so that they can have a better web experience and 
developers can focus on the important aspects of their projects rather 
than spending countless hours catering for obsoleted but still used 
products.



Col



--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Philip Thompson

On Sep 12, 2008, at 3:13 AM, Colin Guthrie wrote:


Sancar Saran wrote:

Don't expect anything good from M$...


Oh I don't expect anything good from them, never have, never will,


[snip!]

Ok, let's not forget about the Xbox! ;)

~Philip


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



RE: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Boyd, Todd M.
 -Original Message-
 From: Sancar Saran [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 11, 2008 6:15 PM
 To: php-general@lists.php.net
 Subject: Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet
 Explorer 8 beater 2
 
 Because,
 
 M$ earning money from Win GUI. No WinGUI no money.
 
 From the begining, M$ try to broke web compatibilty in every way...
 
 Sure M$ has bad records about software quality. But even ask yourself.
 WHY IE
 (especially 5 and 6) SO buggy even M$ standards.
 
 M$ isn't mr nice guy and they wont get a dime from web.
 
 They hate web and internet from begining.
 
 M$ is anti web IT company. They are too big they are to bold (or bald)
 to
 accept changing market and they got too much money on
 bank to do someting very very stupid.
 
 Like Windows VISTA.
 
 Don't expect anything good from M$...

tirade

Okay... here it goes. I'm sick and tired of people talking trash on Windows 
Vista. It came pre-installed on my laptop (Home Premium... not Business Pro, 
sadly) and I haven't had any issues with it whatsoever. Some of my WinXP 
programs don't show up in the start menu when they're installed... but it's not 
Microsoft's fault that software companies haven't taken the initiative to adapt 
to the new Vista framework (which, let's be honest, can't require all that much 
effort in most cases where base-level operating system stuff isn't involved in 
the actual program).

Annoyed with the UAC that asks you to confirm every administrative decision you 
make on your computer? Quit being a weenie and just automate it with RegEdit 
(or, if you're using Business, there is an explicit option for it in the 
Control Panel).

Annoyed with all the bells and whistles in the Aero theme that is installed by 
default? Don't use it! I remember the first time I installed a Linux distro 
that came pre-bundled with KDE... I took the time to remove all the fading, 
transparency, window animations, bouncing cursors, etc. (actually, I just 
switched to XFCE instead). I don't see the difference. If you want to get high 
and mighty with a retort about rolling your own Linux distribution--well, 
you've just sailed far beyond ANY pre-packaged OS (Mac, Windows, Linux, or 
otherwise) and the point is moot.

Find a new scapegoat to complain about, PLEASE. Bitch about WebKit's lack of 
XMLDOM instantiation. Bitch about Google launching pay-for-play high resolution 
satellite imagery. Bitch about the Xandros EEE being squashed by Intel. Bitch 
about Facebook's API and their draconic limitations on markup language and 
Javascript... but this Vista sucks and I won't comment as to why broken 
record has run its course.

/tirade

Have a lovely day!


Todd Boyd
Web Programmer





Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Rahul S. Johari


On Sep 12, 2008, at 10:18 AM, Boyd, Todd M. wrote:


-Original Message-
From: Sancar Saran [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 11, 2008 6:15 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet
Explorer 8 beater 2

Because,

M$ earning money from Win GUI. No WinGUI no money.

From the begining, M$ try to broke web compatibilty in every way...

Sure M$ has bad records about software quality. But even ask  
yourself.

WHY IE
(especially 5 and 6) SO buggy even M$ standards.

M$ isn't mr nice guy and they wont get a dime from web.

They hate web and internet from begining.

M$ is anti web IT company. They are too big they are to bold (or  
bald)

to
accept changing market and they got too much money on
bank to do someting very very stupid.

Like Windows VISTA.

Don't expect anything good from M$...


tirade

Okay... here it goes. I'm sick and tired of people talking trash on  
Windows Vista. It came pre-installed on my laptop (Home Premium...  
not Business Pro, sadly) and I haven't had any issues with it  
whatsoever. Some of my WinXP programs don't show up in the start  
menu when they're installed... but it's not Microsoft's fault that  
software companies haven't taken the initiative to adapt to the new  
Vista framework (which, let's be honest, can't require all that much  
effort in most cases where base-level operating system stuff isn't  
involved in the actual program).


Annoyed with the UAC that asks you to confirm every administrative  
decision you make on your computer? Quit being a weenie and just  
automate it with RegEdit (or, if you're using Business, there is an  
explicit option for it in the Control Panel).


Annoyed with all the bells and whistles in the Aero theme that is  
installed by default? Don't use it! I remember the first time I  
installed a Linux distro that came pre-bundled with KDE... I took  
the time to remove all the fading, transparency, window animations,  
bouncing cursors, etc. (actually, I just switched to XFCE instead).  
I don't see the difference. If you want to get high and mighty with  
a retort about rolling your own Linux distribution--well, you've  
just sailed far beyond ANY pre-packaged OS (Mac, Windows, Linux, or  
otherwise) and the point is moot.


Find a new scapegoat to complain about, PLEASE. Bitch about WebKit's  
lack of XMLDOM instantiation. Bitch about Google launching pay-for- 
play high resolution satellite imagery. Bitch about the Xandros EEE  
being squashed by Intel. Bitch about Facebook's API and their  
draconic limitations on markup language and Javascript... but this  
Vista sucks and I won't comment as to why broken record has run  
its course.


/tirade

Have a lovely day!


Todd Boyd
Web Programmer




Three  Votes Todd!! In total agreement.
I've been meaning to make a similar post  statement not just here (in  
PHP mailing list), but in an abundant number of places all across the  
Internet horizon. And My PC didn't come bundled with Vista, in fact, I  
actually Upgraded from XP personally  manually.


I have no stock options in Microsoft, and I have nothing personal with  
them - Just another commodity user/customer. And I couldn't have said  
it any better.


Cheers!

---
Rahul Sitaram Johari
Founder, Internet Architects Group, Inc.

[Email] [EMAIL PROTECTED]
[Web]   http://www.rahulsjohari.com





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



[PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Colin Guthrie

Boyd, Todd M. wrote:

tirade

Okay... here it goes. I'm sick and tired of people talking trash on Windows 
Vista. It came pre-installed on my laptop (Home Premium... not Business Pro, 
sadly) and I haven't had any issues with it whatsoever. Some of my WinXP 
programs don't show up in the start menu when they're installed... but it's not 
Microsoft's fault that software companies haven't taken the initiative to adapt 
to the new Vista framework (which, let's be honest, can't require all that much 
effort in most cases where base-level operating system stuff isn't involved in 
the actual program).

Annoyed with the UAC that asks you to confirm every administrative decision you 
make on your computer? Quit being a weenie and just automate it with RegEdit 
(or, if you're using Business, there is an explicit option for it in the 
Control Panel).

Annoyed with all the bells and whistles in the Aero theme that is installed by 
default? Don't use it! I remember the first time I installed a Linux distro 
that came pre-bundled with KDE... I took the time to remove all the fading, 
transparency, window animations, bouncing cursors, etc. (actually, I just 
switched to XFCE instead). I don't see the difference. If you want to get high 
and mighty with a retort about rolling your own Linux distribution--well, 
you've just sailed far beyond ANY pre-packaged OS (Mac, Windows, Linux, or 
otherwise) and the point is moot.

Find a new scapegoat to complain about, PLEASE. Bitch about WebKit's lack of XMLDOM 
instantiation. Bitch about Google launching pay-for-play high resolution satellite 
imagery. Bitch about the Xandros EEE being squashed by Intel. Bitch about Facebook's API 
and their draconic limitations on markup language and Javascript... but this Vista 
sucks and I won't comment as to why broken record has run its course.

/tirade


All well and good. Use what you like etc. etc., I'm all for freedom, but 
that still doesn't mean that we wont be stuck using the legacy Vista 
IE8 in 10 years time because we don't want to upgrade to Windows ZX 48 
or whatever at the time. And IE8 doesn't even support CSS 5 or HTML 7!!! 
I mean it's just sooo last decade and I don't want to have to have 
to spend extra time catering for people who still insist on using it.


| s,IE8,IE/Firefox/Opera/Safari/etc,

The fact it's MS to me doesn't matter here. The same logic applies to 
all browsers. I still think that sunset dates for web browsers is a good 
idea.


Col

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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



RE: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Boyd, Todd M.
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Colin Guthrie
 Sent: Friday, September 12, 2008 9:44 AM
 To: php-general@lists.php.net
 Subject: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet
 Explorer 8 beater 2
 
 Boyd, Todd M. wrote:
  tirade
 
  Okay... here it goes. I'm sick and tired of people talking trash on
 Windows Vista. It came pre-installed on my laptop (Home Premium... not
 Business Pro, sadly) and I haven't had any issues with it whatsoever.
 Some of my WinXP programs don't show up in the start menu when they're
 installed... but it's not Microsoft's fault that software companies
 haven't taken the initiative to adapt to the new Vista framework
 (which, let's be honest, can't require all that much effort in most
 cases where base-level operating system stuff isn't involved in the
 actual program).
 
  Annoyed with the UAC that asks you to confirm every administrative
 decision you make on your computer? Quit being a weenie and just
 automate it with RegEdit (or, if you're using Business, there is an
 explicit option for it in the Control Panel).
 
  Annoyed with all the bells and whistles in the Aero theme that is
 installed by default? Don't use it! I remember the first time I
 installed a Linux distro that came pre-bundled with KDE... I took the
 time to remove all the fading, transparency, window animations,
 bouncing cursors, etc. (actually, I just switched to XFCE instead). I
 don't see the difference. If you want to get high and mighty with a
 retort about rolling your own Linux distribution--well, you've just
 sailed far beyond ANY pre-packaged OS (Mac, Windows, Linux, or
 otherwise) and the point is moot.
 
  Find a new scapegoat to complain about, PLEASE. Bitch about WebKit's
 lack of XMLDOM instantiation. Bitch about Google launching pay-for-play
 high resolution satellite imagery. Bitch about the Xandros EEE being
 squashed by Intel. Bitch about Facebook's API and their draconic
 limitations on markup language and Javascript... but this Vista sucks
 and I won't comment as to why broken record has run its course.
 
  /tirade
 
 All well and good. Use what you like etc. etc., I'm all for freedom,
 but
 that still doesn't mean that we wont be stuck using the legacy Vista
 IE8 in 10 years time because we don't want to upgrade to Windows ZX
 48
 or whatever at the time. And IE8 doesn't even support CSS 5 or HTML
 7!!!
 I mean it's just sooo last decade and I don't want to have to have
 to spend extra time catering for people who still insist on using it.
 
 | s,IE8,IE/Firefox/Opera/Safari/etc,
 
 The fact it's MS to me doesn't matter here. The same logic applies to
 all browsers. I still think that sunset dates for web browsers is a
 good
 idea.

I agree wholeheartedly. Also, I despise Internet Explorer with the vehemence of 
a rabid dog. One of the sort-of-legacy web applications used where I work bombs 
out in IE every now and again due to the way IE handles cookies and sessions. 
It fails at random (seemingly), and I've tried every security and privacy 
setting imaginable to try to get it to work again. I had the EXTREME pleasure 
yesterday of telling one of the staff that I didn't care that she liked 
Internet Explorer--Firefox (or even Safari/Google/MOSAIC/WHATEVER) never had 
the same problem, and that she was required to install it in place of Internet 
Explorer in order for the app to function as intended. Booyah!

Granted, that's not exactly the most professional solution. However, it works 
100% of the time, and I don't have a month to dedicate to investigating every 
session/cookie flaw in Internet Explorer and patching either the person's 
installation or the back-end web application.

Every now and again, the bureaucratic paranoia over spent man-hours works in my 
favor.


Todd Boyd
Web Programmer





RE: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Robert Cummings
On Fri, 2008-09-12 at 09:18 -0500, Boyd, Todd M. wrote:
 tirade
 
 Okay... here it goes. I'm sick and tired of people talking trash on
 Windows Vista. It came pre-installed on my laptop (Home Premium... not
 Business Pro, sadly) and I haven't had any issues with it whatsoever.
 Some of my WinXP programs don't show up in the start menu when they're
 installed... but it's not Microsoft's fault that software companies
 haven't taken the initiative to adapt to the new Vista framework
 (which, let's be honest, can't require all that much effort in most
 cases where base-level operating system stuff isn't involved in the
 actual program).
 
 Annoyed with the UAC that asks you to confirm every administrative
 decision you make on your computer? Quit being a weenie and just
 automate it with RegEdit (or, if you're using Business, there is an
 explicit option for it in the Control Panel).
 
 Annoyed with all the bells and whistles in the Aero theme that is
 installed by default? Don't use it! I remember the first time I
 installed a Linux distro that came pre-bundled with KDE... I took the
 time to remove all the fading, transparency, window animations,
 bouncing cursors, etc. (actually, I just switched to XFCE instead). I
 don't see the difference. If you want to get high and mighty with a
 retort about rolling your own Linux distribution--well, you've just
 sailed far beyond ANY pre-packaged OS (Mac, Windows, Linux, or
 otherwise) and the point is moot.
 
 Find a new scapegoat to complain about, PLEASE. Bitch about WebKit's
 lack of XMLDOM instantiation. Bitch about Google launching
 pay-for-play high resolution satellite imagery. Bitch about the
 Xandros EEE being squashed by Intel. Bitch about Facebook's API and
 their draconic limitations on markup language and Javascript... but
 this Vista sucks and I won't comment as to why broken record has run
 its course.
 
 /tirade

I could give you some of your arguments... but Microsoft is still a big
chunk of crap to swallow due to their artificial attempts to force users
to adopt Vista despite the fact the majority of their users want to
continue using XP.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



RE: [PHP] Re: Why MS Won't Retire Browsers -- was: InterntetExplorer 8 beater 2

2008-09-12 Thread Boyd, Todd M.
 -Original Message-
 From: Robert Cummings [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 12, 2008 1:11 PM
 To: Boyd, Todd M.
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] Re: Why MS Won't Retire Browsers -- was:
 InterntetExplorer 8 beater 2

---8--- snip

  /tirade
 
 I could give you some of your arguments... but Microsoft is still a
big
 chunk of crap to swallow due to their artificial attempts to force
 users
 to adopt Vista despite the fact the majority of their users want to
 continue using XP.

No doubt. I don't agree with their practices or their support. I'm
just saying... Vista itself isn't really anything to get up in arms
about. Windows is Windows is Microsoft is Microsoft. If you think it
sucks, well... it all sucks. :D


Todd Boyd
Web Programmer




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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Ashley Sheridan
Wow, anyone could be mistaken for thinking you two were Microshaft
employees...

tirade

Vista sucks because:

* it uses far more memory than it should, even with the visual effects
turned off
* IE7 on Vista is more flaky than IE7 on XP FACT!
* The registry hacks to get around the draconian limits on Vista are not
easily applied for all users
* It's a battle trying to edit what it thinks are system files, even if
they're not
* It doesn't really offer all that much over XP

/tirade

And I even have one for IE7 if you really want to hear it:

tirade

* They've moved all the buttons around to a non-standard layout (hmm,
remind me of Office 2007)
* They changed the rendering method *again*
* Still no support for some really standard CSS
* For a browser with half the components in memory, it still takes too
long to start up
* More security holes than any other browser

/tirade

I'd go on, but I don't want to write a university thesis...


Ash
www.ashleysheridan.co.uk
---BeginMessage---


On Sep 12, 2008, at 10:18 AM, Boyd, Todd M. wrote:


-Original Message-
From: Sancar Saran [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 11, 2008 6:15 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet
Explorer 8 beater 2

Because,

M$ earning money from Win GUI. No WinGUI no money.

From the begining, M$ try to broke web compatibilty in every way...

Sure M$ has bad records about software quality. But even ask  
yourself.

WHY IE
(especially 5 and 6) SO buggy even M$ standards.

M$ isn't mr nice guy and they wont get a dime from web.

They hate web and internet from begining.

M$ is anti web IT company. They are too big they are to bold (or  
bald)

to
accept changing market and they got too much money on
bank to do someting very very stupid.

Like Windows VISTA.

Don't expect anything good from M$...


tirade

Okay... here it goes. I'm sick and tired of people talking trash on  
Windows Vista. It came pre-installed on my laptop (Home Premium...  
not Business Pro, sadly) and I haven't had any issues with it  
whatsoever. Some of my WinXP programs don't show up in the start  
menu when they're installed... but it's not Microsoft's fault that  
software companies haven't taken the initiative to adapt to the new  
Vista framework (which, let's be honest, can't require all that much  
effort in most cases where base-level operating system stuff isn't  
involved in the actual program).


Annoyed with the UAC that asks you to confirm every administrative  
decision you make on your computer? Quit being a weenie and just  
automate it with RegEdit (or, if you're using Business, there is an  
explicit option for it in the Control Panel).


Annoyed with all the bells and whistles in the Aero theme that is  
installed by default? Don't use it! I remember the first time I  
installed a Linux distro that came pre-bundled with KDE... I took  
the time to remove all the fading, transparency, window animations,  
bouncing cursors, etc. (actually, I just switched to XFCE instead).  
I don't see the difference. If you want to get high and mighty with  
a retort about rolling your own Linux distribution--well, you've  
just sailed far beyond ANY pre-packaged OS (Mac, Windows, Linux, or  
otherwise) and the point is moot.


Find a new scapegoat to complain about, PLEASE. Bitch about WebKit's  
lack of XMLDOM instantiation. Bitch about Google launching pay-for- 
play high resolution satellite imagery. Bitch about the Xandros EEE  
being squashed by Intel. Bitch about Facebook's API and their  
draconic limitations on markup language and Javascript... but this  
Vista sucks and I won't comment as to why broken record has run  
its course.


/tirade

Have a lovely day!


Todd Boyd
Web Programmer




Three  Votes Todd!! In total agreement.
I've been meaning to make a similar post  statement not just here (in  
PHP mailing list), but in an abundant number of places all across the  
Internet horizon. And My PC didn't come bundled with Vista, in fact, I  
actually Upgraded from XP personally  manually.


I have no stock options in Microsoft, and I have nothing personal with  
them - Just another commodity user/customer. And I couldn't have said  
it any better.


Cheers!

---
Rahul Sitaram Johari
Founder, Internet Architects Group, Inc.

[Email] [EMAIL PROTECTED]
[Web]   http://www.rahulsjohari.com





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


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

RE: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-12 Thread Robert Cummings
On Fri, 2008-09-12 at 09:18 -0500, Boyd, Todd M. wrote:
 tirade
 
 Okay... here it goes. I'm sick and tired of people talking trash on
 Windows Vista. It came pre-installed on my laptop (Home Premium... not
 Business Pro, sadly) and I haven't had any issues with it whatsoever.
 Some of my WinXP programs don't show up in the start menu when they're
 installed... but it's not Microsoft's fault that software companies
 haven't taken the initiative to adapt to the new Vista framework
 (which, let's be honest, can't require all that much effort in most
 cases where base-level operating system stuff isn't involved in the
 actual program).
 
 Annoyed with the UAC that asks you to confirm every administrative
 decision you make on your computer? Quit being a weenie and just
 automate it with RegEdit (or, if you're using Business, t. I must have written literally a 
 million emails like this in the past week... :p
 
 Col
 
 -- 
 
 Colin Guthrie
 gmane(at)colin.guthr.ie
 http://colin.guthr.ie/
 
 Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
 Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
 
 
Ooh, well played ;)


Ash
www.ashleysheridan.co.uk


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



[PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-11 Thread Colin Guthrie

Micah Gersten wrote:

The problem is that if you're running on older hardware, IE7 might be
too CPU intensive to run correctly.  That's why MS won't set Sunset
Dates for an old browser.  They instead set the Sunset Dates for the OS
and that's how they make things out of date.  They say upgrade the OS. 
Matter of philosophy.  The problem is that the new OS won't run on the

old hardware and costs lots of money so people don't upgrade.  Remember,
MS is for profit.  If you can just upgrade your browser, they don't make
any money.  If you upgrade your OS, they do.


Fair point but if people are using old OSes and MS want them to upgrade 
to a newer versin, breaking their ability to surf the web isn't a 
carrot, but it makes a pretty good stick.


Col

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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



Re: [PHP] Re: Why MS Won't Retire Browsers -- was: Interntet Explorer 8 beater 2

2008-09-11 Thread Sancar Saran
Because,

M$ earning money from Win GUI. No WinGUI no money.

From the begining, M$ try to broke web compatibilty in every way...

Sure M$ has bad records about software quality. But even ask yourself. WHY IE 
(especially 5 and 6) SO buggy even M$ standards.

M$ isn't mr nice guy and they wont get a dime from web.

They hate web and internet from begining.

M$ is anti web IT company. They are too big they are to bold (or bald) to 
accept changing market and they got too much money on 
bank to do someting very very stupid.

Like Windows VISTA.

Don't expect anything good from M$...

Regards

Sancar

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



[PHP] Re: why are passwords stored encrypted in databases even when the datathey protect is stored in the same database?

2008-06-13 Thread M. Sokolewicz

Dietrich Bollmann wrote:

Hi,

As far as I remember, in all books I read about PHP and SQL, the
password was stored in an encrypted form, even when all the data which
should be protected by the password was stored in the same database.

Can anybody tell me what is the motivation behind this approach?
If somebody hacks the database, he has the data anyway; if he doesn't,
he can't retrieve the password, encrypted or not.

I am asking because I would like to implement a simple file server.
A user would upload his files and get them listed on his user page.  If
he wants to allow some other person to download the file, he pushes a
button beside the file entry in the listing and a page opens where he
can enter the email of the other person.  An email is send with the link
where the file can be found and a password included...

The person who asked me to write this file server wants everybody who to
receive the same link together with the same password for the same file.
In order to implement this approach, the password has to be stored
somewhere...

I thought about storing the password as it is in the database - but
somehow wonder why this never was done in any of the books I read...

By the way: in most cases, when pushing the I forgot my password
button, an email with a user name and a link to activate the password is
generated.  Anybody who gets into the possession of the email could
access the data...  Should I rather send two emails, one with the link,
one with the new password?

Thanks for your help :)

Dietrich


Assuming that noone will ever get direct access to your database or is 
able to access the password directly: there is no need for any type of 
encryption. However, people usually write code which may (and will most 
of the time) containt exploitable sections which might give a malicious 
user the ability to get a dump of the database. A password dump is 
always interesting, since it gives a LOT of information. People usually 
don't use 1 password per login, but rather have a standard password 
for most things.
Now, if it were unprotected, the person getting the information can 
instantly log in as that user, or if he wants might even take over that 
person's identity in other places (rare, but it happens). If it were 
protected by encryption of some kind then it would first need to be 
decrypted to be usable (unless there is a designflaw which makes this 
unnecessery as has been the case in a few messageboards a few years ago).
Now, you can either encrypt or hash your passwords. Hashes are one-way, 
encryption two-way. If the malicious user gets hold of a hash: he'll 
still not have anything useful in his hands. He might make a reverse 
lookup table and figure out the password from that (though there's an 
infinite number of possible inputs for each single [hash] output), but 
add a salt and don't put that in the database and the user has a low 
chance of ever finding out what it was. But, just as the malicious user 
can't figure out what the password was, neither can you: so goodby 
lost-password feature. Instead you'd have to regenerate a new password 
and send that over, or do some other fancy magic which doesn't involve 
sending the current password as-is, since you don't know it either.
If you were to use encryption there, you could always decrypt it. If you 
have the key. Storing the key separately from the encrypted password 
would make this quite safe. enctpyed_string = (data + key), if you know 
neither the data nor the key, things get very tough. Because you know 
the key, you can figure out the password and make a forgot-password 
feature easily which sends out the actual password.
But, because your key is publicly available (if your page has to use it, 
then it's automatically publicly available, maybe not easily, but a 
malicious user which managed to get hold of a full password table, could 
just aswell get hold of the key for the encryption)!
Putting in neither, so just keeping the passwords in their plain form is 
safe. As long as noone _ever_ sees them. Guarantee that and you won't 
have to bother with hashing/encrypting. If you can't guarantee it, build 
in some extra safety in the form of hashing and/or encrypting.


hope that explains it all a bit,
- tul


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



[PHP] Re: why are passwords stored encrypted in databases even when the datathey protect is stored in the same database?

2008-06-13 Thread Dietrich Bollmann
Hi tul, 

So this was a very long and informative answer :)
Thank you very much!

On Fri, 2008-06-13 at 12:02 +0200, M. Sokolewicz wrote:
 [...] However, people usually write code which may (and will most 
 of the time) containt exploitable sections which might give a malicious 
 user the ability to get a dump of the database. A password dump is 
 always interesting, since it gives a LOT of information. People usually 
 don't use 1 password per login, but rather have a standard password 
 for most things.

So if the user is allowed to change his password, it should be encrypted
always as there are chances that the same password is used at some other
place?  That makes a lot of sense to me :)

If all passwords are generated by the system on the other hand and the
user is not allowed to change his password, if further all the protected
data is in the same database as the password, there would be no need for
encrypting the passwords following your argumentation?

But if some information is stored outside the database - in my case
(simple file server) for example, the database only contains the file
meta-data while the files themselves are stored in some data directory
on the server - some malicious user who would have broken into the
database could get hold of the files if the passwords are stored
unencrypted;  if some encryption scheme would have been used on the
other hand the data found in the database wouldn't be of any use at all?

And if the password should be recoverable some encryption with a key
stored somewhere else would force the hacker to break into two systems,
the database itself and the system which is used to store the key.

That makes sense also.  I didn't think about the fact that database and
a directory on the server are two different things which would have to
be hacked separately.  So I am happy about writing my mail and getting
such a nice answer before implementing some stupid password logic
myself :)

 Now, if it were unprotected, the person getting the information can 
 instantly log in as that user, or if he wants might even take over that 
 person's identity in other places (rare, but it happens). If it were 
 protected by encryption of some kind then it would first need to be 
 decrypted to be usable (unless there is a designflaw which makes this 
 unnecessery as has been the case in a few messageboards a few years ago).
 Now, you can either encrypt or hash your passwords. Hashes are one-way, 
 encryption two-way. If the malicious user gets hold of a hash: he'll 
 still not have anything useful in his hands. He might make a reverse 
 lookup table and figure out the password from that (though there's an 
 infinite number of possible inputs for each single [hash] output), but 
 add a salt and don't put that in the database and the user has a low 
 chance of ever finding out what it was. But, just as the malicious user 
 can't figure out what the password was, neither can you: so goodby 
 lost-password feature. Instead you'd have to regenerate a new password 
 and send that over, or do some other fancy magic which doesn't involve 
 sending the current password as-is, since you don't know it either.
 If you were to use encryption there, you could always decrypt it. If you 
 have the key. Storing the key separately from the encrypted password 
 would make this quite safe. enctpyed_string = (data + key), if you know 
 neither the data nor the key, things get very tough. Because you know 
 the key, you can figure out the password and make a forgot-password 
 feature easily which sends out the actual password.
 But, because your key is publicly available (if your page has to use it, 
 then it's automatically publicly available, maybe not easily, but a 
 malicious user which managed to get hold of a full password table, could 
 just aswell get hold of the key for the encryption)!
 Putting in neither, so just keeping the passwords in their plain form is 
 safe. As long as noone _ever_ sees them. Guarantee that and you won't 
 have to bother with hashing/encrypting. If you can't guarantee it, build 
 in some extra safety in the form of hashing and/or encrypting.
 
 hope that explains it all a bit,
 - tul

Yes.  A bit.  I am actually impressed.  But I better read some more
redundant book about intelligent malicious users as I still feel like
not understanding everything of what you said completely.

...any nice book recommendation for naive people like me :?

So how about the following solution to my simple file-server problem:

I generate a new url for every user who is allowed to download a file
and a private password for every new url.  Using this approach, the same
file will be downloaded by different users via different urls and
passwords.  The password for an url is stored in the database encrypted
and send over to the user unencrypted per email.  Of course this makes
some more logic and tables necessary - and a new row for every user also
- but who cares :)  What do you think?


[PHP] Re: why are passwords stored encrypted in databases even when thedatathey protect is stored in the same database?

2008-06-13 Thread M. Sokolewicz

Dietrich Bollmann wrote:
Hi tul, 


So this was a very long and informative answer :)
Thank you very much!

On Fri, 2008-06-13 at 12:02 +0200, M. Sokolewicz wrote:
[...] However, people usually write code which may (and will most 
of the time) containt exploitable sections which might give a malicious 
user the ability to get a dump of the database. A password dump is 
always interesting, since it gives a LOT of information. People usually 
don't use 1 password per login, but rather have a standard password 
for most things.


So if the user is allowed to change his password, it should be encrypted
always as there are chances that the same password is used at some other
place?  That makes a lot of sense to me :)

If all passwords are generated by the system on the other hand and the
user is not allowed to change his password, if further all the protected
data is in the same database as the password, there would be no need for
encrypting the passwords following your argumentation?

But if some information is stored outside the database - in my case
(simple file server) for example, the database only contains the file
meta-data while the files themselves are stored in some data directory
on the server - some malicious user who would have broken into the
database could get hold of the files if the passwords are stored
unencrypted;  if some encryption scheme would have been used on the
other hand the data found in the database wouldn't be of any use at all?

And if the password should be recoverable some encryption with a key
stored somewhere else would force the hacker to break into two systems,
the database itself and the system which is used to store the key.

That makes sense also.  I didn't think about the fact that database and
a directory on the server are two different things which would have to
be hacked separately.  So I am happy about writing my mail and getting
such a nice answer before implementing some stupid password logic
myself :)

Now, if it were unprotected, the person getting the information can 
instantly log in as that user, or if he wants might even take over that 
person's identity in other places (rare, but it happens). If it were 
protected by encryption of some kind then it would first need to be 
decrypted to be usable (unless there is a designflaw which makes this 
unnecessery as has been the case in a few messageboards a few years ago).
Now, you can either encrypt or hash your passwords. Hashes are one-way, 
encryption two-way. If the malicious user gets hold of a hash: he'll 
still not have anything useful in his hands. He might make a reverse 
lookup table and figure out the password from that (though there's an 
infinite number of possible inputs for each single [hash] output), but 
add a salt and don't put that in the database and the user has a low 
chance of ever finding out what it was. But, just as the malicious user 
can't figure out what the password was, neither can you: so goodby 
lost-password feature. Instead you'd have to regenerate a new password 
and send that over, or do some other fancy magic which doesn't involve 
sending the current password as-is, since you don't know it either.
If you were to use encryption there, you could always decrypt it. If you 
have the key. Storing the key separately from the encrypted password 
would make this quite safe. enctpyed_string = (data + key), if you know 
neither the data nor the key, things get very tough. Because you know 
the key, you can figure out the password and make a forgot-password 
feature easily which sends out the actual password.
But, because your key is publicly available (if your page has to use it, 
then it's automatically publicly available, maybe not easily, but a 
malicious user which managed to get hold of a full password table, could 
just aswell get hold of the key for the encryption)!
Putting in neither, so just keeping the passwords in their plain form is 
safe. As long as noone _ever_ sees them. Guarantee that and you won't 
have to bother with hashing/encrypting. If you can't guarantee it, build 
in some extra safety in the form of hashing and/or encrypting.


hope that explains it all a bit,
- tul


Yes.  A bit.  I am actually impressed.  But I better read some more
redundant book about intelligent malicious users as I still feel like
not understanding everything of what you said completely.

...any nice book recommendation for naive people like me :?

So how about the following solution to my simple file-server problem:

I generate a new url for every user who is allowed to download a file
and a private password for every new url.  Using this approach, the same
file will be downloaded by different users via different urls and
passwords.  The password for an url is stored in the database encrypted
and send over to the user unencrypted per email.  Of course this makes
some more logic and tables necessary - and a new row for every user also
- but who cares :)  What do you think?

Thanks for your 

Re: [PHP] Re: why are passwords stored encrypted in databases even when thedatathey protect is stored in the same database?

2008-06-13 Thread Bastien Koert
On Fri, Jun 13, 2008 at 8:20 AM, M. Sokolewicz [EMAIL PROTECTED] wrote:

 Dietrich Bollmann wrote:

 Hi tul,
 So this was a very long and informative answer :)
 Thank you very much!

 On Fri, 2008-06-13 at 12:02 +0200, M. Sokolewicz wrote:

 [...] However, people usually write code which may (and will most of the
 time) containt exploitable sections which might give a malicious user the
 ability to get a dump of the database. A password dump is always
 interesting, since it gives a LOT of information. People usually don't use 1
 password per login, but rather have a standard password for most things.


 So if the user is allowed to change his password, it should be encrypted
 always as there are chances that the same password is used at some other
 place?  That makes a lot of sense to me :)

 If all passwords are generated by the system on the other hand and the
 user is not allowed to change his password, if further all the protected
 data is in the same database as the password, there would be no need for
 encrypting the passwords following your argumentation?

 But if some information is stored outside the database - in my case
 (simple file server) for example, the database only contains the file
 meta-data while the files themselves are stored in some data directory
 on the server - some malicious user who would have broken into the
 database could get hold of the files if the passwords are stored
 unencrypted;  if some encryption scheme would have been used on the
 other hand the data found in the database wouldn't be of any use at all?

 And if the password should be recoverable some encryption with a key
 stored somewhere else would force the hacker to break into two systems,
 the database itself and the system which is used to store the key.

 That makes sense also.  I didn't think about the fact that database and
 a directory on the server are two different things which would have to
 be hacked separately.  So I am happy about writing my mail and getting
 such a nice answer before implementing some stupid password logic
 myself :)

  Now, if it were unprotected, the person getting the information can
 instantly log in as that user, or if he wants might even take over that
 person's identity in other places (rare, but it happens). If it were
 protected by encryption of some kind then it would first need to be
 decrypted to be usable (unless there is a designflaw which makes this
 unnecessery as has been the case in a few messageboards a few years ago).
 Now, you can either encrypt or hash your passwords. Hashes are one-way,
 encryption two-way. If the malicious user gets hold of a hash: he'll still
 not have anything useful in his hands. He might make a reverse lookup table
 and figure out the password from that (though there's an infinite number of
 possible inputs for each single [hash] output), but add a salt and don't put
 that in the database and the user has a low chance of ever finding out what
 it was. But, just as the malicious user can't figure out what the password
 was, neither can you: so goodby lost-password feature. Instead you'd have to
 regenerate a new password and send that over, or do some other fancy magic
 which doesn't involve sending the current password as-is, since you don't
 know it either.
 If you were to use encryption there, you could always decrypt it. If you
 have the key. Storing the key separately from the encrypted password would
 make this quite safe. enctpyed_string = (data + key), if you know neither
 the data nor the key, things get very tough. Because you know the key, you
 can figure out the password and make a forgot-password feature easily which
 sends out the actual password.
 But, because your key is publicly available (if your page has to use it,
 then it's automatically publicly available, maybe not easily, but a
 malicious user which managed to get hold of a full password table, could
 just aswell get hold of the key for the encryption)!
 Putting in neither, so just keeping the passwords in their plain form is
 safe. As long as noone _ever_ sees them. Guarantee that and you won't have
 to bother with hashing/encrypting. If you can't guarantee it, build in some
 extra safety in the form of hashing and/or encrypting.

 hope that explains it all a bit,
 - tul


 Yes.  A bit.  I am actually impressed.  But I better read some more
 redundant book about intelligent malicious users as I still feel like
 not understanding everything of what you said completely.

 ...any nice book recommendation for naive people like me :?

 So how about the following solution to my simple file-server problem:

 I generate a new url for every user who is allowed to download a file
 and a private password for every new url.  Using this approach, the same
 file will be downloaded by different users via different urls and
 passwords.  The password for an url is stored in the database encrypted
 and send over to the user unencrypted per email.  Of course this makes
 some more 

[PHP] Re: why are passwords stored encrypted in databases even when thedatathey protect is stored in the same database?

2008-06-13 Thread Dietrich Bollmann
On Fri, 2008-06-13 at 14:20 +0200, M. Sokolewicz wrote:
 Considering you're already jailing access by linking a specific url to a 
 specific password you're making the impact of a hacked password pretty 
 small. Which is a good thing :)
 I would recommend, if you go this way, to add an expiry date to the 
 url/password combo. So for example you can only use that url/password 
 combo for 3 days before it expires, after that, you need a new combo. 
 Doing it this way (with server-generated passwords) you make sure that 
 _if_ it were ever to fall into hands-it-should-not-be-in, it won't be 
 there for long.
 
 - Tul
 
 P.S. in other words, sounds fine to me :)

Thank you again!

...so finally I can get to work :)

Best wishes, Dietrich


On Fri, 2008-06-13 at 14:20 +0200, M. Sokolewicz wrote:
 Dietrich Bollmann wrote:
  Hi tul, 
  
  So this was a very long and informative answer :)
  Thank you very much!
  
  On Fri, 2008-06-13 at 12:02 +0200, M. Sokolewicz wrote:
  [...] However, people usually write code which may (and will most 
  of the time) containt exploitable sections which might give a malicious 
  user the ability to get a dump of the database. A password dump is 
  always interesting, since it gives a LOT of information. People usually 
  don't use 1 password per login, but rather have a standard password 
  for most things.
  
  So if the user is allowed to change his password, it should be encrypted
  always as there are chances that the same password is used at some other
  place?  That makes a lot of sense to me :)
  
  If all passwords are generated by the system on the other hand and the
  user is not allowed to change his password, if further all the protected
  data is in the same database as the password, there would be no need for
  encrypting the passwords following your argumentation?
  
  But if some information is stored outside the database - in my case
  (simple file server) for example, the database only contains the file
  meta-data while the files themselves are stored in some data directory
  on the server - some malicious user who would have broken into the
  database could get hold of the files if the passwords are stored
  unencrypted;  if some encryption scheme would have been used on the
  other hand the data found in the database wouldn't be of any use at all?
  
  And if the password should be recoverable some encryption with a key
  stored somewhere else would force the hacker to break into two systems,
  the database itself and the system which is used to store the key.
  
  That makes sense also.  I didn't think about the fact that database and
  a directory on the server are two different things which would have to
  be hacked separately.  So I am happy about writing my mail and getting
  such a nice answer before implementing some stupid password logic
  myself :)
  
  Now, if it were unprotected, the person getting the information can 
  instantly log in as that user, or if he wants might even take over that 
  person's identity in other places (rare, but it happens). If it were 
  protected by encryption of some kind then it would first need to be 
  decrypted to be usable (unless there is a designflaw which makes this 
  unnecessery as has been the case in a few messageboards a few years ago).
  Now, you can either encrypt or hash your passwords. Hashes are one-way, 
  encryption two-way. If the malicious user gets hold of a hash: he'll 
  still not have anything useful in his hands. He might make a reverse 
  lookup table and figure out the password from that (though there's an 
  infinite number of possible inputs for each single [hash] output), but 
  add a salt and don't put that in the database and the user has a low 
  chance of ever finding out what it was. But, just as the malicious user 
  can't figure out what the password was, neither can you: so goodby 
  lost-password feature. Instead you'd have to regenerate a new password 
  and send that over, or do some other fancy magic which doesn't involve 
  sending the current password as-is, since you don't know it either.
  If you were to use encryption there, you could always decrypt it. If you 
  have the key. Storing the key separately from the encrypted password 
  would make this quite safe. enctpyed_string = (data + key), if you know 
  neither the data nor the key, things get very tough. Because you know 
  the key, you can figure out the password and make a forgot-password 
  feature easily which sends out the actual password.
  But, because your key is publicly available (if your page has to use it, 
  then it's automatically publicly available, maybe not easily, but a 
  malicious user which managed to get hold of a full password table, could 
  just aswell get hold of the key for the encryption)!
  Putting in neither, so just keeping the passwords in their plain form is 
  safe. As long as noone _ever_ sees them. Guarantee that and you won't 
  have to bother with hashing/encrypting. If you 

Re: [PHP] Re: why are passwords stored encrypted in databases even when thedatathey protect is stored in the same database?

2008-06-13 Thread Usamah M. Ali
Taking into mind that email addresses extracted out of hacked
databases is one of the main spam industry seeders, I always wonder
why web application developers don't consider encrypting emails the
same way they consider encrypting password! Once a hacker has full
access to a database, an encrypted password becomes like locking the
door while keeping the window open!

Say a user has an account in some discussion forum, that uses an open
source, or visible-source software. She has about 5000 posts in which
she has expressed her personal opinions on just about many things. Now
what a hacker has to do is to dump the database into a local server
running the same software, and begin analyzing the data, creating
well-crafted lists of potential customers for which he's going to
deliver very well-targeted mailing newsletters!

Regards,
Usamah

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



[PHP] Re: Why use session_register()?

2008-03-10 Thread Al

Read the current php manual.

Lamonte H wrote:

Is it necessary to use session_register()?  What exactly was the point of
this function if you can set sessions using $_SESSION it self?



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



Re: [PHP] Re: Why use session_register()?

2008-03-10 Thread Dave Goodchild
session_register is old school. RTFM.

On Mon, Mar 10, 2008 at 4:26 PM, Al [EMAIL PROTECTED] wrote:

 Read the current php manual.

 Lamonte H wrote:
  Is it necessary to use session_register()?  What exactly was the point
 of
  this function if you can set sessions using $_SESSION it self?
 

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




[PHP] Re: Why do some pages repeat a previous page's action(s) after redirect?

2007-04-03 Thread Mark
Do yo
Chris W. Parker wrote:

Quick question: Do you use frames and does the behavior of your code depend
on data stored from page to page? If so, what kind of session system do you
use?

 Hello,
  
 I have a form page and a processing page. After submitting the form the
 processing page does whatever it needs to do (insert a record, send back
 validation errors, etc.) After determing what to do it always redirects
 somewhere with header('Location: URL');
 
 But sometimes when I'm back at the form page (after the redirect) and I
 refresh the page it does the previous page's actions again. And again
 and again.
 
 Why would it do that? Shouldn't a refresh just resubmit whatever is in
 the address bar and not go through a certain path?
 
 The only way I've found to make it stop redoing the previous page's
 actions is to put my cursor in the address bar and press enter.
 
 I don't remember seeing this behavior in the past so I wonder if it has
 something to do with Apache's or PHP's configuration.
  
  
 Thanks,
 Chris.

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



[PHP] Re: why would these few statements writes the array?

2007-04-01 Thread Man-wai Chang
Man-wai Chang wrote:
 $array = array(1,2,3);
 foreach( $array as $item );
 foreach( $array as $item );
 print_r( $array );
 
 foreach is a read, not a write, isn't it?

I got it...

-- 
  .~.   Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.10)  Linux 2.6.20.4
  ^ ^   19:33:01 up 8 days 6:45 0 users load average: 1.00 1.02 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

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



[PHP] Re: Why won't this query go through?

2007-03-12 Thread Haydar Tuna
Hello,
   Did you control your user privileges? May be, your database user 
don't have enough privileges for INSERT. If your database user have enough 
database privileges for INSERT, you must control your SQL. Firstly you 
should write your SQL to the screen with echo ($q) and then paste this in 
the mysql command line. If you get an errors, there is a problem on your 
SQL. :)


-- 
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net


Mike Shanley [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi,

 I am just not understanding what I could have possibly done wrong with 
 this query. All of the variables are good, without special characters in 
 any sense of the word... So why isn't it importing anything?

 Thanks!

 $q = INSERT INTO 
 `visitors`(`username`,`password`,`email`,`firstname`,`lastname`,`birthdate`,`verifythis`)
VALUES ('.$username.',
'.md5($password1).',
'.$email.',
'.$firstname.',
'.$lastname.',
'.$birthdate.',
'.$verifythis.');;
 mysql_query($q);

 -- 
 Mike Shanley

 ~you are almost there~ 

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



Re: [PHP] Re: Why small big?

2006-08-25 Thread Ivo F.A.C. Fokkema
 [SNIP]
 As for PNG:  As far as I know, the only issue with any realistic browser 
 (other than very old ones like IE2 or something) is that the alpha 
 channel is not supported.  As there is no alpha channel in JPEG, so 
 there is no difference.  Though I do not profess to be absolutely sure 
 that all browsers you might encounter manage PNG ok.

I personally use PNG all the time for smaller images. Only for high color,
larger images, I use JPEG. Besides the unsupported Alpha
transparency that you've already mentioned, I've never had any form of
problem (or heard anyone complain) about unsupported PNG images. And
that's indexed and RGB PNGs.

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



Re: [PHP] Re: Why small big?

2006-08-25 Thread Ivo F.A.C. Fokkema
 [SNIP]
 Considering in this thread where I left the quality at 100% and 
 reduced the image to less 40 percent of the original, and the end 
 result was that I actually made a larger file. So, I belive that at 
 least this example shows that 100% is not a good quality value 
 setting for reducing images -- thus we know the high end is less than 
 100.

I know from experience that reducing the quality from 100% to 95%
sometimes reduces the file size to 50%; without showing much noticeable
change in quality...

HTH

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



Re: [PHP] Re: Why small big?

2006-08-24 Thread Alex Turner

As I promised, here is the writeup with examples:

http://nerds-central.blogspot.com/2006/08/choosing-file-format-for-small-web.html

Cheers

AJ

tedd wrote:

Alex:

Excuse for top posting:

You said: Clear as mud?

Well actually, it's simperer than I thought. After your reply, I did 
some reading on jpeg and found it's simply a transform, not unlike FFT 
where two-dimensional temporal data is transformed from the time domain 
to the frequency domain -- very interesting reading.


The reverse cosine matrix you mention is probably the discrete cosine 
transform (DCT) matrix where the x, y pixels of an image file have a z 
component representing color. From that you can translate the data into 
the frequency domain, which actually generates more data than the original.


However, the quality setting is where you make it back up in compression 
ratio's by trimming off higher frequencies which don't add much to the 
data. Unlike the FFT, the algorithm does not address phasing, which I 
found interesting.


However, the answer to my question deals with the quality statement. In 
the statement:


imagejpeg($image_p, null, 100);

I should have used something less than 100.

I've change the figure to 25 and don't see any noticeable difference in 
quality of the thumbnail.


It seems to me there should be a table (or algorithm) somewhere that 
would recommend what quality to use when reducing the size of an image 
via this method. In this case, I reduced an image 62 percent (38% of the 
original) with a quality setting of 25 and see no difference. I think 
this (the quality factor) is programmable.


As for png images, I would probably agree (if I saw comparisons), but 
not all browsers accept them. I belive that at least one IE has problems 
with png's, right?


tedd

At 4:45 PM +0100 8/23/06, Alex Turner wrote:
M Sokolewice got it nearly correct.  However, the situation is a 
little more complex than he has discussed.


The % compression figure for jpeg is translated into the amount of 
information stored in the reverse cosine matrix.  The size of the 
compressed file is not proportional to the % you set in the 
compressor.  Thus 100% actually means store all the information in the 
reverse cosine matrix.  This is like storing the image in a 24 bit 
png, but with the compressor turned off.  So at 100% jpeg is quite 
inefficient.


The other issue is the amount of high frequency information in your 
images.  If you have a 2000x2000 image with most of the image dynamics 
at a 10 pixel frequency, and you reduce this to 200x200 then the JPEG 
compression algorithm will 'see' approximately the same amount of 
information in the image :-(  The reality is not quite as simple as 
this because of the way JPEG uses blocks etc, but it is an easy way of 
thinking about it.


What all this means is that as you reduce the size of an image, if you 
want it to retain some of the detail of the original but at a smaller 
size, there will be a point at which 8 or 24 bit PNG will become a 
better bet.


Clear as mud?

AJ

M. Sokolewicz wrote:

I'm not quite sure, but consider the following:

Considering the fact that most JPEG images are stored with some form 
of compression usually ~75% that would mean the original image, in 
actual size, is about 1.33x bigger than it appears in filesize. When 
you make a thumbnail, you limit the amount of pixels, but you are 
setting compression to 100% (besides that, you also use a truecolor 
pallete which adds to its size). So, for images which are scaled down 
less than 25% (actually this will prob. be more around 30-ish, due to 
palette differences) you'll actually see the thumbnail being bigger 
in *filesize* than the original (though smaller in memory-size)


- tul

P.S. isn't error_reporting( FATAL | ERROR | WARNING ); supposed to be 
error_reporting( E_FATAL | E_ERROR | E_WARNING ); ??


tedd wrote:

Hi gang:

I have a thumbnail script, which does what it is supposed to do. 
However, the thumbnail image generated is larger than the original 
image, how can that be?


Here's the script working:

http://xn--ovg.com/thickbox

And, here's the script:

?php /* thumb from file */

/* some settings */
ignore_user_abort();
set_time_limit( 0 );
error_reporting( FATAL | ERROR | WARNING );

/* security check */
ini_set( 'register_globals', '0' );

/* start buffered output */
ob_start();

/* some checks */
if ( ! isset( $_GET['s'] ) ) die( 'Source image not specified' );

$filename = $_GET['s'];

// Set a maximum height and width
$width = 200;
$height = 200;

// Get new dimensions
list($width_orig, $height_orig) = getimagesize($filename);

if ($width  ($width_orig  $height_orig))
{
$width = ($height / $height_orig) * $width_orig;
}
else
{
$height = ($width / $width_orig) * $height_orig;
}

// Resample
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, 
$width_orig, 

[PHP] Re: Why small big?

2006-08-24 Thread tedd
 rather 
than in frequency space you don't get this problem (hence PNG 
permitting perfectly sharp lines).


So - back on topic.  If you take an image with sharp lines in it, 
then pass it through DCT twice (the process in symmetrical) but 
loose some of the high frequency data in the process (compression) 
then the result is that the very high frequency components that 
encode the edge are stripped off.  Rather than (as one might like) 
this making the edge fussy, it produces what is called mosquito 
noise around the edges.


Because mosquito noise is nothing like what you are 'expecting' to 
see, the brain is very sensitive to it.


Thus, the amount you notice the compression of JPEG depends on the 
nature of the image you compress.


Now it gets nasty.  DCT scales as a power of n (where n is the size 
of image) - there is a fast DCT process like the F in FFT.  But it 
is still non linear.  This means that to make the encoding and 
decoding of JPEG reasonably quick the image is split into blocks and 
each block is separately passed through the DCT process.  This is 
fine except that it produces errors from one block to the next as to 
where the edges are in HSV space.  Thus, as the compression is 
turned up, the edges of the block can become visible due to 
discontinuities in the color, huge and saturation at the borders. 
This again is sensitive to the sort of image you are compressing. 
For example, if it has a very flat (say black or white) background, 
then you will not notice. Alternatively, if the image is tonally 
rich, like someone's face, you will notice it a lot.


Again, this effect means that it is not really possible to automate 
the process of figuring out what compression setting is optimum.


As for PNG:  As far as I know, the only issue with any realistic 
browser (other than very old ones like IE2 or something) is that the 
alpha channel is not supported.  As there is no alpha channel in 
JPEG, so there is no difference.  Though I do not profess to be 
absolutely sure that all browsers you might encounter manage PNG ok.


Side Issues:
DCT is integer.  This means that if you have zero compression in the 
DCT process, then you get out what you put in (except if you get 
overflow, which can be avoided as far as I know).  This is not the 
case in FFT where floating point errors mean you always loose 
something.  Thus JPEG/100% should be at or near perfect (lossless) 
but does not actually compress.


Another area where FFT and DCT become very interesting is in moving 
picture processing.  You can filter video using FFT or DCT in ways 
that are hard or impossible using spacing filters.  This can be good 
for improving noisy or fussy 'avi' files etc.


Best wishes

AJ

PS - I'll stick the above on my nerd block 
nerds-central.blogspot.com, if you have any good links to suggest to 
expand the subject, please let me know and I shall add them.



Alexander J Turner Ph.D.
www.project-network.com
www.deployview.com
www.funkifunctions.blogspot.com

-Original Message-
From: tedd [mailto:[EMAIL PROTECTED]
Sent: 23 August 2006 20:17
To: Alex Turner; php-general@lists.php.net
Subject: TPN POSSIBLE SPAM:[PHP] Re: Why small  big?

Alex:

Excuse for top posting:

You said: Clear as mud?

Well actually, it's simperer than I thought. After your reply, I did
some reading on jpeg and found it's simply a transform, not unlike
FFT where two-dimensional temporal data is transformed from the time
domain to the frequency domain -- very interesting reading.

The reverse cosine matrix you mention is probably the discrete cosine
transform (DCT) matrix where the x, y pixels of an image file have a
z component representing color. From that you can translate the data
into the frequency domain, which actually generates more data than
the original.

However, the quality setting is where you make it back up in
compression ratio's by trimming off higher frequencies which don't
add much to the data. Unlike the FFT, the algorithm does not address
phasing, which I found interesting.

However, the answer to my question deals with the quality statement.
In the statement:

imagejpeg($image_p, null, 100);

I should have used something less than 100.

I've change the figure to 25 and don't see any noticeable difference
in quality of the thumbnail.

It seems to me there should be a table (or algorithm) somewhere that
would recommend what quality to use when reducing the size of an
image via this method. In this case, I reduced an image 62 percent
(38% of the original) with a quality setting of 25 and see no
difference. I think this (the quality factor) is programmable.

As for png images, I would probably agree (if I saw comparisons), but
not all browsers accept them. I belive that at least one IE has
problems with png's, right?

tedd

At 4:45 PM +0100 8/23/06, Alex Turner wrote:

M Sokolewice got it nearly correct.  However, the situation is a
little more complex than he has discussed.

The % compression figure for jpeg

[PHP] Re: Why small big?

2006-08-23 Thread M. Sokolewicz

I'm not quite sure, but consider the following:

Considering the fact that most JPEG images are stored with some form of 
compression usually ~75% that would mean the original image, in actual 
size, is about 1.33x bigger than it appears in filesize. When you make a 
thumbnail, you limit the amount of pixels, but you are setting 
compression to 100% (besides that, you also use a truecolor pallete 
which adds to its size). So, for images which are scaled down less than 
25% (actually this will prob. be more around 30-ish, due to palette 
differences) you'll actually see the thumbnail being bigger in 
*filesize* than the original (though smaller in memory-size)


- tul

P.S. isn't error_reporting( FATAL | ERROR | WARNING ); supposed to be 
error_reporting( E_FATAL | E_ERROR | E_WARNING ); ??


tedd wrote:

Hi gang:

I have a thumbnail script, which does what it is supposed to do. 
However, the thumbnail image generated is larger than the original 
image, how can that be?


Here's the script working:

http://xn--ovg.com/thickbox

And, here's the script:

?php /* thumb from file */

/* some settings */
ignore_user_abort();
set_time_limit( 0 );
error_reporting( FATAL | ERROR | WARNING );

/* security check */
ini_set( 'register_globals', '0' );

/* start buffered output */
ob_start();

/* some checks */
if ( ! isset( $_GET['s'] ) ) die( 'Source image not specified' );

$filename = $_GET['s'];

// Set a maximum height and width
$width = 200;
$height = 200;

// Get new dimensions
list($width_orig, $height_orig) = getimagesize($filename);

if ($width  ($width_orig  $height_orig))
{
$width = ($height / $height_orig) * $width_orig;
}
else
{
$height = ($width / $width_orig) * $height_orig;
}

// Resample
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, 
$width_orig, $height_orig);


//  Output  Content type
header('Content-type: image/jpeg');
imagejpeg($image_p, null, 100);

/* end buffered output */
ob_end_flush();
?

---

Thanks in advance for any comments, suggestions or answers.

tedd



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



[PHP] Re: Why small big?

2006-08-23 Thread Alex Turner
M Sokolewice got it nearly correct.  However, the situation is a little 
more complex than he has discussed.


The % compression figure for jpeg is translated into the amount of 
information stored in the reverse cosine matrix.  The size of the 
compressed file is not proportional to the % you set in the compressor. 
 Thus 100% actually means store all the information in the reverse 
cosine matrix.  This is like storing the image in a 24 bit png, but with 
the compressor turned off.  So at 100% jpeg is quite inefficient.


The other issue is the amount of high frequency information in your 
images.  If you have a 2000x2000 image with most of the image dynamics 
at a 10 pixel frequency, and you reduce this to 200x200 then the JPEG 
compression algorithm will 'see' approximately the same amount of 
information in the image :-(  The reality is not quite as simple as this 
because of the way JPEG uses blocks etc, but it is an easy way of 
thinking about it.


What all this means is that as you reduce the size of an image, if you 
want it to retain some of the detail of the original but at a smaller 
size, there will be a point at which 8 or 24 bit PNG will become a 
better bet.


Clear as mud?

AJ

M. Sokolewicz wrote:

I'm not quite sure, but consider the following:

Considering the fact that most JPEG images are stored with some form of 
compression usually ~75% that would mean the original image, in actual 
size, is about 1.33x bigger than it appears in filesize. When you make a 
thumbnail, you limit the amount of pixels, but you are setting 
compression to 100% (besides that, you also use a truecolor pallete 
which adds to its size). So, for images which are scaled down less than 
25% (actually this will prob. be more around 30-ish, due to palette 
differences) you'll actually see the thumbnail being bigger in 
*filesize* than the original (though smaller in memory-size)


- tul

P.S. isn't error_reporting( FATAL | ERROR | WARNING ); supposed to be 
error_reporting( E_FATAL | E_ERROR | E_WARNING ); ??


tedd wrote:

Hi gang:

I have a thumbnail script, which does what it is supposed to do. 
However, the thumbnail image generated is larger than the original 
image, how can that be?


Here's the script working:

http://xn--ovg.com/thickbox

And, here's the script:

?php /* thumb from file */

/* some settings */
ignore_user_abort();
set_time_limit( 0 );
error_reporting( FATAL | ERROR | WARNING );

/* security check */
ini_set( 'register_globals', '0' );

/* start buffered output */
ob_start();

/* some checks */
if ( ! isset( $_GET['s'] ) ) die( 'Source image not specified' );

$filename = $_GET['s'];

// Set a maximum height and width
$width = 200;
$height = 200;

// Get new dimensions
list($width_orig, $height_orig) = getimagesize($filename);

if ($width  ($width_orig  $height_orig))
{
$width = ($height / $height_orig) * $width_orig;
}
else
{
$height = ($width / $width_orig) * $height_orig;
}

// Resample
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, 
$width_orig, $height_orig);


//  Output  Content type
header('Content-type: image/jpeg');
imagejpeg($image_p, null, 100);

/* end buffered output */
ob_end_flush();
?

---

Thanks in advance for any comments, suggestions or answers.

tedd



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



[PHP] Re: Why small big?

2006-08-23 Thread tedd

Alex:

Excuse for top posting:

You said: Clear as mud?

Well actually, it's simperer than I thought. After your reply, I did 
some reading on jpeg and found it's simply a transform, not unlike 
FFT where two-dimensional temporal data is transformed from the time 
domain to the frequency domain -- very interesting reading.


The reverse cosine matrix you mention is probably the discrete cosine 
transform (DCT) matrix where the x, y pixels of an image file have a 
z component representing color. From that you can translate the data 
into the frequency domain, which actually generates more data than 
the original.


However, the quality setting is where you make it back up in 
compression ratio's by trimming off higher frequencies which don't 
add much to the data. Unlike the FFT, the algorithm does not address 
phasing, which I found interesting.


However, the answer to my question deals with the quality statement. 
In the statement:


imagejpeg($image_p, null, 100);

I should have used something less than 100.

I've change the figure to 25 and don't see any noticeable difference 
in quality of the thumbnail.


It seems to me there should be a table (or algorithm) somewhere that 
would recommend what quality to use when reducing the size of an 
image via this method. In this case, I reduced an image 62 percent 
(38% of the original) with a quality setting of 25 and see no 
difference. I think this (the quality factor) is programmable.


As for png images, I would probably agree (if I saw comparisons), but 
not all browsers accept them. I belive that at least one IE has 
problems with png's, right?


tedd

At 4:45 PM +0100 8/23/06, Alex Turner wrote:
M Sokolewice got it nearly correct.  However, the situation is a 
little more complex than he has discussed.


The % compression figure for jpeg is translated into the amount of 
information stored in the reverse cosine matrix.  The size of the 
compressed file is not proportional to the % you set in the 
compressor.  Thus 100% actually means store all the information in 
the reverse cosine matrix.  This is like storing the image in a 24 
bit png, but with the compressor turned off.  So at 100% jpeg is 
quite inefficient.


The other issue is the amount of high frequency information in your 
images.  If you have a 2000x2000 image with most of the image 
dynamics at a 10 pixel frequency, and you reduce this to 200x200 
then the JPEG compression algorithm will 'see' approximately the 
same amount of information in the image :-(  The reality is not 
quite as simple as this because of the way JPEG uses blocks etc, but 
it is an easy way of thinking about it.


What all this means is that as you reduce the size of an image, if 
you want it to retain some of the detail of the original but at a 
smaller size, there will be a point at which 8 or 24 bit PNG will 
become a better bet.


Clear as mud?

AJ

M. Sokolewicz wrote:

I'm not quite sure, but consider the following:

Considering the fact that most JPEG images are stored with some 
form of compression usually ~75% that would mean the original 
image, in actual size, is about 1.33x bigger than it appears in 
filesize. When you make a thumbnail, you limit the amount of 
pixels, but you are setting compression to 100% (besides that, you 
also use a truecolor pallete which adds to its size). So, for 
images which are scaled down less than 25% (actually this will 
prob. be more around 30-ish, due to palette differences) you'll 
actually see the thumbnail being bigger in *filesize* than the 
original (though smaller in memory-size)


- tul

P.S. isn't error_reporting( FATAL | ERROR | WARNING ); supposed to 
be error_reporting( E_FATAL | E_ERROR | E_WARNING ); ??


tedd wrote:

Hi gang:

I have a thumbnail script, which does what it is supposed to do. 
However, the thumbnail image generated is larger than the original 
image, how can that be?


Here's the script working:

http://xn--ovg.com/thickbox

And, here's the script:

?php /* thumb from file */

/* some settings */
ignore_user_abort();
set_time_limit( 0 );
error_reporting( FATAL | ERROR | WARNING );

/* security check */
ini_set( 'register_globals', '0' );

/* start buffered output */
ob_start();

/* some checks */
if ( ! isset( $_GET['s'] ) ) die( 'Source image not specified' );

$filename = $_GET['s'];

// Set a maximum height and width
$width = 200;
$height = 200;

// Get new dimensions
list($width_orig, $height_orig) = getimagesize($filename);

if ($width  ($width_orig  $height_orig))
{
$width = ($height / $height_orig) * $width_orig;
}
else
{
$height = ($width / $width_orig) * $height_orig;
}

// Resample
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, 
$width_orig, $height_orig);


//  Output  Content type
header('Content-type: image/jpeg');
imagejpeg($image_p, null, 100);

/* end buffered output */
ob_end_flush();
?

---


Re: [PHP] Re: Why small big?

2006-08-23 Thread Alex Turner

Tedd,

Sorry for the floppy language.  You are quite correct, the name is 
discrete cosine.  I get too relaxed sometimes!


As to the visual impact of a degree of compression, I don't think that 
you can automate this.  The issue surrounds the way the brain processes 
information.  When you see something, you brain processes the visual 
field and looks for patters that it recognizes and then your conscious 
mind becomes aware of the patterns, not actually the thing you are 
looking at.  Optical illusions can illustrate this point. For example 
where you see a bunch of blobs on a white background and then someone 
tells you it is a dog and you see the dog.  Once you see the dog you can 
no longer 'not see it'.  This is because of the way the brain processes 
patterns.


The trick to DCT is that in most 'organic' images - people, trees etc - 
the patterns for which your brain is looking actually occupy low 
frequencies.  However, the majority of the information which is encoded 
into the image is in high frequencies.  Consequently, by selectively 
removing the high frequencies, the image appears to the conscious mind 
to be the same whilst in reality it is degraded.


The snag come when the pattern your brain is looking to match to 
requires high frequencies.  The classic is a edge.  If one has an 
infinitely large white background with a single infinitely sharp line on 
it, you require infinite frequencies to encode it correctly (ten years 
ago I knew the proof for this, time and good wine has put a stop to 
that).  This is much like the side band problem in radio transmission. 
If you encode an image in dimensional space rather than in frequency 
space you don't get this problem (hence PNG permitting perfectly sharp 
lines).


So - back on topic.  If you take an image with sharp lines in it, then 
pass it through DCT twice (the process in symmetrical) but loose some of 
the high frequency data in the process (compression) then the result is 
that the very high frequency components that encode the edge are 
stripped off.  Rather than (as one might like) this making the edge 
fussy, it produces what is called mosquito noise around the edges.


Because mosquito noise is nothing like what you are 'expecting' to see, 
the brain is very sensitive to it.


Thus, the amount you notice the compression of JPEG depends on the 
nature of the image you compress.


Now it gets nasty.  DCT scales as a power of n (where n is the size of 
image) - there is a fast DCT process like the F in FFT.  But it is still 
non linear.  This means that to make the encoding and decoding of JPEG 
reasonably quick the image is split into blocks and each block is 
separately passed through the DCT process.  This is fine except that it 
produces errors from one block to the next as to where the edges are in 
HSV space.  Thus, as the compression is turned up, the edges of the 
block can become visible due to discontinuities in the color, huge and 
saturation at the borders.  This again is sensitive to the sort of image 
you are compressing.  For example, if it has a very flat (say black or 
white) background, then you will not notice. Alternatively, if the image 
is tonally rich, like someone's face, you will notice it a lot.


Again, this effect means that it is not really possible to automate the 
process of figuring out what compression setting is optimum.


As for PNG:  As far as I know, the only issue with any realistic browser 
(other than very old ones like IE2 or something) is that the alpha 
channel is not supported.  As there is no alpha channel in JPEG, so 
there is no difference.  Though I do not profess to be absolutely sure 
that all browsers you might encounter manage PNG ok.


Side Issues:
DCT is integer.  This means that if you have zero compression in the DCT 
process, then you get out what you put in (except if you get overflow, 
which can be avoided as far as I know).  This is not the case in FFT 
where floating point errors mean you always loose something.  Thus 
JPEG/100% should be at or near perfect (lossless) but does not actually 
compress.


Another area where FFT and DCT become very interesting is in moving 
picture processing.  You can filter video using FFT or DCT in ways that 
are hard or impossible using spacing filters.  This can be good for 
improving noisy or fussy 'avi' files etc.


Best wishes

AJ

PS - I'll stick the above on my nerd blog nerds-central.blogspot.com, if 
you have any good links to suggest to expand the subject, please let me 
know and I shall add them.



tedd wrote:

Alex:

Excuse for top posting:

You said: Clear as mud?

Well actually, it's simperer than I thought. After your reply, I did 
some reading on jpeg and found it's simply a transform, not unlike FFT 
where two-dimensional temporal data is transformed from the time domain 
to the frequency domain -- very interesting reading.


The reverse cosine matrix you mention is probably the discrete cosine 
transform (DCT) matrix where 

[PHP] Re: Why does this preg_replace function not work?

2006-05-26 Thread M. Sokolewicz

Dave M G wrote:


PHP List,

In the code below, I want to take the text within $content, and change 
every instance of [h3] into h3, and every instance of [/h3] into 
/h3. And then do the same for [em], [/em], [strong], and so on.


However, this code does absolutely nothing to the text stored in content:

$tags = array (h3, em, strong, hr);
$content = preg_replace([ . $tags . ],  . $tags . , $content);
$content = preg_replace([/ . $tags . ], / . $tags . , $content);

Clearly I've either misunderstood the use of preg_replace(), or regular 
expressions, or arrays, despite having looked them up in the PHP online 
manual.


I also tried str_replace(), but predictably that did not help. As far as 
I understand it, it does not accept arrays.


What am I doing wrong in the above code?

And can the two preg_replace() commands be achieved in one line?

Thank you for any advice.

--
Dave M G


First of all, why the hell are you using preg_* functions for this? 
You're feeding static content to it, no modifiers *at all* (not even 
case-insensitivity). I recommend you go back to str_replace() as that is 
what you need. You'd also be wise to read up on arrays and regular 
expressions (a lot).


preg_replace() uses regular-expressions. Regular expressions require (in 
php) 2 delimiters, one at the start of the expression and one at the 
end, followed by optional modifiers/flags. Eg:

/regexpGoesHere/i
this would match regexpGoesHere and be case-insensitive.
You don't use delimiters (first problem).
Second problem with your code is that you're assuming that [, ],  and  
are not meta-characters. Unfortunately, [ and ] ARE meta-characters. 
This means that when you would pass it [h3] it would see that as any 
character which is an 'h' or '3' is a valid candidate for this 
expression. You would either need to escape it so it becomes \[h3\] 
which would mean any string looking like '[h3]' is a valid candidate.


Right, well, first let's go and fix the mess you've made of your arrays.
Here's a lesson for you:
Say you have
$array = array('a','b','c');
print($array);
print($array);

What do you expect to see?
a
b
?

Because looking at your code it seems like you're expecting something 
very strange. The thing you'll see is:

Array
Array

Your correct version would be to either loop over it using a construct 
such as foreach(), while() or the like, OR use the special case of 
preg_replace and str_replace functions, which may also take 2 arrays as 
their parameters. Remember though, you CAN NOT MIX ARRAYS WITH STRINGS 
just like that.


So, a more correct version for you would be (using str_replace because 
i's faster and easier and more appropriate):
$tagsOld = array ([h3], [em], [strong], [hr],[/h3], [/em], 
[/strong], [/hr]);
$tagsNew = array (h3, em, strong, hr,/h3, /em, 
/strong, /hr);

$content = str_replace($tagsOld, $tagsNew, $content);

What I've done here is made an array with what is to be replaced and a 
second one with what it is to be replaced with. Internally, str_replace 
goes over the whole list of $tagsOld and replaces each value with the 
corresponding value from $tagsNew (based on position in the array, 
meansing the 2nd value from $tagsOld will be replaced with the 2nd value 
from $tagsNew).


hope you understand what you did (wrong) now,
- tul

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



[PHP] Re: why is this newsroup server so slow?

2006-03-28 Thread Barry

Merlin wrote:

Hi there,

I used to be more often on news.php.net in former times. But now the 
server is
so incredibly slow?! I do get very often time outs and it takes ages to 
load the threads. Is there a possible misconfiguration of my newsreader, 
or is the server that slow?


Thank you for your help,

Merlin

More people probably?

Well my Thunderbird works fine so far. Just a few times a day i get 
timeouts.


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



[PHP] Re: Why do Sessions use Cookies?

2005-12-02 Thread Peter Brodersen
On Fri, 2 Dec 2005 20:43:48 -0500, in php.general [EMAIL PROTECTED]
(Michael B Allen) wrote:

Why do sessions use cookies? Isn't a session just a container associated
with the user's socket?

No. Even though mechanisms such as keepalive exists they are not
reliable for tracking a user. A client can still open multiple HTTP
connections to the same host even when using keepalive.

Furthermore we would like the session to survive the smallest hickups
(e.g. disconnects, TCP RSTs, ...).

-- 
- Peter Brodersen

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



[PHP] Re: Why this doesn't work ?

2005-10-24 Thread Phillip Oertel
hi mario,

first of all, make sure that your query works from the mysql console or
phpmyadmin or some other tool (copy-paste the query from the code and
replace $loging with something reasonable).

then try the following:

$query = SELECT COUNT (login) FROM formacao WHERE login = '$login';

// check to see if the $login variable has been filled in -
// maybe $login is empty?
echo $query;

$result = mysql_query($query);

if (!$result) {
  // mysql will tell you what's wrong
  echo mysql_error();
}

mysql_fetch_row($result);

and btw. mysql_fetch_row() doesn't require a connection resource, it
will default to the last opened when none is given.
so you only need to give the 2nd parameter if you have more than one
mysql-db connection open.

regards,
phillip

---

Mário Gamito schrieb:
 Hi,
 
 Why this doesn't work ?
 
 ---
 $query = SELECT COUNT (login) FROM WHERE login = '$login';
 $result = mysql_query($query);
 mysql_fetch_row($result);
 ---
 
 It gives me
 Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
 result resource in /var/www/html/registar_action.php on line 22
 
 Any help would be apreciated.
 
 Warm Regards,
 Mário Gamito

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



Re: [PHP] Re: why does this not work?

2005-09-28 Thread Lendy Chen
script
if (screen.width1064)
{
  document.write(link src=\style1.css\ type=\text/css\
rel=\stylesheet\);
}
else
{
  document.write(link src=\style2.css\ type=\text/css\
rel=\stylesheet\);
}
/script

or use cookie, js write screen.width to cookie,then php read
screen.width from cookie.



2005/9/28, Oliver Grätz [EMAIL PROTECTED]:
 Ross schrieb:
  $width =  script document.write(screen.width); /script;
  //$ross= intval($width);

 Yes, this is and will always be zero, because you are evaluating a
 string to an integer value.

  echo $width;
  if ($width  1064) {
  echo lower;
  $style= style1.css;
 
  }
  else {
  $style= style2.css;
 
  }

 OK, no I could insert the stuff about server side and client side.
 What you want to do is learn about the user's screen width. First of
 all, this is a bad idea if I you want to use it for design purposes like
 in this case where you include different CSS files. If I have a
 1600x1200 screen, I can easily open a browser window at 640x480. And
 now? And even if you don't evaluate the screen width but the browser
 window's width: What about me resizing the already rendered page? Think
 about better designing the page so you don't need to switch the CSS...

 OK, enough of evangelism. If you really want to do what you told there:
 Evaluate the JavaScript on your entry page. Then do a redirect to that
 same page and insert the value into the URL (e.g.
 index.php?scrwidth=1280). You can then access this from PHP via $_GET.
 It is a good idea to store this value in the session once received so
 you don't have to send it around on each link.


 AllOLLi


 
 63,000 bugs in the code, 63,000 bugs,
 ya get 1 whacked with a service pack,
 now there's 63,005 bugs in the code!!

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




--
Lendy Chen

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



[PHP] Re: why does this not work?

2005-09-27 Thread Oliver Grätz
Ross schrieb:
 $width =  script document.write(screen.width); /script;
 //$ross= intval($width);

Yes, this is and will always be zero, because you are evaluating a
string to an integer value.

 echo $width;
 if ($width  1064) {
 echo lower;
 $style= style1.css;
 
 }
 else {
 $style= style2.css;
 
 }

OK, no I could insert the stuff about server side and client side.
What you want to do is learn about the user's screen width. First of
all, this is a bad idea if I you want to use it for design purposes like
in this case where you include different CSS files. If I have a
1600x1200 screen, I can easily open a browser window at 640x480. And
now? And even if you don't evaluate the screen width but the browser
window's width: What about me resizing the already rendered page? Think
about better designing the page so you don't need to switch the CSS...

OK, enough of evangelism. If you really want to do what you told there:
Evaluate the JavaScript on your entry page. Then do a redirect to that
same page and insert the value into the URL (e.g.
index.php?scrwidth=1280). You can then access this from PHP via $_GET.
It is a good idea to store this value in the session once received so
you don't have to send it around on each link.


AllOLLi



63,000 bugs in the code, 63,000 bugs,
ya get 1 whacked with a service pack,
now there's 63,005 bugs in the code!!

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



Re: [PHP] Re: why does this not work?

2005-09-27 Thread Jochem Maas

bit off the point but...

Oliver Grätz wrote:

Ross schrieb:


$width =  script document.write(screen.width); /script;
//$ross= intval($width);



Yes, this is and will always be zero, because you are evaluating a


for his paricular $width string, yes.


string to an integer value.



$butThereIsAlwaysAtLeast = 1 exception to every rule;
var_dump(intval($butThereIsAlwaysAtLeast));


good points about CSS/design btw :-)
...and solving the OPs problem.

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



Re: [PHP] Re: why are session only working with cookies?

2005-05-18 Thread Brian V Bonini
On Mon, 2005-05-16 at 22:10, Richard Lynch wrote:
 Let him fight with phpIniDir some other day.

Something interesting maybe:
http://gfx.gfx-design.com/session_test.php
Hit your browsers refresh button.

I would think SID is NOT supposed to change with every page refresh..??

?php
 
session_start();
header(Cache-control: private);
 
$_SESSION['test'] = testing;
echo 'pre';
print_r($_SESSION);
echo \nSession Id: . session_id();
echo \n . strip_tags(SID);
echo '/pre';
 
?



-- 

s/:-[(/]/:-)/g


BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org

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



Re: [PHP] Re: why are session only working with cookies?

2005-05-18 Thread Jason Barnett
Brian V Bonini wrote:
On Mon, 2005-05-16 at 22:10, Richard Lynch wrote:
Let him fight with phpIniDir some other day.

Something interesting maybe:
http://gfx.gfx-design.com/session_test.php
Hit your browsers refresh button.
I would think SID is NOT supposed to change with every page refresh..??
Except that the SID is NOT in any POST / GET parameter.  So since PHP 
doesn't recieve a SID on any refresh, it assumes that it is starting a 
new session each time.  This is expected behavior.

Try creating a POST form instead and see what happens when you submit 
that form.  Refreshing the page without a SID anywhere won't do anything.

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


Re: [PHP] Re: why are session only working with cookies?

2005-05-18 Thread Jason Barnett
Please keep questions regarding PHP problems on the list instead of in 
my inbox.  Thanks.

Brian V Bonini wrote:
 On Wed, 2005-05-18 at 12:58, Jason Barnett wrote:

Brian V Bonini wrote:

On Mon, 2005-05-16 at 22:10, Richard Lynch wrote:


Let him fight with phpIniDir some other day.


Something interesting maybe:
http://gfx.gfx-design.com/session_test.php
Hit your browsers refresh button.

I would think SID is NOT supposed to change with every page refresh..??


Except that the SID is NOT in any POST / GET parameter.  So since PHP
doesn't recieve a SID on any refresh, it assumes that it is starting a
new session each time.  This is expected behavior.


 Thanks for clarifying... Does not really have any bearing on my original
 problem, but... At least I know THAT is nothing to look at further...

 -B

But it *does* have bearing on your original problem!  If you *don't* use 
*cookies* then the only way to continue a session is by passing the SID 
through *POST* or *GET* parameters!  That has been the whole point of 
the discussion about trans_sid!  Simple as that!

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


Re: [PHP] Re: why are session only working with cookies?

2005-05-17 Thread Brian V Bonini
On Mon, 2005-05-16 at 22:10, Richard Lynch wrote:
 Does ?php phpinfo();? show the same /path/to/php.ini as the one you edit?
 

Yup

 To be 100% certain, use 'stop' to stop Apache and then do:
 ps aux | grep httpd
 
 You should see only the grep httpd output, or no output at all.

Did that...


 Then start Apache, and triple check ?php phpinfo();? shows the php.ini
 file being read from the same directory you edited php.ini
 

Yup

Still no go... Other changes in php.ini DO take effect, just not
this I'm at a loss


-- 

s/:-[(/]/:-)/g


BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org

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



Re: [PHP] Re: why are session only working with cookies?

2005-05-17 Thread Jason Barnett
Brian V Bonini wrote:
...
Still no go... Other changes in php.ini DO take effect, just not
this I'm at a loss

By any chance are you changing PHP values through Apache's conf file?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: why are session only working with cookies?

2005-05-17 Thread Brian V Bonini
On Tue, 2005-05-17 at 09:53, Jason Barnett wrote:
 Brian V Bonini wrote:
 ...
  
  Still no go... Other changes in php.ini DO take effect, just not
  this I'm at a loss
  
  
 
 By any chance are you changing PHP values through Apache's conf file?

I am, in ANOTHER virtual hosts container block but not any values
related to sessions. What are you getting at?

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



Re: [PHP] Re: why are session only working with cookies?

2005-05-17 Thread Jason Wong
On Tuesday 17 May 2005 21:01, Brian V Bonini wrote:

 Still no go... Other changes in php.ini DO take effect, just not
 this I'm at a loss

What version of PHP are you using? In older versions (have a look at the 
changelog) you had to configure with --enable-trans-sid, in newer 
versions this is the default.

Summary: you have to compile PHP with --enable-trans-sid, AND enable it in 
php.ini.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
New Year Resolution: Ignore top posted posts

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



Re: [PHP] Re: why are session only working with cookies?

2005-05-17 Thread Richard Lynch
 On Tuesday 17 May 2005 21:01, Brian V Bonini wrote:

 Still no go... Other changes in php.ini DO take effect, just not
 this I'm at a loss

Does phpinfo() show trans_sid as on or off?

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Re: why are session only working with cookies?

2005-05-17 Thread Brian V Bonini
On Tue, 2005-05-17 at 15:58, Richard Lynch wrote:
  On Tuesday 17 May 2005 21:01, Brian V Bonini wrote:
 
  Still no go... Other changes in php.ini DO take effect, just not
  this I'm at a loss
 
 Does phpinfo() show trans_sid as on or off?

Shows it as 0 or 1 depending on how I set it at that moment...
http://gfx.gfx-design.com/php_info.php


-- 

s/:-[(/]/:-)/g


BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org

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



Re: [PHP] Re: why are session only working with cookies?

2005-05-16 Thread Brian V Bonini
On Sat, 2005-05-14 at 22:44, Richard Lynch wrote:
 Using Cookies, or using URL, the session DATA will be stored on the server
 in /tmp files -- Unless you change php.ini to store them somewhere else,
 in which case, again, the Cookie and URL only holds the ID and all the
 data goes wherever you store it:  database, shared memory, or an army of
 elves for all PHP cares.
 
 If trans_sid is not working for you, let's narrow this down:
 
 If you do this:
 ?php
   session_start();
   echo a href=\yourdomainnamehere.com\click me/abr /\n;
 ?
 
 Do you see something like ?PHPSESSID=a847hjfu3734hgfjgurur tacked on to
 the end of the URL?
 
 If not, trans_sid is NOT enabled.

I don't see the session id string, BUT, I do have session.use_trans_sid
= 1 set in php.ini and I did restart Apache after setting it.. I can see
the session file being created in /tmp but the values are not being
incremented as they should per script below.

 
 Did you restart Apache?

Yes.

 
 Did you turn *OFF* Cookies?  If PHP *can* use Cookies, I think it's gonna
 use Cookies, and not bother with the trans_sid stuff, though maybe it
 always puts it there.  I never really dived into that.  To be certain,
 though, turn off Cookies in php.ini and/or in your browser.

I did turn them off in the browser. And tried in php.ini at some point.

 
 Re-start Apache for your php.ini changes to kick in.

Did that...

Is it something with my script?


$xsl = new DOMDocument;
$xsl-load('quotes.xsl');

// Configure the transformer
$proc = new XSLTProcessor;
$proc-importStyleSheet($xsl); // attach the xsl rules

// get elements to operate on
$quotes = $xml-getElementsByTagName('quote_text');
$authors = $xml-getElementsByTagName('quote_author');

// store element values into array
foreach ($authors as $author) {
$author_result[] = $author-nodeValue;
}
foreach ($quotes as $quote) {
$quote_result[] = $quote-nodeValue;
}

session_start(); 
header(Cache-control: private); // IE 6 Fix

if (!isset($_SESSION['user_quotes']) || $_SESSION['user_quotes'] =
count($quote
_result) - 1) {
   $_SESSION['user_quotes'] = 0;
} else {
   $_SESSION['user_quotes']++;
}

// convert to simple var
$user_quotes = $_SESSION['user_quotes'];

// session debug stuff
/*
echo pre;
echo $_SESSION['user_quotes'] . \n;
print_r($_SESSION);
echo Session Id: . session_id();
echo /pre;
*/

if(isset($user_quotes)) {
$quote = htmlentities($quote_result[$user_quotes]);
$name = $author_result[$user_quotes];
}

$proc-setParameter('', 'quote', $quote);
$proc-setParameter('', 'name', $name);
$output = $proc-transformToXML($xml);

?


-- 

s/:-[(/]/:-)/g


BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org

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



Re: [PHP] Re: why are session only working with cookies?

2005-05-16 Thread Jason Barnett
Brian V Bonini wrote:
On Fri, 2005-05-13 at 23:31, Jason Wong wrote:
On Saturday 14 May 2005 09:42, Brian V Bonini wrote:

Yeah, I know session support is there and I DO NOT have it set to use
ONLY cookies. But if I disable cookies in the browser stuff relying on
sessions stops working. I'm using 5.0.3

session.use_trans_sid
0
0
Set that to 1. Sessions *are* cookies, they're cookies that have been set 
to expire when the browsing session finishes (ie when the browser is 
closed).

I thought the idea was; cookies if available otherwise the session data
gets serialized and propagated in the URL? The later of which appears to
not work, for me, if applicable
While it is possible that you might save some data in a cookie (yes, 
I've seen it done) that's not usually the way that it works.  Usually 
it's just as Richard has already described; the cookie just stores a 
name / value pair that identifies which session is yours and then PHP 
goes and retrieves that record.

If you don't want to rely on cookies then using trans_sid is seriously 
the next best way to go.  So go turn it on if you don't want to require 
cookies, it really should be that simple!  Then the name / value pair is 
attached to the URLs instead of stored in a cookie.

wondersDo people actually try the code that I post to the list?/wonders
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: why are session only working with cookies?

2005-05-16 Thread Richard Lynch
On Mon, May 16, 2005 6:24 am, Brian V Bonini said:
 On Sat, 2005-05-14 at 22:44, Richard Lynch wrote:
 Using Cookies, or using URL, the session DATA will be stored on the
 server
 in /tmp files -- Unless you change php.ini to store them somewhere else,
 in which case, again, the Cookie and URL only holds the ID and all the
 data goes wherever you store it:  database, shared memory, or an army of
 elves for all PHP cares.

 If trans_sid is not working for you, let's narrow this down:

 If you do this:
 ?php
   session_start();
   echo a href=\yourdomainnamehere.com\click me/abr /\n;
 ?

 Do you see something like ?PHPSESSID=a847hjfu3734hgfjgurur tacked on
 to
 the end of the URL?

 If not, trans_sid is NOT enabled.

 I don't see the session id string, BUT, I do have session.use_trans_sid
 = 1 set in php.ini and I did restart Apache after setting it.. I can see
 the session file being created in /tmp but the values are not being
 incremented as they should per script below.

I'm going to stop reading here. :-)

We know that somehow, some way, PHP is not using trans_sid, because your
URL isn't showing the session ID.

I dunno why, or what's in the php.ini that's not working, but don't try to
go beyond this step with XML, or anything else that complicates life.

The question now is why your php.ini changes are not taking effect.

The usual reason is you edited *A* php.ini file, but not the one Apache is
reading.

Does ?php phpinfo();? show the same /path/to/php.ini as the one you edit?

Whatever path it shows, that is where your php.ini has to be. [*]

Edit the one that is there, or if there isn't one there, move the one you
edited to *BE* there, or copy php.ini.dist from your PHP source (or Google
for it) and use that.

It's also remotely possible that apachectl incorrectly reported successful
stop/start when, in fact, the old httpd is still running.  This is rare,
but I've had it happen to me.

To be 100% certain, use 'stop' to stop Apache and then do:
ps aux | grep httpd

You should see only the grep httpd output, or no output at all.

If you see a bunch of httpd process running, you didn't stop Apache.

Find a way to stop Apache.  Either use some other script to stop it (like
whatever is in your /etc/rc.d/* files) or some other version of apachectl
that works better with your httpd or...  Hell, kill -9 it, I guess...

Then start Apache, and triple check ?php phpinfo();? shows the php.ini
file being read from the same directory you edited php.ini

[*] I'm told that in Apache 2, there is a phpIniDir directive you can set
in httpd.conf to tell PHP where to find php.ini instead of being forced to
re-compile or (easier) move your php.ini where your PHP Module binary
expects it.  While that may be true, I'm sticking with an answer that fits
all situations.  Let him fight with phpIniDir some other day.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Re: why are session only working with cookies?

2005-05-14 Thread Brian V Bonini
On Fri, 2005-05-13 at 23:31, Jason Wong wrote:
 On Saturday 14 May 2005 09:42, Brian V Bonini wrote:
 
  Yeah, I know session support is there and I DO NOT have it set to use
  ONLY cookies. But if I disable cookies in the browser stuff relying on
  sessions stops working. I'm using 5.0.3
 
  session.use_trans_sid
  0
  0
 
 Set that to 1. Sessions *are* cookies, they're cookies that have been set 
 to expire when the browsing session finishes (ie when the browser is 
 closed).

I thought the idea was; cookies if available otherwise the session data
gets serialized and propagated in the URL? The later of which appears to
not work, for me, if applicable

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



Re: [PHP] Re: why are session only working with cookies?

2005-05-14 Thread Richard Lynch
On Sat, May 14, 2005 7:49 am, Brian V Bonini said:
 On Fri, 2005-05-13 at 23:31, Jason Wong wrote:
 On Saturday 14 May 2005 09:42, Brian V Bonini wrote:

  Yeah, I know session support is there and I DO NOT have it set to use
  ONLY cookies. But if I disable cookies in the browser stuff relying on
  sessions stops working. I'm using 5.0.3

  session.use_trans_sid
  0
  0

 Set that to 1. Sessions *are* cookies, they're cookies that have been
 set
 to expire when the browsing session finishes (ie when the browser is
 closed).

 I thought the idea was; cookies if available otherwise the session data
 gets serialized and propagated in the URL? The later of which appears to
 not work, for me, if applicable

Sessions are *NOT* cookies.  PHP sessions use *A* Cookie to maintain state
-- specifically to indentify a singe user/browser on repeat HTTP
connections.

The session *data* is not going to be transmitted in the URL -- Only the
Cookie name/value pair will go in the URL.

Using Cookies, or using URL, the session DATA will be stored on the server
in /tmp files -- Unless you change php.ini to store them somewhere else,
in which case, again, the Cookie and URL only holds the ID and all the
data goes wherever you store it:  database, shared memory, or an army of
elves for all PHP cares.

If trans_sid is not working for you, let's narrow this down:

If you do this:
?php
  session_start();
  echo a href=\yourdomainnamehere.com\click me/abr /\n;
?

Do you see something like ?PHPSESSID=a847hjfu3734hgfjgurur tacked on to
the end of the URL?

If not, trans_sid is NOT enabled.

Did you restart Apache?

Did you turn *OFF* Cookies?  If PHP *can* use Cookies, I think it's gonna
use Cookies, and not bother with the trans_sid stuff, though maybe it
always puts it there.  I never really dived into that.  To be certain,
though, turn off Cookies in php.ini and/or in your browser.

Re-start Apache for your php.ini changes to kick in.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Re: why are session only working with cookies?

2005-05-13 Thread Jason Barnett
Brian V Bonini wrote:
Everything in php.ini seems to be correct. Is there soem thign I'm
supposed to pass to 'configure' at compile time?
Session support is now built-in by default, so unless you specifically 
compile without it then you should have support for sessions in your 
build.  Although yes, there are several php.ini settings that can modify 
cookie behavior:

?php
/**
http://php.net/manual/en/ref.session.php#ini.session.use-only-cookies
Don't force PHP to only use cookie propagation for session
*/
ini_set('session.use_only_cookies', 0);
/**
http://php.net/manual/en/ref.session.php#ini.session.use-trans-sid
Optional, may not even work for your version of PHP
*/
ini_set('session.use_trans_sid', 1);
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: why are session only working with cookies?

2005-05-13 Thread Brian V Bonini
On Fri, 2005-05-13 at 17:51, Jason Barnett wrote:
 Brian V Bonini wrote:
  Everything in php.ini seems to be correct. Is there soem thign I'm
  supposed to pass to 'configure' at compile time?
 
 Session support is now built-in by default, so unless you specifically 
 compile without it then you should have support for sessions in your 
 build.  Although yes, there are several php.ini settings that can modify 
 cookie behavior:

Yeah, I know session support is there and I DO NOT have it set to use
ONLY cookies. But if I disable cookies in the browser stuff relying on
sessions stops working. I'm using 5.0.3

phpinfo() session data:

Session Support 
enabled 

Registered save handlers 
files user sqlite 

Registered serializer handlers 
php php_binary 

session.auto_start
Off
Off

session.bug_compat_42
On
On

session.bug_compat_warn
On
On

session.cache_expire
180
180

session.cache_limiter
nocache
nocache

session.cookie_domain
no value
no value

session.cookie_lifetime
0
0

session.cookie_path
/
/

session.cookie_secure
Off
Off

session.entropy_file
no value
no value

session.entropy_length
0
0

session.gc_divisor
100
100

session.gc_maxlifetime
1440
1440

session.gc_probability
1
1

session.hash_bits_per_character
4
4

session.hash_function
0
0

session.name
PHPSESSID
PHPSESSID

session.referer_check
no value
no value

session.save_handler
files
files

session.save_path
/tmp
/tmp

session.serialize_handler
php
php

session.use_cookies
On
On

session.use_only_cookies
Off
Off

session.use_trans_sid
0
0

-- 

s/:-[(/]/:-)/g


BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org

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



Re: [PHP] Re: why are session only working with cookies?

2005-05-13 Thread Jason Wong
On Saturday 14 May 2005 09:42, Brian V Bonini wrote:

 Yeah, I know session support is there and I DO NOT have it set to use
 ONLY cookies. But if I disable cookies in the browser stuff relying on
 sessions stops working. I'm using 5.0.3

 session.use_trans_sid
 0
 0

Set that to 1. Sessions *are* cookies, they're cookies that have been set 
to expire when the browsing session finishes (ie when the browser is 
closed).

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
New Year Resolution: Ignore top posted posts

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



Re: [PHP] Re: Why is it possible to assign data to _not_declared_ vars in a class (PHP 5.0.3)?

2005-04-09 Thread hanez
On Friday 08 April 2005 20:22, Matthew Weier O'Phinney wrote:
 * Johannes Findeisen [EMAIL PROTECTED]:
  If i understand right, all variables should be declared in PHP5.  So
  why is it possible to add a membervariable called c to the object
  without making a declaration? I got no error with this. I thought
  E_STRICT should show me things like that. Could someone explain me
  that?

 You don't understand correctly. Class properties/attributes do not need
 to be explicitly declared in PHP. This did *not* change in PHP5. What
 changed in PHP5 is visibility. By default, unless declared otherwise, a
 class attribute is publicly visible -- the same behaviour seen in PHP4.

Okay, allright. I missunderstood that. But wouldn't it be nice to see things 
like this in the error log when E_STRICT is activated. I know some 
programming languages and i ever have dreamed about some features like this 
in PHP5 and the main thing i was dreaming about was strict declaration. Now 
since PHP5 i have thought about programming PHP again because of features 
which would help me debugging my code. And this is not implemented perfectly. 

I have some days ago allready posted a PHP5 issue which i thought that it 
should be catched from the internal error handling with E_STRICT on. You can 
see it here:

http://www.spinics.net/lists/php/msg117368.html

Thanks,
have a nice day.


Johannes Findeisen

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



Re: [PHP] Re: Why is it possible to assign data to _not_declared_ vars in a class (PHP 5.0.3)?

2005-04-09 Thread Matthew Weier O'Phinney
* Hanez [EMAIL PROTECTED]:
 On Friday 08 April 2005 20:22, Matthew Weier O'Phinney wrote:
  * Johannes Findeisen [EMAIL PROTECTED]:
   If i understand right, all variables should be declared in PHP5.  So
   why is it possible to add a membervariable called c to the object
   without making a declaration? I got no error with this. I thought
   E_STRICT should show me things like that. Could someone explain me
   that?
 
  You don't understand correctly. Class properties/attributes do not need
  to be explicitly declared in PHP. This did *not* change in PHP5. What
  changed in PHP5 is visibility. By default, unless declared otherwise, a
  class attribute is publicly visible -- the same behaviour seen in PHP4.

 Okay, allright. I missunderstood that. But wouldn't it be nice to see things 
 like this in the error log when E_STRICT is activated. I know some 
 programming languages and i ever have dreamed about some features like this 
 in PHP5 and the main thing i was dreaming about was strict declaration. Now 
 since PHP5 i have thought about programming PHP again because of features 
 which would help me debugging my code. And this is not implemented perfectly. 

E_STRICT doesn't catch it because it's not considered bad behaviour;
this is perfectly legal behaviour according to the PHP parser.

PHP doesn't have the same scoping issues as, say, Perl. Variables in PHP
do *not* need to be pre-declared (though testing for a value on an
undeclared variable, be it in a class or otherwise, *will* generate an
E_NOTICE). This is a *difference* in PHP from other languages, and
likely exists for a reason. If you want to know why it exists that way,
or feel it should be changed, you should probably go over to the php-dev
list.

-- 
Matthew Weier O'Phinney   | WEBSITES:
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

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



[PHP] Re: Why is it possible to assign data to _not_declared_ vars in a class (PHP 5.0.3)?

2005-04-08 Thread Matthew Weier O'Phinney
* Johannes Findeisen [EMAIL PROTECTED]:
 Hello All,

 Why is this working?

 ?php

 class foobar {

 public
 $a,
 $b;

 public function __construct() {
$this-a = Hello ;
$this-b = world! ;
$this-c = Good bye... ;
 }

 public function foo() {
 echo $this-a.br;
 echo $this-b.br;
 echo $this-c.br; 
 }
 }

 ?

 CALL:
 $test = new foobar();
 $test-foo();

 OUTPUT:
 Hello
 world
 Good bye...



 If i understand right, all variables should be declared in PHP5.  So
 why is it possible to add a membervariable called c to the object
 without making a declaration? I got no error with this. I thought
 E_STRICT should show me things like that. Could someone explain me
 that?

You don't understand correctly. Class properties/attributes do not need
to be explicitly declared in PHP. This did *not* change in PHP5. What
changed in PHP5 is visibility. By default, unless declared otherwise, a
class attribute is publicly visible -- the same behaviour seen in PHP4.

-- 
Matthew Weier O'Phinney   | WEBSITES:
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

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



[PHP] Re: Why is my class throwing this error?

2005-02-16 Thread Dan Phiffer
NathanielGuy#21 wrote:
Error thrown
--
Parse error: parse error, unexpected T_STRING in
/home/blacknut/public_html/picserv/includes/gallery.class on line 52
--
For what it's worth, I'm able to execute the code without parse errors 
(v5.0.3). A long shot, but could there be another file called 
gallery.class that you've mistaken for this one? (I've done that a 
couple times.)

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


Re: [PHP] Re: Why is my class throwing this error?

2005-02-16 Thread Bret Hughes
On Wed, 2005-02-16 at 23:11, Dan Phiffer wrote:
 NathanielGuy#21 wrote:
  Error thrown
  --
  Parse error: parse error, unexpected T_STRING in
  /home/blacknut/public_html/picserv/includes/gallery.class on line 52
  --
 
 For what it's worth, I'm able to execute the code without parse errors 
 (v5.0.3). A long shot, but could there be another file called 
 gallery.class that you've mistaken for this one? (I've done that a 
 couple times.)
 

what about stray no native linefeeds or other non printable chars?

delete the line and retype it.

Bret

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



Re: [PHP] Re: Why is access and visibility mixed up in PHP?

2005-01-23 Thread Terje Slettebø
From: Matthew Weier O'Phinney [EMAIL PROTECTED]

 * Terje Slettebø [EMAIL PROTECTED]:
  (I've posted this to the PHP newsgroups, as well, but as many here might
not
  read them, I post here, as well. I hope that's not considered
overboard,
  and if so, please let me know)

 The newsgroups are simply an NNTP interface to the mailing lists -- use
 one or the other; either way, it gets to the same place.

Ah, thanks. Sorry for the double-posts, then.

 snip -- class with private method, subclass with private method
 
  The above won't work, or at least not work as intended: The function
  null_action() will only be visible in the class it's defined, and
therefore
  the derived class version won't override the base class version. In
order to
  get it to work, the access specifiers have to be changed to protected.
This
  means that derived classes may also _call_ the function, something that
is
  not desired. This means I can't enforce this design constraint of having
  this function private.
 
  Why is it done like this?

 I'm not sure why the behaviour is as it is, but I do know that PHP
 developers were heavily influenced by Java when writing the new PHP5
 object model; I suspect your answers may lie there.

Yes, I think so, too, and I thought of that, as well. I think it does
something similar. I checked now: yep, it does the same there.

 One question I have to ask of you: why would you want the derived class
 to be able to know a method exists if it will not be able to call it?
 This seems to me to be... well, silly. Either the method is available to
 the class or it isn't and/or the method is available to an instantiated
 object or it isn't; visibility as being orthagonal to access just
 doesn't make a lot of sense to me. Perhaps you could make a case as to
 when this would be beneficial?

I realise that it may seem counter-intuitive or strange, but in this case it
actually makes sense: To take a practical example: A stopwatch FSM (example
from boost::fsm
(http://cvs.sourceforge.net/viewcvs.py/*checkout*/boost-sandbox/boost-sandbo
x/libs/fsm/doc/index.html?content-type=text%2Fplainrev=1.31)). Here's a
complete, working example (except for the fsm class):

--- Start code ---

include_once(fsm.php);

// States (nested classes are not supported, so these must be at global
scope)

class active {}
class running extends active {}
class stopped extends active {}

class stopwatch_fsm extends fsm
{
  public function stopwatch_fsm()
  {
$this-fsm(stopped); // Initial state
$this-add_transitions($this-transitions);
  }

  protected function start($from_state,$to_state)
  {
echo Start stopwatchbr;
  }

  protected function stop($from_state,$to_state)
  {
echo Stop stopwatchbr;
  }

  protected function reset($from_state,$to_state)
  {
echo Reset stopwatchbr;
  }

  private $transitions=array(
//signal, state, new state, action
array(Start/stop button, stopped, running,start),
array(Start/stop button, running, stopped,stop),
array(Reset button, active, stopped,reset));
}

--- End code ---

To explain the above:  The FSM stopwatch_fsm contains a state active, with
two nested states running and stopped. These are modelled as classes.
The transitions between the states are defined in the above array, each line
gives a signal/initial state/final state/action for a transition. For
example, if it's in the stopped state, and receives a Start/stop button
signal, it transitions to the running state, and calls the start() member
function. Same for the other two defined transitions.

Test program:

include_once(stopwatch_fsm.php);

$test=new stopwatch_fsm();

$test-process(Start/stop button);
$test-process(Start/stop button);
$test-process(Start/stop button);
$test-process(Reset button);

This will print:

Start stopwatch
Stop stopwatch
Start stopwatch
Reset stopwatch

The idea is that fsm will, upon doing state transitions, call the
appropriate action functions, as member functions (here, start/stop/reset),
so these have to be defined in the derived class. Interestingly, this
actually works even if start/stop/reset are _not_ defined in the base class,
fsm (!)

I seem to have talked myself into a corner. :) As these functions are not
defined in the base class, they are _not_ overridden in the derived class;
they are merely defined there. The example I had in the original posting was
a member function that _was_ defined in the base class, and overridden in
the derived class (null_action). This is the member function that gets
called, if no specific action function is provided in the transition table.

In _that_ example, the derived class would need to be able to override it,
but need not be able to call it (as it's called by the base class).

I hope this makes some kind of sense... :)

(By the way, besides pear::fsm, this is also inspired by the mentioned
boost::fsm, which also uses classes to model states)

 You might also want to take some of your questions to the php-dev list
 -- they 

Re: [PHP] Re: Why no type hints for built-in types?

2005-01-23 Thread Terje Slettebø
From: Matthew Weier O'Phinney [EMAIL PROTECTED]

 * Terje Slettebø [EMAIL PROTECTED]:
  In PHP5, you can provide type hints for functions, like this:
 
  class Person {...}
 
  function f(Person $p)
  {
...
  }
 
  Since this is optional static typing for objects, why not make the same
  capability available for all types, built-in types included?
 
  I come from a background with generally static and strong typing (C++,
  Java), and having worked with PHP a couple of years, I've quite a few
times
  got bitten by stupid bugs that could have been caught by static typing,
such
  as passing an empty string - which gets converted to 0 in an arithmetic
  context, when the function was supposed to receive a number, or some
such,
  and no error is reported. These bugs can be hard to find.

 This is where the === and !== comparison operators can come in handy, as
 they compare not only the values but the types. I often need to do this
 when checking for zeroes.

Hm, good point. However, this essentially means you have to do manually
what the compiler could have done. For example:

function f($a,$b,$c)
{
  assert(is_int(\$a));
  assert(is_string(\$b));
  assert(is_array(\$c));

  // Actual function content here
}

At one time, I actually started to do this, but in the end, I found it
cluttered more than it helped; all those extra lines for each parameter:
clearly, the language worked against me on this. On the other hand, had I
been able to do this:

function f(int $a,string $b,array $c)
{
  // Actual function content here
}

then it would have been just fine. It also works as documentation,
specifying what the function expects (and might also specify what it
returns).

  This has been suggested in a few Q  A's at Zend, such as this one:
  http://www.zend.com/expert_qa/qas.php?id=104single=1
 
  snip
 
  I don't find this answer satisfactory. Yes, PHP has loose/weak typing,
but
  at any one time, a value or a variable has a distinct type. In the
example
  in the quote above, you'd have to ensure that the value you pass is of
the
  right type.

 I can recognize that this answer would not be satisfactory for someone
 with a background in traditional application architecture. However, PHP
 has been developed from the beginning as a programming language for the
 web. Since the nature of web requests is to transfer all values as
 strings, PHP needs to be able to compare items of different types -- '0'
 needs to evaluate to the same thing as 0. This may not be optimal for
 many applications, but for most web applications to which PHP is
 applied, it is considered a *feature*.

Yes, and I'm not against the dynamic/loose typing of PHP. However, as
mentioned in the other reply to Rasmus Lerdorf, there may be areas in your
application where the types are well-defined (not from GET/POST), and where
this might help. Even with GET/POST requests, it's often recommended to
sanitize/check these before using the values, and in this process, you
might fix the types (you can't very well check a a value you don't know the
expected type for).

  This would also open the door to overloading, although it seems from the
  replies from Andi and Zeev in the Zend forums that neither optional
static
  typing, nor overloading is considered at this time, and likely not in
the
  future, either. :/

 PHP already supports overloading as you're accustomed to it -- the
 syntax is different, and PHP refers to the practice as variable-lentgh
 argument lists. You use func_num_args(), func_get_args(), and
 func_get_arg() to accomplish it:

 function someOverloadedFun()
 {
 $numargs = func_num_args();
 $args= func_get_args();
 if (0 == $numargs) {
 return ERROR!;
 }
 if (1 == $numargs) {
 if (is_string($args[0])) {
 return Received string: $args[0];
 } elseif (is_object($args[0])) {
 return Received object!;
 }
 } elseif ((2 == $numargs)) {
 return Received arg0 == $args[0] and arg1 == $args[1];
 }
 // etc.
 }

 Yes, this is more cumbersome than providing hints

Indeed, and it means all the selection have to be done in _one_ function.
Sure, varargs can give you some kind of overloading, but as with using
assert and is_* above, to check for incoming types, you essentially have to
manually provide the overloading (by checking argument number and types,
and dispatching appropriately), and then the alternative of using
differently named functions really look more appealing...

Besides, this makes the switch function a dependency hog: Every
overloaded function you add means you have to change it. If it's in a
third-party library, this may not be useful option.

  There's a rather lively discussion about adding optional static typing
in
  Python (http://www.artima.com/weblogs/viewpost.jsp?thread=85551), and
unless
  it has already been, maybe it's time for us to consider it for PHP, as
well.
  The current static type checking in PHP5 is something rather 

Re: [PHP] Re: Why is access and visibility mixed up in PHP?

2005-01-23 Thread Jochem Maas
Terje Slettebø wrote:
From: Matthew Weier O'Phinney [EMAIL PROTECTED]


Ah, I didn't know about that one. I didn't find it here:
http://www.php.net/mailing-lists.php How can I subscribe to it?
its alternatively call 'php internals', I have read a lot of your 
questions/arguments regarding access/visibility/typehints - some of them 
seem more a case of you needing to adjust to PHP's way of thinking that 
that PHP necessarily does it wrong (its just very different to C/Java 
:-), then again other points you make are valid - either way I'm not the 
one to judge --- I just thought I'd mention that such things have been 
discussed/argued over on the php internals mailing list in some depth 
over the last year, i.e. you may get very short answers :-)

Regards,
Terje
P.S. Why does replies to list posting go to the sender, rather than the
list, by default? Shouldn't reply-to be set to the list, as usual? I had to
manually edit the address, to make the reply go to the list.
don't even start about these mailing list setups! - be glad they work at 
all :-) - btw, it seems, that on php mailing lists reply-all is the norm 
and that bottom-post are generally preferred to top-posts.

PS - I enjoyed your posts!

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


Re: [PHP] Re: Why no type hints for built-in types?

2005-01-23 Thread Jochem Maas
Terje Slettebø wrote:
...
I certainly know that a number of bugs I've encountered could have been
found with type hints for built-in types, so I think it would be useful. The
question, of course, is whether most PHP developers don't think so. Also, we
don't have any experience with it in PHP.
Personally I like PHP(5) the way it is now - rather than keep adding new 
functionality I would rather welcome bew/better documentation (not a dig 
at the dev or the docteam - I know that there are difficult issues AND 
that writing docs is a, hard and b, often is thankless task!) on SPL etc

and I do wish they had left the 'bug' in that allowed syntax like:
function (MyClass $var = null)
{
...
}
but they didn't so I changed my code - basically I don't always agree 
with what the dev decide to do with the tool I use most to earn money BUT:

1. these guys are all better 'hackers' than me.
2. they hand out their work from free.
3. life is a box of choloclates... and God doesn't give a  as to 
whether I like the cherry fillings or not :-)

rgds,
Jochem.
Thanks for your replies.
Regards,
Terje
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Why is access and visibility mixed up in PHP?

2005-01-23 Thread Terje Slettebø
From: Jochem Maas [EMAIL PROTECTED]

 Terje Slettebø wrote:
 From: Matthew Weier O'Phinney [EMAIL PROTECTED]
 
  Ah, I didn't know about that one. I didn't find it here:
  http://www.php.net/mailing-lists.php How can I subscribe to it?

 its alternatively call 'php internals'

Ah. I thought that was something else.

, I have read a lot of your
 questions/arguments regarding access/visibility/typehints - some of them
 seem more a case of you needing to adjust to PHP's way of thinking that
 that PHP necessarily does it wrong (its just very different to C/Java
 :-),

That may well be. :) As mentioned, I've worked with PHP a couple of years,
but have been doing C++/Java much longer (and C before that). I have started
to adjust to the dynamic nature of PHP, and as mentioned in another post,
about variable variable functions and variables, there are some useful
things that this enables, as well.

Nonetheless, the discussion of explicit/implicit typing is a valid one, and
my posts were not at least meant to see what other people think, and if
there are other approaches that kind of compensate for the risk of bugs with
implicit/dynamic typing. Guido van Rossum (Python's creator) and some others
have argued that unit tests may make up for it. Well, unit tests are nice,
but with type checking by the compiler/runtime, you may concentrate on the
non-trivial tests instead, rather than testing something the
compiler/runtime is perfectly able to do by itself.

 then again other points you make are valid - either way I'm not the
 one to judge --- I just thought I'd mention that such things have been
 discussed/argued over on the php internals mailing list in some depth
 over the last year, i.e. you may get very short answers :-)

Well, but this is great news. :) I.e. then I have a place to look. As I said
at the start, I hadn't found discussion about this, but then, I haven't
really known which archive(s) to search, either.

Of course, people won't have to go into a discussion that has happened
before; just point to a previous one, as you did. :)

  P.S. Why does replies to list posting go to the sender, rather than the
  list, by default? Shouldn't reply-to be set to the list, as usual? I had
to
  manually edit the address, to make the reply go to the list.

 don't even start about these mailing list setups!

LOL. :) Apparently a recurring theme. :)

 - be glad they work at
 all :-) - btw, it seems, that on php mailing lists reply-all is the norm

I use reply-all, but that also includes the sender as recipient, which I
usually edit out: No need to give them two copies of a posting.

 and that bottom-post are generally preferred to top-posts.

Aren't they everywhere. ;)

 PS - I enjoyed your posts!

Thanks. :) I haven't received any flames, yet, at least. :) I didn't really
know how they would be received, given that I don't know the community.
(I've usually been hanging around the ACCU lists, as well as Boost, and
comp.lang.c++.moderated, comp.std.c++, so I mostly know the C++ community.)

Regards,

Terje

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



[PHP] Re: Why is access and visibility mixed up in PHP?

2005-01-22 Thread Matthew Weier O'Phinney
* Terje Slettebø [EMAIL PROTECTED]:
 (I've posted this to the PHP newsgroups, as well, but as many here might not
 read them, I post here, as well. I hope that's not considered overboard,
 and if so, please let me know)

The newsgroups are simply an NNTP interface to the mailing lists -- use
one or the other; either way, it gets to the same place.

 Today, I worked on an implementation of a finite state machine. 
snip
 The base class defines some
 (virtual) functions that may be overridden in a derived class, but they are
 only called from the base class. My original code was as follows
snip:

snip -- class with private method, subclass with private method

 In C++ this would work just fine: As null_action() is called from fsm, and
 it's private in fsm, this works fine. It gets overridden in my_fsm, but
 being private in fsm, it can only be called there (not in my_fsm), which is
 as intended. This is because access and visibility are orthogonal concepts
 in C++: The access specifiers only specify who are allowed to access (as in
 calling, taking the address of, etc.) a function, but it doesn't affect
 overriding.

 The reason for this is as follows (from The Design and Evolution of C++):
 By not letting the access specifiers affect visibility (including
 overriding), changing the access specifiers of functions won't affect the
 program semantics.

 However, this is not so for PHP...

 The above won't work, or at least not work as intended: The function
 null_action() will only be visible in the class it's defined, and therefore
 the derived class version won't override the base class version. In order to
 get it to work, the access specifiers have to be changed to protected. This
 means that derived classes may also _call_ the function, something that is
 not desired. This means I can't enforce this design constraint of having
 this function private.

 Why is it done like this?

I'm not sure why the behaviour is as it is, but I do know that PHP
developers were heavily influenced by Java when writing the new PHP5
object model; I suspect your answers may lie there. 

One question I have to ask of you: why would you want the derived class
to be able to know a method exists if it will not be able to call it?
This seems to me to be... well, silly. Either the method is available to
the class or it isn't and/or the method is available to an instantiated
object or it isn't; visibility as being orthagonal to access just
doesn't make a lot of sense to me. Perhaps you could make a case as to
when this would be beneficial?

You might also want to take some of your questions to the php-dev list
-- they seem to be more related to the internals of PHP than PHP usage.

-- 
Matthew Weier O'Phinney   | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org

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



[PHP] Re: Why no type hints for built-in types?

2005-01-22 Thread Matthew Weier O'Phinney
* Terje Slettebø [EMAIL PROTECTED]:
 In PHP5, you can provide type hints for functions, like this:

 class Person {...}

 function f(Person $p)
 {
   ...
 }

 Since this is optional static typing for objects, why not make the same
 capability available for all types, built-in types included?

 I come from a background with generally static and strong typing (C++,
 Java), and having worked with PHP a couple of years, I've quite a few times
 got bitten by stupid bugs that could have been caught by static typing, such
 as passing an empty string - which gets converted to 0 in an arithmetic
 context, when the function was supposed to receive a number, or some such,
 and no error is reported. These bugs can be hard to find.

This is where the === and !== comparison operators can come in handy, as
they compare not only the values but the types. I often need to do this
when checking for zeroes.

 This has been suggested in a few Q  A's at Zend, such as this one:
 http://www.zend.com/expert_qa/qas.php?id=104single=1

 --- Start quote ---

 Will be a support for type hints of simple types, like
 class Foo{
 public function bar(int $var) {}
 }

 No, type hints of simple types will not be supported. The reason is
 PHP's dynamic nature. A number posted to a script will arrive as a string
 even though it's a number. In this case, PHP assumes that 10 and 10 are
 the same thing. Having such type hints would not fit into this
 auto-conversion of PHP.

 --- End quote ---

 I don't find this answer satisfactory. Yes, PHP has loose/weak typing, but
 at any one time, a value or a variable has a distinct type. In the example
 in the quote above, you'd have to ensure that the value you pass is of the
 right type.

I can recognize that this answer would not be satisfactory for someone
with a background in traditional application architecture. However, PHP
has been developed from the beginning as a programming language for the
web. Since the nature of web requests is to transfer all values as
strings, PHP needs to be able to compare items of different types -- '0'
needs to evaluate to the same thing as 0. This may not be optimal for
many applications, but for most web applications to which PHP is
applied, it is considered a *feature*.

 This would also open the door to overloading, although it seems from the
 replies from Andi and Zeev in the Zend forums that neither optional static
 typing, nor overloading is considered at this time, and likely not in the
 future, either. :/ What I have seen of arguments against it, I haven't found
 sufficiently convincing, so therefore I'd like to hear about the pros and
 cons of optional static typing, and possibly overloading (however, that
 should really be a separate thread). What the PHP manual calls overloading
 has really nothing to do with the concept of overloading in other OO
 languages, such as C++/Java.

PHP already supports overloading as you're accustomed to it -- the
syntax is different, and PHP refers to the practice as variable-lentgh
argument lists. You use func_num_args(), func_get_args(), and
func_get_arg() to accomplish it:

function someOverloadedFun()
{
$numargs = func_num_args();
$args= func_get_args();
if (0 == $numargs) {
return ERROR!;
}
if (1 == $numargs) {
if (is_string($args[0])) {
return Received string: $args[0];
} elseif (is_object($args[0])) {
return Received object!;
}
} elseif ((2 == $numargs)) {
return Received arg0 == $args[0] and arg1 == $args[1];
}
// etc.
}

Yes, this is more cumbersome than providing hints -- but typically, if I
design properly, I'm checking types within already, and I've already
determined a way to limit what is passed to the function/method. One
technique I use is to pass a single associate array to a function or
method, and grab my arguments from that. 

 There's a rather lively discussion about adding optional static typing in
 Python (http://www.artima.com/weblogs/viewpost.jsp?thread=85551), and unless
 it has already been, maybe it's time for us to consider it for PHP, as well.
 The current static type checking in PHP5 is something rather half-baked,
 only covering user-defined types.

I can definitely see a use for this -- but, again, PHP has been designed
with loose typing as a *feature*. While type hinting may be a nice
additional feature, I have my doubts as to the necessity or overhead it
would incur.

-- 
Matthew Weier O'Phinney   | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org

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



[PHP] Re: Why it doesnt work

2004-12-10 Thread M. Sokolewicz
register_globals? :)
Aalee wrote:
Hi ive tried this script and it doesnt seem to work for me. I have typed
exactly the same username and password in the script..it keeps on asking for
the username and password..pls help...cud this be due to a setting in the
php or apache server...am using php 4.3 and apache 1.3.33...the code is
?php
if (!isset($PHP_AUTH_USER)) {
 header('WWW-Authenticate: Basic realm=My Private Stuff');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
} else if (isset($PHP_AUTH_USER)) {
if (($PHP_AUTH_USER != admin) || ($PHP_AUTH_PW != abc123)) {
header('WWW-Authenticate: Basic realm=My Private 
Stuff');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
} else {
echo 
PYou're authorized!/p
;
}
}

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


  1   2   >