Re: [PHP] mail function and headers

2008-03-12 Thread Alain Roger
Hi Chris,

interesting thing, but i get the following error message :
*Warning*: mail()
[function.mail]:
SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE
MODE. in */test4/common/sendmail.php* on line *119*

how can i solve this by only PHP ? i do not have access to web hosting
server or php.ini.
thx,
Alain.


On Thu, Mar 13, 2008 at 12:57 AM, Chris <[EMAIL PROTECTED]> wrote:

>
> > as you can see my Return-Path is still pointing on the wrong direction
> :-(
> > any other idea ?
>
> return-path is set with the 5th mail() param:
>
> mail($to, $subject, $body, $headers, '[EMAIL PROTECTED]');
>
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>



-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


[PHP] Re: PHP & Ajax progress bar

2008-03-12 Thread Manuel Lemos
Hello,

on 03/12/2008 12:24 AM Shelley said the following:
> Hi all,
> 
> I'm searching some file upload progress bar code.
> But no good result was found. :(
> So is there anybody please be kind enough to show some code here?

You may want to take a look at this forms generation and validation
class that comes with a plug-in to do precisely that. Check the
test_upload_progress.php example script.

http://www.phpclasses.org/formsgeneration


Here is a live example page so you can see it in action:

http://www.meta-language.net/forms-examples.html?example=test_upload_progress


You can also watch this tutorial video to learn more about this plug-in:

http://www.phpclasses.org/browse/video/1/package/1/section/plugin-upload-meter.html


You may also want to read this blog article about the subject:

http://www.phpclasses.org/blog/post/61-File-upload-progress-meter-for-PHP-4-at-last.html

-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Wolf

Stut wrote:

On 12 Mar 2008, at 17:31, Wolf wrote:

 Richard Heyes <[EMAIL PROTECTED]> wrote:

Greg Donald wrote:

You're
gonna restrict the entire development team from using a given feature
just because you don't want to invest 20 minutes in getting your
newbie developer up to spead?  That's pure idiocy.


No it's not. It's not like require_once() is a hassle to type/use
anyhow. Things like editor macros and templates help out enormously and
by using them over __auto load you (a business) could save yourself a
lot of time and hence money.


I actually prefer to use a site prepend and append, then in the 
prepend file is where I throw all my requires and such.  pretty much 
takes care of any learning curve since with the prepended file doing 
the heavy lifting.


But by doing so you're including a lot of code you almost certainly 
don't use on every page. That can pointlessly consume resources on a 
busy server.
Actually, I do use it on every page, as it handles all the user 
authentication checks.  ;)


I use __autoload (and for new projects the SPL version) because I know 
that anyone who can't "get it" within 5 minutes is not someone I want to 
work with.
I gotta agree with you there, I don't limit things because someone can't 
"get it" within a reasonable amount of time.


Not using language features because some developers might not know about 
it is going to restrict you to the sort of instruction set you get in 
Assembler. I've been working with PHP for a very long time and I 
certainly don't claim to know everything about it or about every feature 
it has. Restrict your code in that way and you'll create a slow 
unmaintainable mess.


I hate unmaintanable code, it gets REALLY difficult to handle.  I go 
through and re-write my old code as I learn more new "tricks" with the 
newer versions of PHP.  After 7 years I am still learning new things 
with it.


Wolf


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



Re: [PHP] avoid calling php script

2008-03-12 Thread Wolf

H u g o H i r a m wrote:

Hello

I have a swf that runs a PHP script that generates a XML, on the PHP is 
there any way to detect if the file is being called from the swf or from 
the browser? because I want to avoid the file being run directly from 
the browser or from any other file than the swf.


regards,
Hugo.


Install Firebug extension for your Firefox browser
Load your page in the browser with firebug running
Watch the calls being made and that should answer the question

You can also look at the web server logs to see which page is calling 
your script.


Wolf


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



Re: [PHP] avoid calling php script

2008-03-12 Thread Steve Edberg

At 3:55 AM +0100 3/13/08, H u g o H i r a m wrote:

Hello

I have a swf that runs a PHP script that generates a XML, on the PHP 
is there any way to detect if the file is being called from the swf 
or from the browser? because I want to avoid the file being run 
directly from the browser or from any other file than the swf.


regards,
Hugo.



You might want to check the HTTP_REFERER value; test the program from 
a browser and the swf, and see what happens. Alternatively you could 
use a GET parameter like


   http://example.com/yourscript.php?calledby=swf

Be aware that anything sent back from the client can be spoofed - and 
HTTP_REFERER can be altered or disabled -  so it probably wouldn't be 
hard for someone to make it appear to your script that it is being 
called by your SWF.


If you're really concerned about restricting the communication 
between the Flash movie and your server, there might be some way to 
build a challenge-response mechanism into the flash; I don't know 
much about it.


If, on the other hand, you just don't want to confuse someone who 
might accidentally run the XML-generating script from the browser, 
checking a GET parameter as above is probably the safest. If it's not 
set properly, redirect the user, eg:


   if (!isset($_GET['calledby']) || $_GET['calledby'] != 'swf') {
  header('Location: http://example.com/thecorrectpage.html');
  exit();
   }
   ...

- steve

--
+--- my people are the people of the dessert, ---+
| Steve Edberghttp://pgfsun.ucdavis.edu/ |
| UC Davis Genome Center[EMAIL PROTECTED] |
| Bioinformatics programming/database/sysadmin (530)754-9127 |
+ said t e lawrence, picking up his fork +

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



Re: [PHP] avoid calling php script

2008-03-12 Thread John Comerford

May the get_Browser function could tell you if it's from the .swf ?

http://us.php.net/manual/en/function.get-browser.php


H u g o H i r a m wrote:

Hello

I have a swf that runs a PHP script that generates a XML, on the PHP 
is there any way to detect if the file is being called from the swf or 
from the browser? because I want to avoid the file being run directly 
from the browser or from any other file than the swf.


regards,
Hugo.




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



[PHP] avoid calling php script

2008-03-12 Thread H u g o H i r a m

Hello

I have a swf that runs a PHP script that generates a XML, on the PHP is 
there any way to detect if the file is being called from the swf or from 
the browser? because I want to avoid the file being run directly from 
the browser or from any other file than the swf.


regards,
Hugo.

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Nathan Nobbe
On Wed, Mar 12, 2008 at 9:23 PM, Robert Cummings <[EMAIL PROTECTED]>
wrote:

> On Wed, 2008-03-12 at 17:05 -0500, Greg Donald wrote:
> > /me points to SPL and laughs his ass off
>
> I don't use SPL.


i do.

it makes handling recursion and a number of other tasks a breeze.  not
liking it because the identifier names are too long is silly (greg).  get an
editor w/ code completion if its that big of an issue for you.  o wow, my
identifiers are smaller, that makes my language easier...  not in my book, i
actually prefer longer names for variables when the terms are easier to
understand that way.  its a technique for making code self documenting, and
if i were a ruby programmer i would use it there as well.  there is a
balance that needs to be struck for any highly successful api, obviously
shorter names can be a bit easier to remember, at least to remember what the
names are, but if RecursiveIteratorIterator were RII, i would probly be like
RII, hmm.., i remember the name but not what its for; so id still end up
going back to the manual every time any way.  the best apis are ones that
are so consistent and pragmatic, client developers can remember most of it
w/o going back to the manual and that includes identifiers, their respective
parameter signatures and the semantics.  i would venture to say that where
spl has some long identifiers for class names (which i dont consider an
issue) the api is much more consistent than the standard php api, so in all
i consider it better than the standard api.

the standard api inverts arguments for example in array functions.  if all
of these functions took an array as the first argument, i wouldnt have to
check the docs every time or switch the argument order after the script
blows up the first time.  also there are multiple naming conventions used as
you can see, using underscores, abbreviating / smashing into one complete
term, and camel case (which does appear to be almost exclusively for classes
[so thats not so bad]).  its not the end of the world, but its also not
consistent like spl.  i know spl is much younger than php itself so the
evolution of its api has not been drawn out over many years.  thats probly
one reason why the standard api is a bit inconsistent, but for w/e reason
there it is.  the spl api is cleaner than the standard one.

int *array_push* ( array &$array , mixed $var [, mixed $... ] )
bool *in_array* ( mixed $needle , array $haystack [, bool $strict ] )

string *bcadd* ( string $left_operand , string $right_operand [, int $scale] )
*DOMCharacterData->appendData()*look at string functions for more examples
if you want (http://www.php.net/manual/en/ref.strings.php)

-nathan


Re: [PHP] Why does the host make a difference?

2008-03-12 Thread Chris

Rick Pasotto wrote:

I have a routine that uses the PEAR module CRYPT_BLOWFISH to encrypt a
value and then base64_encode() to create a printable string. If I
reverse the process on the same host I get the orginal value however if
I do the reverse processing on a different host the result is garbage.

Shouldn't both the encryption and the encoding/decoding be host
independent? Aren't both routines standard, public algorithms that
should be reversable even between different operating systems? That's
not my case since both are linux but one is php4 and the other php5.
If that's the problem, why?


More appropriate for a pear list really, but what happens in the pear 
module if a particular encryption method isn't available? Maybe host "A" 
has extra MCRYPT options that host "B" doesn't.


--
Postgresql & php tutorials
http://www.designmagick.com/

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



[PHP] Why does the host make a difference?

2008-03-12 Thread Rick Pasotto
I have a routine that uses the PEAR module CRYPT_BLOWFISH to encrypt a
value and then base64_encode() to create a printable string. If I
reverse the process on the same host I get the orginal value however if
I do the reverse processing on a different host the result is garbage.

Shouldn't both the encryption and the encoding/decoding be host
independent? Aren't both routines standard, public algorithms that
should be reversable even between different operating systems? That's
not my case since both are linux but one is php4 and the other php5.
If that's the problem, why?

-- 
"There are two tragedies in life.  One is to lose your heart's desire.
 The other is to gain it." -- George Bernard Shaw
Rick Pasotto[EMAIL PROTECTED]http://www.niof.net

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings

On Wed, 2008-03-12 at 17:05 -0500, Greg Donald wrote:
> On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > Just because someone got a flashy new toy doesn't mean I want it. I've
> >  got better things to do than play with flashy toys for the mere purpose
> >  of playing with flashy toys. I like to use tools that get jobs done.
> 
> Translation: I'm too lazy to learn anything new since I already know PHP.
> 
> Languages come and go.  There's a reason why we no longer need a
> cgi-bin and Perl to make an animated gif.  Going further, who the hell
> even uses animated gifs any more?

Hmmm, in the spirit of your lazy comment... I actually learned to do web
coding using C code, then Perl, then I moved onto PHP. I have nothing
against learning new things... I'm constantly learning... I even learned
I don't like Ruby.

> > Ummm, I originally looked into Ruby and RoR because someone spouted off
> >  "better" and "easier". After reviewing, looking at the language, trying
> >  some code, reading other peoples blogs, magazine articles, searching the
> >  web... I decided, using the brain I've been nurturing since I was a
> >  fetus, that I preferred PHP.
> 
> Great, just so long as we're clear on the point that Ruby is better
> than PHP, just not for you personally.  I'm totally fine with leaving
> the discussion at the "differently preferred opinion" level.  Sounds
> like a cop-out but I'm ok with your holding that position all the
> same.

It's not a cop out. It's a choice. Whether Ruby is better than PHP
remains to be seen. There are many measurements of better. Ruby is
slower than PHP, therefore PHP is better. That's just one measurement.
So we're not clear at all on this point. But the original discussion was
more geared towards personal preference concepts of better. PHP is
better for me, because I like PHP more than I like Ruby. I happen to
like butterscotch more than I like licorice too... does that make
butterscotch better than licorice? Yes of course it does... to anyone
that like butterscotch more :)

> > But then who would confront your rhetoric and propaganda?
> 
> I do exhibit a bit of rhetoric at times, but in my defense it came
> standard with my inquisitive mind.
> 
> Conversely I do not know what propaganda you speak of.  I've never
> once made a specific claim in favor of Ruby that I couldn't back up
> with example code.

You're on a PHP list, we don't want your Ruby code here.

> > You're assuming that we choose PHP over RoR based on having seen a 5
> >  minute tutorial. Wow, aren't you just full of assumptions.
> 
> Ok then, how many projects did you pursue before giving up and
> concluding Rails or Ruby was too much effort to learn?  URL?

You still don't get it. I didn't decide Rails or Ruby was too much
effort to learn. I decided I didn't like Ruby, and I didn't like Rails
so I didn't bother going further. Why should I work with something I
don't like? I got into programming for the sheer joy of programming and
problem solving... in the spirit of that, I will damn well sheerly enjoy
my programming and problem solving with a language I enjoy working with.
Just because you don't enjoy working with it doesn't mean everyone
shares that sentiment.

> I will point out it's probably a good thing this same lack of effort
> on your part did not occur when you began to learn PHP, otherwise we
> wouldn't even be having this discussion.

Lack of effort? LOL, I put effort where I deem it useful. Why put effort
towards a fad that you don't even like. I'd be less of a person if I
jumped on every bandwagon just to be a crowd pleaser. I'm no sheep, I
follow my own path whether you like it or not.

> > Interestingly, laziness is one of the biggest motivators of innovation.
> >  Do more with less.
> 
> Well that sure as hell ain't PHP.  ROFL.  More with less, using PHP, 
> hilarious.

Seems to me you keep claiming Ruby has all the l33t features. Therefore
by using PHP I MUST be doing more with less.

> /me points to SPL and laughs his ass off

I don't use SPL.

> > That SHOULD be part of any developers mandate... but
> >  not blindly.
> 
> If by blindly you mean fun, fast, test-driven, productive development,
> then yeah I guess so.

Blindly would be those people who jumped on the RoR bandwagon and are
now arse deep in water as their ship sinks.

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] PHP & Ajax progress bar

2008-03-12 Thread Sn!per
Quoting Shelley <[EMAIL PROTECTED]>:

> I don't think it works.
> 
> I tried.
> The screen always said 0%, 0 of 0 byte until the file is uploaded.
> Is that what you mean progress bar?
> 
> --
> Regards,
> Shelley (http://phparch.cn)

It work fine. And that's what we meant by progress bar.

--
Roger


---
Sign Up for free Email at http://ureg.home.net.my/
---

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



[PHP] Re: What's wrong the __autoload()?

2008-03-12 Thread Colin Guthrie
Dave Goodchild wrote:
> Will you two pricks cut it out. How fucking tedious.

That's so rude has nobody told you that we prefer bottom-posting on
this list? I guess not /me shakes head.

:p

Col


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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings
On Wed, 2008-03-12 at 21:36 +, Dave Goodchild wrote:
> Will you two pricks cut it out. How fucking tedious.

Wow! Way to totally devolve a good thread.

: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] mail function and headers

2008-03-12 Thread Chris



as you can see my Return-Path is still pointing on the wrong direction :-(
any other idea ?


return-path is set with the 5th mail() param:

mail($to, $subject, $body, $headers, '[EMAIL PROTECTED]');


--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] PHP CLI neat errors!

2008-03-12 Thread Chris

Steve Finkelstein wrote:

So, I use a Mac to develop with. I used to host Zend Core on my box,
until I switched to the MAMP PRO framework.

Unfortunately somewhere in between, this lovely issue started occuring
with my CLI binary of PHP:

foo:~ sf$ php -l
dyld: NSLinkModule() error
dyld: Symbol not found: _zend_extensions
 Referenced from: /usr/local/Zend/Core/lib/zend/ZendExtensionManager.so
 Expected in: flat namespace


Did you use a new version of php? Is there an update for zend core? 
Maybe there's a mismatch there.


--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] save image in database vs folder

2008-03-12 Thread tedd

At 10:15 AM -0400 3/11/08, Robert Cummings wrote:

On Tue, 2008-03-11 at 11:18 +, Richard Heyes wrote:
 > Well, bearing in mind I only have experience of MySQL, the general

 consensus is to save it to a file on you hard drive and store the file
 name in the database. If for whatever reason you can't or don't want to
 do that, then at least store it in a separate table that only gets
 touched when the image is requested.


Can you point me to a link where I can read about this so-called
"general consensus"? :)

Cheers,
Rob.


There's no general consensus -- it all depends upon needs.

Some needs are better served by using the file system while others 
are better served by using a database.


There's plenty of discussion on this in the archives.

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] Question about user management...

2008-03-12 Thread tedd

At 10:20 PM -0700 3/10/08, Mike wrote:

Wait, what?

You are defining user role ids as MD5 hashes of UUIDs created from 
random numbers that change on every request?


Am I missing something or is this completely insane advice?


Mike:

What you're missing is that it doesn't matter. Each session generates 
one ID for each type of user.


It doesn't matter if the user comes back tomorrow and the actual 
number is different than it was yesterday. The point is that the 
number used for that user during that time is defined uniquely.


Granted, this is a little disturbing -- but my second suggestion to 
use a string is a little less disturbing.


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] What's wrong the __autoload()?

2008-03-12 Thread Ray Hauge

Ray Hauge wrote:

Greg Donald wrote:

On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:

Just because someone got a flashy new toy doesn't mean I want it. I've
 got better things to do than play with flashy toys for the mere purpose
 of playing with flashy toys. I like to use tools that get jobs done.


Translation: I'm too lazy to learn anything new since I already know PHP.

Languages come and go.  There's a reason why we no longer need a
cgi-bin and Perl to make an animated gif.  Going further, who the hell
even uses animated gifs any more?


Ummm, I originally looked into Ruby and RoR because someone spouted off
 "better" and "easier". After reviewing, looking at the language, trying
 some code, reading other peoples blogs, magazine articles, searching 
the

 web... I decided, using the brain I've been nurturing since I was a
 fetus, that I preferred PHP.


Great, just so long as we're clear on the point that Ruby is better
than PHP, just not for you personally.  I'm totally fine with leaving
the discussion at the "differently preferred opinion" level.  Sounds
like a cop-out but I'm ok with your holding that position all the
same.


But then who would confront your rhetoric and propaganda?


I do exhibit a bit of rhetoric at times, but in my defense it came
standard with my inquisitive mind.

Conversely I do not know what propaganda you speak of.  I've never
once made a specific claim in favor of Ruby that I couldn't back up
with example code.


You're assuming that we choose PHP over RoR based on having seen a 5
 minute tutorial. Wow, aren't you just full of assumptions.


Ok then, how many projects did you pursue before giving up and
concluding Rails or Ruby was too much effort to learn?  URL?

I will point out it's probably a good thing this same lack of effort
on your part did not occur when you began to learn PHP, otherwise we
wouldn't even be having this discussion.


Interestingly, laziness is one of the biggest motivators of innovation.
 Do more with less.


Well that sure as hell ain't PHP.  ROFL.  More with less, using PHP, 
hilarious.


/me points to SPL and laughs his ass off


That SHOULD be part of any developers mandate... but
 not blindly.


If by blindly you mean fun, fast, test-driven, productive development,
then yeah I guess so.




I didn't want to have to do this, but read some of Terry Chay's work on 
Ruby.  There are plenty of people who just prefer PHP to RoR.  Some 
people like Java, some people like .NET, etc.  Get over yourself.  You 
come to a PHP mailing list to proclaim that RoR is better?  What did you 
expect?  It's people like you that turn a lot of people off to Ruby. The 
community is insane!


This was a great read.  If nothing else he's funny.

http://terrychay.com/blog/article/php-ruby-evil-good.shtml



One last link, because this one is the one that has caused the most 
"controversy" (for lack of a better word).


http://terrychay.com/blog/article/is-ruby-the-dog-and-php-the-dogfood.shtml

--
Ray Hauge
www.primateapplications.com

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Dave Goodchild <[EMAIL PROTECTED]> wrote:
> Will you two pricks cut it out. How fucking tedious.

Tedious?  Sorry.

/me passes the "buddhamagnet" a dictionary so he can keep up.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Ray Hauge

Greg Donald wrote:

On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:

Just because someone got a flashy new toy doesn't mean I want it. I've
 got better things to do than play with flashy toys for the mere purpose
 of playing with flashy toys. I like to use tools that get jobs done.


Translation: I'm too lazy to learn anything new since I already know PHP.

Languages come and go.  There's a reason why we no longer need a
cgi-bin and Perl to make an animated gif.  Going further, who the hell
even uses animated gifs any more?


Ummm, I originally looked into Ruby and RoR because someone spouted off
 "better" and "easier". After reviewing, looking at the language, trying
 some code, reading other peoples blogs, magazine articles, searching the
 web... I decided, using the brain I've been nurturing since I was a
 fetus, that I preferred PHP.


Great, just so long as we're clear on the point that Ruby is better
than PHP, just not for you personally.  I'm totally fine with leaving
the discussion at the "differently preferred opinion" level.  Sounds
like a cop-out but I'm ok with your holding that position all the
same.


But then who would confront your rhetoric and propaganda?


I do exhibit a bit of rhetoric at times, but in my defense it came
standard with my inquisitive mind.

Conversely I do not know what propaganda you speak of.  I've never
once made a specific claim in favor of Ruby that I couldn't back up
with example code.


You're assuming that we choose PHP over RoR based on having seen a 5
 minute tutorial. Wow, aren't you just full of assumptions.


Ok then, how many projects did you pursue before giving up and
concluding Rails or Ruby was too much effort to learn?  URL?

I will point out it's probably a good thing this same lack of effort
on your part did not occur when you began to learn PHP, otherwise we
wouldn't even be having this discussion.


Interestingly, laziness is one of the biggest motivators of innovation.
 Do more with less.


Well that sure as hell ain't PHP.  ROFL.  More with less, using PHP, hilarious.

/me points to SPL and laughs his ass off


That SHOULD be part of any developers mandate... but
 not blindly.


If by blindly you mean fun, fast, test-driven, productive development,
then yeah I guess so.




I didn't want to have to do this, but read some of Terry Chay's work on 
Ruby.  There are plenty of people who just prefer PHP to RoR.  Some 
people like Java, some people like .NET, etc.  Get over yourself.  You 
come to a PHP mailing list to proclaim that RoR is better?  What did you 
expect?  It's people like you that turn a lot of people off to Ruby. 
The community is insane!


This was a great read.  If nothing else he's funny.

http://terrychay.com/blog/article/php-ruby-evil-good.shtml

--
Ray Hauge
www.primateapplications.com

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



Re: [PHP] Frameworks

2008-03-12 Thread Aschwin Wesselius

Andrés Robinet wrote:

Anyway... you will get one thousand opinions about Frameworks, and 90% of them
may be correct. Choose the framework you like after playing around with some
examples and having an overview of the reference manual (forgot to say,
documentation is really important to get you started).

Regards,

Rob(inet)
  
Thanks again. I think you've set out exactly an opinion I was after. Off 
course it all depends on which level one has stepped in, is now and 
wants to be when start using a framework.


I've not taken the step to build my own or tested anything as an early 
adoptor on any of them. But I see that RAD makes the difference 
nowadays. Time is money. People want more features in less time etc. If 
I don't get used to a framework very soon, I'm out of business.


I want to do the whole thing. I want an environment that takes a lot of 
fuss out of my hands:

- Unit testing, never done it, but sounds reasonable.
- MVC, makes sense but can be interpreted over the top.
- DB abstraction The environments I've been in don't switch from 
DB's over night, so I don't care.
I wanna see my queries and where they come from, period. I don't need no 
fricking querybuilding stuff.
- Form handling. Validation is key. Security is important, so sanitizing 
input must be done as early as possible.
- Error handling. Get information back from your code. I need that 
together with Unit testing. Should save debugging time.

etc.

Voila, all arguments for a good framework. Zend sounds really a stable 
and reliable product. I'm gonna setup a testserver and see how far it goes.


BTW, any people having experience with PHP UnderControl?

Aschwin Wesselius


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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> You're new around here right?

Hehe.  For sure.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> Just because someone got a flashy new toy doesn't mean I want it. I've
>  got better things to do than play with flashy toys for the mere purpose
>  of playing with flashy toys. I like to use tools that get jobs done.

Translation: I'm too lazy to learn anything new since I already know PHP.

Languages come and go.  There's a reason why we no longer need a
cgi-bin and Perl to make an animated gif.  Going further, who the hell
even uses animated gifs any more?

> Ummm, I originally looked into Ruby and RoR because someone spouted off
>  "better" and "easier". After reviewing, looking at the language, trying
>  some code, reading other peoples blogs, magazine articles, searching the
>  web... I decided, using the brain I've been nurturing since I was a
>  fetus, that I preferred PHP.

Great, just so long as we're clear on the point that Ruby is better
than PHP, just not for you personally.  I'm totally fine with leaving
the discussion at the "differently preferred opinion" level.  Sounds
like a cop-out but I'm ok with your holding that position all the
same.

> But then who would confront your rhetoric and propaganda?

I do exhibit a bit of rhetoric at times, but in my defense it came
standard with my inquisitive mind.

Conversely I do not know what propaganda you speak of.  I've never
once made a specific claim in favor of Ruby that I couldn't back up
with example code.

> You're assuming that we choose PHP over RoR based on having seen a 5
>  minute tutorial. Wow, aren't you just full of assumptions.

Ok then, how many projects did you pursue before giving up and
concluding Rails or Ruby was too much effort to learn?  URL?

I will point out it's probably a good thing this same lack of effort
on your part did not occur when you began to learn PHP, otherwise we
wouldn't even be having this discussion.

> Interestingly, laziness is one of the biggest motivators of innovation.
>  Do more with less.

Well that sure as hell ain't PHP.  ROFL.  More with less, using PHP, hilarious.

/me points to SPL and laughs his ass off

> That SHOULD be part of any developers mandate... but
>  not blindly.

If by blindly you mean fun, fast, test-driven, productive development,
then yeah I guess so.


-- 
Greg Donald
http://destiney.com/

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



RE: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Andrés Robinet
> -Original Message-
> From: Dave Goodchild [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2008 5:37 PM
> To: Robert Cummings
> Cc: Aschwin Wesselius; Greg Donald; php-general@lists.php.net
> Subject: Re: [PHP] What's wrong the __autoload()?
> 
> Will you two pricks cut it out. How f* tedious.

Will you be so kind not to use taboo words to hit other people on this list?

Thanks,

Rob(inet)

PS: Middle-posting is cool!

> 
> On Wed, Mar 12, 2008 at 9:34 PM, Robert Cummings <[EMAIL PROTECTED]>
> wrote:
> 
> >
> > On Wed, 2008-03-12 at 22:26 +0100, Aschwin Wesselius wrote:
> > > Robert Cummings wrote:
> > > > On Wed, 2008-03-12 at 16:11 -0500, Greg Donald wrote:
> > > >
> > > >> On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > >>
> > > >>>  > -1 for not recognizing a rhetorical question.
> > > >>>
> > > >>> +2 for setting his tongue firmly in cheek and providing you with an
> > > >>>  answer to your rhetorical question.
> > > >>>
> > > >> -1 for thinking rhetorical question responses mean jack.
> > > >>
> > > >> -1 for thinking +2 exists.
> > > >>
> > > >
> > > > *Yawn*
> > > >
> > >
> > > -5 for not keeping this kind of childish behavior of the list (both of
> > you)
> >
> > You're new around here right?
> >
> > 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
> >
> >


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



RE: [PHP] Frameworks

2008-03-12 Thread Andrés Robinet
> -Original Message-
> From: Aschwin Wesselius [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2008 5:04 PM
> To: Andrés Robinet
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Frameworks
> 
> Andrés Robinet wrote:
> > I want a framework I can plug a microphone in, and talk to it, and it
> does the
> > job for me (really, I need it). But I guess we are far away from that.
> >
> You need it? And what happens if you won't get it in a life time?
> > If you need REAL RAD ("a la Delphi"), use VCL for PHP... you'll still
> have to
> > write the event handlers (you can't save yourself from coding) and you
> will have
> > to stick with Codegear (you are of those who pay for software, right?).
> >
> REAL RAD? Is that an acronym or is that emphasis? But no thanks. If I've
> paid around 1000 dollars on software, that would be a bit much. And that
> must have been a decade ago.
> > If you are looking for a flexible PHP 5 framework, where each component
> is more
> > or less independent of the others, try the Zend Framework.
> >
> That's what is on my list of candidates, yes.
> > If you want a lot of features bundled into a big and fat box, and you
> need PHP 4
> > support, use CakePHP. Even the way you name database tables will be
> affected,
> > but if you eat a piece of the cake you are likely to want it all anyway.
> >
> Wait. PHP 4? I admit that I don't use all the OOP of PHP 5, but
> really I don't let myself be forced to use deprecated software if it is
> my income. No, I haven't touched PHP 4 like 3,5 years now.
> > If you want a flexible and easy to use PHP 4 and PHP 5 framework and you
> are
> > willing to wait more than six months for each minor release, you can use
> > CodeIgniter.
> >
> Ok, that one is of my list of candidates then.
> > If you are rich, you can pay us (the PHP-list members) to build one for
> you :D.
> > It will be a complete disaster because we'll never agree on the features,
> but
> > you'll entertain yourself with our discussions for months.
> >
> I think I keep that in mind when I've become rich and lonely and need
> some entertainment.
> > If your IQ is greater than 150 you can try writing your own.
> >
> Is IQ really relevant to being capable of writing your own framework?
> Ok, an IQ of 70 won't get you advanced software out of your hands. I've
> an IQ between 160 and 170 (lost the score along the path somewhere). But
> I couldn't be bothered to write my own framework just to invent some
> wheels to have a nice ride. It could be a challenge and might even be
> rewarding afterwards, but in the mean while it won't get me anywhere. So
> much for RAD and then writing your own framework. Must be kidding ;-)
> 
> OK, thanks for your input. Some points are really helpful!
> 
> Aschwin Wesselius

I'm not kidding about the *REAL RAD* thing. RAD is Rapid Application
Development, and I don't think anything can be faster than dragging a button
component on a *form-like* window, then double clicking on it, writing *echo
"Hello World!"* and hit F9. There you are, you got a *Hello world* in some
seconds, no need for special set up, or writing controller/model/view code
whatsoever. However, I wouldn't use Delphi for PHP because it's a proprietary
thing, it's a fat dog and you must pay some REAL bucks for it. And... as soon as
you get more serious with what you want to do, you need to get very close with
the code behind the scenes... which means you have to put much more time and
effort than you would need for a *standard* MVC framework. Sorry, not something
I'm willing to do for a web application. I prefer coding controllers, models and
views. That's also why I'm reactive to sniff into Prado or even QCodo (which I
think disserves some attention to me, because of the underlying *build system*).

Compare that to a ZF component... once you learn it, you can use it wherever you
want (generally), even if you are not using ZF for the MVC part (take
Zend_Http_Client, Zend_Pdf as examples).

Now, take CodeIgniter... I liked it because it had many *out-of-the-box*
features and components. Also, some clients still had PHP 4 and I couldn't do
anything about it. Dealing with it is fairly easy (don't expect cutting-edge
magic out of its components though). I fell in love with rapyd
http://www.rapyd.com/ which is based on CodeIgniter and simplifies most backend
tasks a bunch. But now, rapyd is discontinued (the CI version at least) and we
have kohanaPHP as an alternative (http://kohanaphp.com/). To make it worse,
CodeIgniter took several (I think more than 6) months to upgrade from 1.5.4 to
1.6. Why? Because they rely on integrating it with their commercial *Expression
Engine* product (and they even stated that in their forums). And the
*framework-nightmare* started all over again for me.

Wanna know what I'm planning to do? Embrace the Zend Framework, it's solid, it's
powerful, it's got a company behind and it's still free. And now that PHP 4 has
been discontinued, I have the perfect

Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Dave Goodchild
Will you two pricks cut it out. How fucking tedious.

On Wed, Mar 12, 2008 at 9:34 PM, Robert Cummings <[EMAIL PROTECTED]>
wrote:

>
> On Wed, 2008-03-12 at 22:26 +0100, Aschwin Wesselius wrote:
> > Robert Cummings wrote:
> > > On Wed, 2008-03-12 at 16:11 -0500, Greg Donald wrote:
> > >
> > >> On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > >>
> > >>>  > -1 for not recognizing a rhetorical question.
> > >>>
> > >>> +2 for setting his tongue firmly in cheek and providing you with an
> > >>>  answer to your rhetorical question.
> > >>>
> > >> -1 for thinking rhetorical question responses mean jack.
> > >>
> > >> -1 for thinking +2 exists.
> > >>
> > >
> > > *Yawn*
> > >
> >
> > -5 for not keeping this kind of childish behavior of the list (both of
> you)
>
> You're new around here right?
>
> 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] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Aschwin Wesselius <[EMAIL PROTECTED]> wrote:
> -5 for not keeping this kind of childish behavior of the list (both of you)

Playing the game by claiming the game is wrong to play is still
playing the game.

-1 for playing the game hypocritically.

-1 for thinking -5 exists.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings

On Wed, 2008-03-12 at 22:26 +0100, Aschwin Wesselius wrote:
> Robert Cummings wrote:
> > On Wed, 2008-03-12 at 16:11 -0500, Greg Donald wrote:
> >   
> >> On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> >> 
> >>>  > -1 for not recognizing a rhetorical question.
> >>>
> >>> +2 for setting his tongue firmly in cheek and providing you with an
> >>>  answer to your rhetorical question.
> >>>   
> >> -1 for thinking rhetorical question responses mean jack.
> >>
> >> -1 for thinking +2 exists.
> >> 
> >
> > *Yawn*
> >   
> 
> -5 for not keeping this kind of childish behavior of the list (both of you)

You're new around here right?

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] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings

On Wed, 2008-03-12 at 16:11 -0500, Greg Donald wrote:
> On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > Yes, but some of your diatribe was originally directed my way. And this
> >  stuff certainly isn't new to me.
> 
> Sure it is, else you'd be using it.. like all the smart PHP
> programmers I see on the Rails list looking to expand their tool set
> on a daily basis.

Just because someone got a flashy new toy doesn't mean I want it. I've
got better things to do than play with flashy toys for the mere purpose
of playing with flashy toys. I like to use tools that get jobs done.

> > A. you're so considerate... but really, there's no need, I'm sure I
> >  can understand things well beyond your own capabilities.
> 
> There's been no indication of that up to now.

I try not to flaunt it... humility teaches volumes. I could send you a
care package if you want... I'll even throw in some T.P. to help you
clean up your act.

> > You're chasing your tail here. That would be true of any language. And
> >  since such "meta programming capabilities" exist in other languages,
> >  obviously they were thought up at some point when they didn't exist at
> >  all. One need not know of something to be able to invent it... see how
> >  that works. I could dumb it down for you if you want.
> 
> You're confusing language designer with language user.  A language
> user can only use what features he has been provided to use.

I'm not confusing anything. A language user can propose features, and
even implement them via another language to add them to the language in
question. In open source there's plenty of overlap between language
designer and language user.

> You just keep beating that PHP rock with that PHP hammer.  Pay no
> attention when someone utters the words "better" or "easier".

Ummm, I originally looked into Ruby and RoR because someone spouted off
"better" and "easier". After reviewing, looking at the language, trying
some code, reading other peoples blogs, magazine articles, searching the
web... I decided, using the brain I've been nurturing since I was a
fetus, that I preferred PHP.

> Why not just go ahead and make yourself a mail filter too.. put
> [EMAIL PROTECTED] right at the top.

But then who would confront your rhetoric and propaganda?

> >  of which you speak. You dismiss their experience, reasoning, and
> >  preference and presume yourself superior...
> 
> What reasoning?  "I saw a 5 minute tutorial on Rails, I didn't
> understand some of it, therefore Ruby sucks?"  That's not reasoning
> and it certainly doesn't gain one any experience,

You're assuming that we choose PHP over RoR based on having seen a 5
minute tutorial. Wow, aren't you just full of assumptions. Didn't you
see the episode of Cheers about what happens when you "assume"?

> unless laziness recently became a virtue.

Interestingly, laziness is one of the biggest motivators of innovation.
Do more with less. That SHOULD be part of any developers mandate... but
not blindly.

> > get over yourself.
> 
> You first.

Been there, done that. Now it's your turn.

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] What's wrong the __autoload()?

2008-03-12 Thread Aschwin Wesselius

Robert Cummings wrote:

On Wed, 2008-03-12 at 16:11 -0500, Greg Donald wrote:
  

On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:


 > -1 for not recognizing a rhetorical question.

+2 for setting his tongue firmly in cheek and providing you with an
 answer to your rhetorical question.
  

-1 for thinking rhetorical question responses mean jack.

-1 for thinking +2 exists.



*Yawn*
  


-5 for not keeping this kind of childish behavior of the list (both of you)

Aschwin Wesselius


Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings

On Wed, 2008-03-12 at 16:11 -0500, Greg Donald wrote:
> On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> >  > -1 for not recognizing a rhetorical question.
> >
> > +2 for setting his tongue firmly in cheek and providing you with an
> >  answer to your rhetorical question.
> 
> -1 for thinking rhetorical question responses mean jack.
> 
> -1 for thinking +2 exists.

*Yawn*

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] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
>  > -1 for not recognizing a rhetorical question.
>
> +2 for setting his tongue firmly in cheek and providing you with an
>  answer to your rhetorical question.

-1 for thinking rhetorical question responses mean jack.

-1 for thinking +2 exists.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> Yes, but some of your diatribe was originally directed my way. And this
>  stuff certainly isn't new to me.

Sure it is, else you'd be using it.. like all the smart PHP
programmers I see on the Rails list looking to expand their tool set
on a daily basis.

> A. you're so considerate... but really, there's no need, I'm sure I
>  can understand things well beyond your own capabilities.

There's been no indication of that up to now.

> You're chasing your tail here. That would be true of any language. And
>  since such "meta programming capabilities" exist in other languages,
>  obviously they were thought up at some point when they didn't exist at
>  all. One need not know of something to be able to invent it... see how
>  that works. I could dumb it down for you if you want.

You're confusing language designer with language user.  A language
user can only use what features he has been provided to use.

You just keep beating that PHP rock with that PHP hammer.  Pay no
attention when someone utters the words "better" or "easier".  Why not
just go ahead and make yourself a mail filter too.. put
[EMAIL PROTECTED] right at the top.

>  of which you speak. You dismiss their experience, reasoning, and
>  preference and presume yourself superior...

What reasoning?  "I saw a 5 minute tutorial on Rails, I didn't
understand some of it, therefore Ruby sucks?"  That's not reasoning
and it certainly doesn't gain one any experience, unless laziness
recently became a virtue.

> get over yourself.

You first.


-- 
Greg Donald
http://destiney.com/

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



RE: [PHP] Frameworks

2008-03-12 Thread Andrés Robinet
> -Original Message-
> From: Aschwin Wesselius [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2008 4:14 PM
> To: php-general@lists.php.net
> Subject: [PHP] Frameworks
> 
> Hi all,
> 
> Maybe this has past the list a couple of times (just like the 'storing
> images in a DB' question).
> 
> What I'm after is a framework that is simple, solid, compact and
> flexible enough to extend by myself.
> 
> I'm not an OOP person. But I do use classes when I think they fit a
> purpose. But most of all I want a framework that has the wheels I don't
> want to reinvent myself but do make sense to have.
> 
> Like:
> - Informative error-handling
> - DB layer, not too abstract please
> - Form handling
> - etc.
> 
> What is a good framework to start with? What framework doesn't make it
> too complex that it says it gives you RAD but actually let's you sink in
> code?
> 
> I don't have to develop enterprise stuff. I want to manage information
> for myself and maybe build a blog or whatever to play with. What let's
> build things quick so you can focus on things to test instead in
> building the surrounding elements?
> 
> Again, maybe I've to dive into archives etc. But that doesn't give me
> answers I need I guess.
> 
> Thanks in advance.
> 
> Aschwin Wesselius

I want a framework I can plug a microphone in, and talk to it, and it does the
job for me (really, I need it). But I guess we are far away from that.

If you need REAL RAD ("a la Delphi"), use VCL for PHP... you'll still have to
write the event handlers (you can't save yourself from coding) and you will have
to stick with Codegear (you are of those who pay for software, right?).

If you are looking for a flexible PHP 5 framework, where each component is more
or less independent of the others, try the Zend Framework.

If you want a lot of features bundled into a big and fat box, and you need PHP 4
support, use CakePHP. Even the way you name database tables will be affected,
but if you eat a piece of the cake you are likely to want it all anyway.

If you want a flexible and easy to use PHP 4 and PHP 5 framework and you are
willing to wait more than six months for each minor release, you can use
CodeIgniter.

If you are rich, you can pay us (the PHP-list members) to build one for you :D.
It will be a complete disaster because we'll never agree on the features, but
you'll entertain yourself with our discussions for months.

If your IQ is greater than 150 you can try writing your own.

Otherwise, ask Robert Cummings or Manuel Lemos.

Regards,

Rob


Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4296 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com




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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Nathan Nobbe
On Wed, Mar 12, 2008 at 4:34 PM, Robert Cummings <[EMAIL PROTECTED]>
wrote:

> On Wed, 2008-03-12 at 15:11 -0500, Greg Donald wrote:
> > On 3/12/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> > > On Wed, Mar 12, 2008 at 3:59 PM, Greg Donald <[EMAIL PROTECTED]>
> wrote:
> > > > I'm sorry, I lost context, what missing PHP language feature are you
> > > > referring to as "it"?
> > >
> > > functional capabilities, in particular the ability to dynamically add
> a
> > > method to an object at runtime which you highlighted earlier.
> >
> > -1 for not recognizing a rhetorical question.
>
> +2 for setting his tongue firmly in cheek and providing you with an
> answer to your rhetorical question.


im must be lacking the features to comprehend rhetorical questions.
however, having learned of their existence, im not quite certain im ready to
invest the time to add them to my persona, albiet any superiority they might
exhibit :)

-nathan


Re: [PHP] Frameworks

2008-03-12 Thread Aschwin Wesselius

Andrés Robinet wrote:

I want a framework I can plug a microphone in, and talk to it, and it does the
job for me (really, I need it). But I guess we are far away from that.
  

You need it? And what happens if you won't get it in a life time?

If you need REAL RAD ("a la Delphi"), use VCL for PHP... you'll still have to
write the event handlers (you can't save yourself from coding) and you will have
to stick with Codegear (you are of those who pay for software, right?).
  
REAL RAD? Is that an acronym or is that emphasis? But no thanks. If I've 
paid around 1000 dollars on software, that would be a bit much. And that 
must have been a decade ago.

If you are looking for a flexible PHP 5 framework, where each component is more
or less independent of the others, try the Zend Framework.
  

That's what is on my list of candidates, yes.

If you want a lot of features bundled into a big and fat box, and you need PHP 4
support, use CakePHP. Even the way you name database tables will be affected,
but if you eat a piece of the cake you are likely to want it all anyway.
  
Wait. PHP 4? I admit that I don't use all the OOP of PHP 5, but 
really I don't let myself be forced to use deprecated software if it is 
my income. No, I haven't touched PHP 4 like 3,5 years now.

If you want a flexible and easy to use PHP 4 and PHP 5 framework and you are
willing to wait more than six months for each minor release, you can use
CodeIgniter.
  

Ok, that one is of my list of candidates then.

If you are rich, you can pay us (the PHP-list members) to build one for you :D.
It will be a complete disaster because we'll never agree on the features, but
you'll entertain yourself with our discussions for months.
  
I think I keep that in mind when I've become rich and lonely and need 
some entertainment.

If your IQ is greater than 150 you can try writing your own.
  
Is IQ really relevant to being capable of writing your own framework? 
Ok, an IQ of 70 won't get you advanced software out of your hands. I've 
an IQ between 160 and 170 (lost the score along the path somewhere). But 
I couldn't be bothered to write my own framework just to invent some 
wheels to have a nice ride. It could be a challenge and might even be 
rewarding afterwards, but in the mean while it won't get me anywhere. So 
much for RAD and then writing your own framework. Must be kidding ;-)


OK, thanks for your input. Some points are really helpful!

Aschwin Wesselius


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



[PHP] POST php://input

2008-03-12 Thread sinseven
Hello All,
?I'm doing a POST using httpwebrequest in a Pocket PC C# application to send a 
file over a stream buffer to a php page on an Apache server. I'm able to not 
only get ?variablename=value via a $_REQUEST, but also the entire file over 
php://input.

It all works, I'm just not sure it's proper or the best way to do this. Should 
i be getting a $_REQUEST and a file via php://input in the same php page? Other 
problems with doing this?

Nothing seems to come over $_FILE.. when i do a print_r on that, all i get is 
the number "1"... I was thinking the file might be handled by php and stored as 
a temp file, but it doesn't seem to be.

Thanks for any help and suggestions,
Scott


[PHP] php://input

2008-03-12 Thread sinseven
http://us2.php.net/manual/en/features.file-upload.put-method.php

Hello All,
?I'm trying to use a PUT request to send files to a server. I'm wondering if 
there's a way to return something like a pass/fail code to the stream to catch 
on the other side.

?PHP side I'm using the code in the Example from the link above.. and it works 
great.

On the other side, in case someone has experience with this specifically, even 
thought it's not PHP related, I'm use C#.
newStream = myRequest.GetRequestStream();

newStream.Write(inData, 0, bytesRead);

I was thinking I should be able to get a Response Stream.

Thanks for any help,
Scott


Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings

On Wed, 2008-03-12 at 15:11 -0500, Greg Donald wrote:
> On 3/12/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> > On Wed, Mar 12, 2008 at 3:59 PM, Greg Donald <[EMAIL PROTECTED]> wrote:
> > > I'm sorry, I lost context, what missing PHP language feature are you
> > > referring to as "it"?
> >
> > functional capabilities, in particular the ability to dynamically add a
> > method to an object at runtime which you highlighted earlier.
> 
> -1 for not recognizing a rhetorical question.

+2 for setting his tongue firmly in cheek and providing you with an
answer to your rhetorical question.

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] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings

On Wed, 2008-03-12 at 14:59 -0500, Greg Donald wrote:
> On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > You make it sound like this stuff is new or something.
> 
> Obviously to some it is.  Just in this thread we had a person claim to
> only know PHP, C, and Java, none of which have any functional language
> capabilities built in.

Yes, but some of your diatribe was originally directed my way. And this
stuff certainly isn't new to me.

> > Lisp and other
> >  functional languages have had it for decades. Even JavaScript has it.
> 
> I'm sorry, I lost context, what missing PHP language feature are you
> referring to as "it"?

I'm sorry you lost context... try and stick with the program in the
future. It's not terribly difficult to follow a thread.

> >  Your analogy is also way off... ask any person without legs if they
> >  think about walking.
> 
> Here, let me dumb-it-down a bit:

A. you're so considerate... but really, there's no need, I'm sure I
can understand things well beyond your own capabilities.

> PHP doesn't have much in the way of meta-programming capabilities.
> Therefore one would not find it a natural thought to do much
> meta-programming in PHP, unless one already knew of a language where
> such support exists.

You're chasing your tail here. That would be true of any language. And
since such "meta programming capabilities" exist in other languages,
obviously they were thought up at some point when they didn't exist at
all. One need not know of something to be able to invent it... see how
that works. I could dumb it down for you if you want.

> A different example using the same logic: My Mustang doesn't have
> 4-wheel drive so I don't often think much about taking it through the
> creeks and woods by my house like my old man and I do in his Bronco
> that does have 4-wheel drive.  A person who has never climbed a really
> steep hill or ran through a waist-high creek in a 4-wheel drive auto
> might think such a thing impossible if they were unaware of 4-wheel
> drive.

Or, and I would consider this the more likely response, they would dream
up such a thing if it didn't already exist and was WANTED/NEEDED. Your
chicken egg logic is completely invalid as illustrated by the current
state of innovation versus what existed when life began. We innovate and
create to fill the void. We don't use because the void was magically
filled with solutions. The millions of PHP developers happily
programming without Ruby or RoR obviously don't NEED all of these meta
things of which you speak. Some may WANT, and maybe they will move to a
language that supports them, but that's a preference, not a requirement.
You do injustice to the many, many intelligent people out there that
intentionally choose PHP over another language that has the features you
of which you speak. You dismiss their experience, reasoning, and
preference and presume yourself superior... get over yourself.

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] What's wrong the __autoload()?

2008-03-12 Thread Andrés Robinet
> -Original Message-
> From: Greg Donald [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2008 4:00 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] What's wrong the __autoload()?
> 
> On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > You make it sound like this stuff is new or something.
> 
> Obviously to some it is.  Just in this thread we had a person claim to
> only know PHP, C, and Java, none of which have any functional language
> capabilities built in.
> 
> > Lisp and other
> >  functional languages have had it for decades. Even JavaScript has it.
> 
> I'm sorry, I lost context, what missing PHP language feature are you
> referring to as "it"?
> 
> >  Your analogy is also way off... ask any person without legs if they
> >  think about walking.
> 
> Here, let me dumb-it-down a bit:
> 
> PHP doesn't have much in the way of meta-programming capabilities.
> Therefore one would not find it a natural thought to do much
> meta-programming in PHP, unless one already knew of a language where
> such support exists.
> 
> A different example using the same logic: My Mustang doesn't have
> 4-wheel drive so I don't often think much about taking it through the
> creeks and woods by my house like my old man and I do in his Bronco
> that does have 4-wheel drive.  A person who has never climbed a really
> steep hill or ran through a waist-high creek in a 4-wheel drive auto
> might think such a thing impossible if they were unaware of 4-wheel
> drive.
> 
> 
> --
> Greg Donald
> http://destiney.com/

PHP has REAL-programming capabilities, that's why some *cool* functional but
still pragmatic features like traits are being discussed on the internals list.
PHP's success has its roots in raw pragmatism, easy to learn, easy to deal with.
Still fast and OO capable.
When RoR starts becoming a REAL PHP competitor, I'll think of learning it and
pushing it into my company. Right now, I can only say that PHP is getting better
and better.
You may miss a lot of features you find in other languages, but PHP features get
the job done.

Regards,

Rob

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4296 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com




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



Re: [PHP] Frameworks

2008-03-12 Thread Greg Donald
On 3/12/08, Aschwin Wesselius <[EMAIL PROTECTED]> wrote:
>  What I'm after is a framework that is simple, solid, compact and
>  flexible enough to extend by myself.

http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#Comparison_of_features


-- 
Greg Donald
http://destiney.com/

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



[PHP] Frameworks

2008-03-12 Thread Aschwin Wesselius

Hi all,

Maybe this has past the list a couple of times (just like the 'storing 
images in a DB' question).


What I'm after is a framework that is simple, solid, compact and 
flexible enough to extend by myself.


I'm not an OOP person. But I do use classes when I think they fit a 
purpose. But most of all I want a framework that has the wheels I don't 
want to reinvent myself but do make sense to have.


Like:
- Informative error-handling
- DB layer, not too abstract please
- Form handling
- etc.

What is a good framework to start with? What framework doesn't make it 
too complex that it says it gives you RAD but actually let's you sink in 
code?


I don't have to develop enterprise stuff. I want to manage information 
for myself and maybe build a blog or whatever to play with. What let's 
build things quick so you can focus on things to test instead in 
building the surrounding elements?


Again, maybe I've to dive into archives etc. But that doesn't give me 
answers I need I guess.


Thanks in advance.

Aschwin Wesselius


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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> On Wed, Mar 12, 2008 at 3:59 PM, Greg Donald <[EMAIL PROTECTED]> wrote:
> > I'm sorry, I lost context, what missing PHP language feature are you
> > referring to as "it"?
>
> functional capabilities, in particular the ability to dynamically add a
> method to an object at runtime which you highlighted earlier.

-1 for not recognizing a rhetorical question.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Nathan Nobbe
On Wed, Mar 12, 2008 at 3:59 PM, Greg Donald <[EMAIL PROTECTED]> wrote:

> > Lisp and other
> >  functional languages have had it for decades. Even JavaScript has it.
>
> I'm sorry, I lost context, what missing PHP language feature are you
> referring to as "it"?


functional capabilities, in particular the ability to dynamically add a
method to an object at runtime which you highlighted earlier.

-nathan


Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Aschwin Wesselius

Greg Donald wrote:

Here, let me dumb-it-down a bit:

PHP doesn't have much in the way of meta-programming capabilities.
Therefore one would not find it a natural thought to do much
meta-programming in PHP, unless one already knew of a language where
such support exists.

A different example using the same logic: My Mustang doesn't have
4-wheel drive so I don't often think much about taking it through the
creeks and woods by my house like my old man and I do in his Bronco
that does have 4-wheel drive.  A person who has never climbed a really
steep hill or ran through a waist-high creek in a 4-wheel drive auto
might think such a thing impossible if they were unaware of 4-wheel
drive.


LOL well said.

Aschwin Wesselius


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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> You make it sound like this stuff is new or something.

Obviously to some it is.  Just in this thread we had a person claim to
only know PHP, C, and Java, none of which have any functional language
capabilities built in.

> Lisp and other
>  functional languages have had it for decades. Even JavaScript has it.

I'm sorry, I lost context, what missing PHP language feature are you
referring to as "it"?

>  Your analogy is also way off... ask any person without legs if they
>  think about walking.

Here, let me dumb-it-down a bit:

PHP doesn't have much in the way of meta-programming capabilities.
Therefore one would not find it a natural thought to do much
meta-programming in PHP, unless one already knew of a language where
such support exists.

A different example using the same logic: My Mustang doesn't have
4-wheel drive so I don't often think much about taking it through the
creeks and woods by my house like my old man and I do in his Bronco
that does have 4-wheel drive.  A person who has never climbed a really
steep hill or ran through a waist-high creek in a 4-wheel drive auto
might think such a thing impossible if they were unaware of 4-wheel
drive.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Nathan Nobbe
On Wed, Mar 12, 2008 at 3:35 PM, Zoltán Németh <[EMAIL PROTECTED]>
wrote:

> 2008. 03. 12, szerda keltezéssel 15.20-kor Robert Cummings ezt írta:
> > Even JavaScript has it.
>
> oh yes, I could have thought of that. in JS you can assign a function to
> a property or variable at runtime, even I did something similar, when I
> assign the action functions of the buttons of a modal dialog
> dynamically. it's good because the same simple JS library can handle any
> number of use cases, and my main page with the JS libraries load only
> once, ajax does the rest of stuff, so I could not change the class
> definition for the separate cases.
> but on server side, why not throw everything you might need in the class
> definition?


javascript has this neat concept of execution context.  so a single function
can work w/ any 'class' or more precisely, any object.

a = {d : 5};
b = {d : 6};
function c() { alert(this.d); }
c.apply(a);
c.apply(b);

quite interesting.

-nathan


Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Zoltán Németh
2008. 03. 12, szerda keltezéssel 15.20-kor Robert Cummings ezt írta:
> Even JavaScript has it.

oh yes, I could have thought of that. in JS you can assign a function to
a property or variable at runtime, even I did something similar, when I
assign the action functions of the buttons of a modal dialog
dynamically. it's good because the same simple JS library can handle any
number of use cases, and my main page with the JS libraries load only
once, ajax does the rest of stuff, so I could not change the class
definition for the separate cases.
but on server side, why not throw everything you might need in the class
definition?

greets,
Zoltán Németh


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



RE: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Andrés Robinet
> -Original Message-
> From: Nathan Nobbe [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2008 3:08 PM
> To: Andrés Robinet
> Cc: Robert Cummings; Zoltán Németh; Greg Donald; php-general@lists.php.net
> Subject: Re: [PHP] What's wrong the __autoload()?
> 
> On Wed, Mar 12, 2008 at 2:53 PM, Andrés Robinet <[EMAIL PROTECTED]>
> wrote:
> 
> > I think __autoload would make much more sense if it worked like an event
> > registration feature. Such as:
> >
> > function myAutoloadCallback($className) {
> >if ($className == 'ShakeItBaby') {
> >require_once 'ShakeItBaby.class.php';
> >return true;
> >}
> >return false;
> > }
> > .
> >
> > __autoloadRegisterCallback('myAutoloadCallback');
> > .
> >
> > $shaker = new ShakeItBaby();
> >
> > This way, multiple frameworks and project requirements for autoload
> > wouldn't clash. If one of the autoload callbacks returns "true" that
> would
> > be it. Otherwise the next autoload callback would be called, and so on.
> >
> > The problem with the current implementation is that if you get some piece
> > of code that uses __autoload and you are using __autoload too, you'll
> have
> > to either patch that piece of code (if the "piece of code" is a
> framework,
> > things will get much more complicated when updating to the next version)
> or
> > patch your own code, or just make a promise not to use __autoload (my
> > current choice... just in case) or not to use "pieces of code that use
> > __autoload". Bottom line, I hate it.
> 
> 
> as eric pointed out earlier, thats what spl_autoload_register is for;
> http://us.php.net/manual/en/function.spl-autoload-register.php
> 
> -nathan

I know, I was talking about the "old/regular" __autoload feature. You need PHP 
5 for spl_autoload_register... but having all PHP 5's nice OOP features, you 
probably want to code a class/file/function/resource loader class (like ZF 
does) which can do much more. For PHP 4, you are stuck. But anyway, PHP 4 is 
"dying"... or seems to be.
And don't speak about SPL, I had the worst of disappointments with 
ArrayObject... since then I got divorced with it (probably will marry it again 
in the future, my ancestors are French, you know French people are 
passionate... and they like cooking too).

Now, what about set_error_handler? Maybe it's something to discuss in it's own 
thread, I don't know.

Anyway, anyway, anyway must get back to regular work :(

See you later,

Rob(inet)

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 | 
TEL 954-607-4296 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace |  
Web: bestplace.biz  | Web: seo-diy.com




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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings

On Wed, 2008-03-12 at 14:09 -0500, Greg Donald wrote:
> On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> > I can't really think of a
> > case where I would want to modify the class definition of an
> > instantiated object
> 
> You can't very well think to walk if you don't have legs.

You make it sound like this stuff is new or something. Lisp and other
functional languages have had it for decades. Even JavaScript has it.
Your analogy is also way off... ask any person without legs if they
think about walking. These features of which you speak, someone thought
of them (walking) long before they were implemented into a language
(legs). But just because you think of walking and implement legs to do
so, doesn't mean you can't think of flying, swimming, teleporting, etc.
None of which require legs.

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] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> I can't really think of a
> case where I would want to modify the class definition of an
> instantiated object

You can't very well think to walk if you don't have legs.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Nathan Nobbe
On Wed, Mar 12, 2008 at 2:53 PM, Andrés Robinet <[EMAIL PROTECTED]>
wrote:

> I think __autoload would make much more sense if it worked like an event
> registration feature. Such as:
>
> function myAutoloadCallback($className) {
>if ($className == 'ShakeItBaby') {
>require_once 'ShakeItBaby.class.php';
>return true;
>}
>return false;
> }
> .
>
> __autoloadRegisterCallback('myAutoloadCallback');
> .
>
> $shaker = new ShakeItBaby();
>
> This way, multiple frameworks and project requirements for autoload
> wouldn't clash. If one of the autoload callbacks returns "true" that would
> be it. Otherwise the next autoload callback would be called, and so on.
>
> The problem with the current implementation is that if you get some piece
> of code that uses __autoload and you are using __autoload too, you'll have
> to either patch that piece of code (if the "piece of code" is a framework,
> things will get much more complicated when updating to the next version) or
> patch your own code, or just make a promise not to use __autoload (my
> current choice... just in case) or not to use "pieces of code that use
> __autoload". Bottom line, I hate it.


as eric pointed out earlier, thats what spl_autoload_register is for;
http://us.php.net/manual/en/function.spl-autoload-register.php

-nathan


RE: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Zoltán Németh
2008. 03. 12, szerda keltezéssel 15.07-kor Stephane Ulysse ezt írta:
> Anyone know any PHP Developers who are looking for employment

don't hijack other people's threads, start your own if you want to ask
anything.

and job offers should contain some information about the job and the
employer, and the subject line should be relevant to your question, and
etc etc etc

greets,
Zoltán Németh

> 
> -Original Message-
> From: Andrés Robinet [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 12, 2008 2:53 PM
> To: 'Robert Cummings'; 'Zoltán Németh'
> Cc: 'Greg Donald'; php-general@lists.php.net
> Subject: RE: [PHP] What's wrong the __autoload()?
> 
> > -Original Message-
> > From: Robert Cummings [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, March 12, 2008 1:51 PM
> > To: Zoltán Németh
> > Cc: Greg Donald; php-general@lists.php.net
> > Subject: Re: [PHP] What's wrong the __autoload()?
> > 
> > 
> > On Wed, 2008-03-12 at 18:21 +0100, Zoltán Németh wrote:
> > > 2008. 03. 12, szerda keltezéssel 12.12-kor Greg Donald ezt írta:
> > > > On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> > > > > but I strongly think that Ruby as a
> > > > > language just plain sucks ;)
> > > >
> > > > And exactly how many projects do you have under your belt to allow you
> > > > to develop this opinion?  What's the url to any one of them?
> > > >
> > > > Unlike you I actually have thousands of lines of Ruby code under my
> > > > belt that allows me to properly develop an opinion of Ruby and Rails
> > > > and how they both compare to every other programming language and
> > > > framework I know and have developed in.  Need a URL?
> > >
> > > ok, I admit I don't have experience with Ruby but I have experience with
> > > php. and I don't have experience with Ruby because I read some manuals
> > > and example codes and whatnot and I just could not get to like it at
> > > all. it's just so strange and different from anything I know (php, c,
> > > java) - and I could not find out any good reasons for most of the
> > > differences... e.g. how come function definitions are between 'def' and
> > > 'end'?
> > 
> > Because they didn't follow convention... *HAHAHA* oh my, I think I just
> > pee'd myself.
> > 
> > Cheers,
> > Rob.
> > --
> > http://www.interjinn.com
> > Application and Templating Framework for PHP
> > 
> > 
> 
> I think __autoload would make much more sense if it worked like an event 
> registration feature. Such as:
> 
> function myAutoloadCallback($className) {
>   if ($className == 'ShakeItBaby') {
>   require_once 'ShakeItBaby.class.php';
>   return true;
>   }
>   return false;
> }
> .
> 
> __autoloadRegisterCallback('myAutoloadCallback');
> .
> 
> $shaker = new ShakeItBaby();
> 
> This way, multiple frameworks and project requirements for autoload wouldn't 
> clash. If one of the autoload callbacks returns "true" that would be it. 
> Otherwise the next autoload callback would be called, and so on.
> 
> The problem with the current implementation is that if you get some piece of 
> code that uses __autoload and you are using __autoload too, you'll have to 
> either patch that piece of code (if the "piece of code" is a framework, 
> things will get much more complicated when updating to the next version) or 
> patch your own code, or just make a promise not to use __autoload (my current 
> choice... just in case) or not to use "pieces of code that use __autoload". 
> Bottom line, I hate it.
> 
> Something similar applies to the set_error_handling function, anyone can 
> overwrite your error handling and you can overwrite the error handling of 
> anyone. I hate it also, so I rather check the return value of functions, 
> and/or use exceptions for custom error handling.
> 
> I don't see why autoload and error handling can't be implemented in a 
> stack-like way, returning false from the callback moves to the next error 
> handler / autoloader, returning true ends the "handler search" process... 
> though this is more of a question to be made to the interlals list (b... 
> can't face their karma yet).
> 
> Anyway... the more PHP approaches OOP and gets OOP features, the more it can 
> be done through design patterns such as the Registry/Singleton/etc... and the 
> more Exceptions are used for PECL extensions, and this seems the trend for 
> the future of PHP.
> 
> Regards,
> 
> Rob(inet)
> 
> Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
> 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 
> | TEL 954-607-4296 | FAX 954-337-2695 | 
> Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace 
> |  Web: bestplace.biz  | Web: seo-diy.com
> 
> 
> 
> 
> 


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



RE: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Stephane Ulysse
Anyone know any PHP Developers who are looking for employment

-Original Message-
From: Andrés Robinet [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2008 2:53 PM
To: 'Robert Cummings'; 'Zoltán Németh'
Cc: 'Greg Donald'; php-general@lists.php.net
Subject: RE: [PHP] What's wrong the __autoload()?

> -Original Message-
> From: Robert Cummings [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2008 1:51 PM
> To: Zoltán Németh
> Cc: Greg Donald; php-general@lists.php.net
> Subject: Re: [PHP] What's wrong the __autoload()?
> 
> 
> On Wed, 2008-03-12 at 18:21 +0100, Zoltán Németh wrote:
> > 2008. 03. 12, szerda keltezéssel 12.12-kor Greg Donald ezt írta:
> > > On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> > > > but I strongly think that Ruby as a
> > > > language just plain sucks ;)
> > >
> > > And exactly how many projects do you have under your belt to allow you
> > > to develop this opinion?  What's the url to any one of them?
> > >
> > > Unlike you I actually have thousands of lines of Ruby code under my
> > > belt that allows me to properly develop an opinion of Ruby and Rails
> > > and how they both compare to every other programming language and
> > > framework I know and have developed in.  Need a URL?
> >
> > ok, I admit I don't have experience with Ruby but I have experience with
> > php. and I don't have experience with Ruby because I read some manuals
> > and example codes and whatnot and I just could not get to like it at
> > all. it's just so strange and different from anything I know (php, c,
> > java) - and I could not find out any good reasons for most of the
> > differences... e.g. how come function definitions are between 'def' and
> > 'end'?
> 
> Because they didn't follow convention... *HAHAHA* oh my, I think I just
> pee'd myself.
> 
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
> 
> 

I think __autoload would make much more sense if it worked like an event 
registration feature. Such as:

function myAutoloadCallback($className) {
if ($className == 'ShakeItBaby') {
require_once 'ShakeItBaby.class.php';
return true;
}
return false;
}
.

__autoloadRegisterCallback('myAutoloadCallback');
.

$shaker = new ShakeItBaby();

This way, multiple frameworks and project requirements for autoload wouldn't 
clash. If one of the autoload callbacks returns "true" that would be it. 
Otherwise the next autoload callback would be called, and so on.

The problem with the current implementation is that if you get some piece of 
code that uses __autoload and you are using __autoload too, you'll have to 
either patch that piece of code (if the "piece of code" is a framework, things 
will get much more complicated when updating to the next version) or patch your 
own code, or just make a promise not to use __autoload (my current choice... 
just in case) or not to use "pieces of code that use __autoload". Bottom line, 
I hate it.

Something similar applies to the set_error_handling function, anyone can 
overwrite your error handling and you can overwrite the error handling of 
anyone. I hate it also, so I rather check the return value of functions, and/or 
use exceptions for custom error handling.

I don't see why autoload and error handling can't be implemented in a 
stack-like way, returning false from the callback moves to the next error 
handler / autoloader, returning true ends the "handler search" process... 
though this is more of a question to be made to the interlals list (b... 
can't face their karma yet).

Anyway... the more PHP approaches OOP and gets OOP features, the more it can be 
done through design patterns such as the Registry/Singleton/etc... and the more 
Exceptions are used for PECL extensions, and this seems the trend for the 
future of PHP.

Regards,

Rob(inet)

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 | 
TEL 954-607-4296 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace |  
Web: bestplace.biz  | Web: seo-diy.com





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




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



RE: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Andrés Robinet
> -Original Message-
> From: Robert Cummings [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2008 1:51 PM
> To: Zoltán Németh
> Cc: Greg Donald; php-general@lists.php.net
> Subject: Re: [PHP] What's wrong the __autoload()?
> 
> 
> On Wed, 2008-03-12 at 18:21 +0100, Zoltán Németh wrote:
> > 2008. 03. 12, szerda keltezéssel 12.12-kor Greg Donald ezt írta:
> > > On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> > > > but I strongly think that Ruby as a
> > > > language just plain sucks ;)
> > >
> > > And exactly how many projects do you have under your belt to allow you
> > > to develop this opinion?  What's the url to any one of them?
> > >
> > > Unlike you I actually have thousands of lines of Ruby code under my
> > > belt that allows me to properly develop an opinion of Ruby and Rails
> > > and how they both compare to every other programming language and
> > > framework I know and have developed in.  Need a URL?
> >
> > ok, I admit I don't have experience with Ruby but I have experience with
> > php. and I don't have experience with Ruby because I read some manuals
> > and example codes and whatnot and I just could not get to like it at
> > all. it's just so strange and different from anything I know (php, c,
> > java) - and I could not find out any good reasons for most of the
> > differences... e.g. how come function definitions are between 'def' and
> > 'end'?
> 
> Because they didn't follow convention... *HAHAHA* oh my, I think I just
> pee'd myself.
> 
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
> 
> 

I think __autoload would make much more sense if it worked like an event 
registration feature. Such as:

function myAutoloadCallback($className) {
if ($className == 'ShakeItBaby') {
require_once 'ShakeItBaby.class.php';
return true;
}
return false;
}
.

__autoloadRegisterCallback('myAutoloadCallback');
.

$shaker = new ShakeItBaby();

This way, multiple frameworks and project requirements for autoload wouldn't 
clash. If one of the autoload callbacks returns "true" that would be it. 
Otherwise the next autoload callback would be called, and so on.

The problem with the current implementation is that if you get some piece of 
code that uses __autoload and you are using __autoload too, you'll have to 
either patch that piece of code (if the "piece of code" is a framework, things 
will get much more complicated when updating to the next version) or patch your 
own code, or just make a promise not to use __autoload (my current choice... 
just in case) or not to use "pieces of code that use __autoload". Bottom line, 
I hate it.

Something similar applies to the set_error_handling function, anyone can 
overwrite your error handling and you can overwrite the error handling of 
anyone. I hate it also, so I rather check the return value of functions, and/or 
use exceptions for custom error handling.

I don't see why autoload and error handling can't be implemented in a 
stack-like way, returning false from the callback moves to the next error 
handler / autoloader, returning true ends the "handler search" process... 
though this is more of a question to be made to the interlals list (b... 
can't face their karma yet).

Anyway... the more PHP approaches OOP and gets OOP features, the more it can be 
done through design patterns such as the Registry/Singleton/etc... and the more 
Exceptions are used for PECL extensions, and this seems the trend for the 
future of PHP.

Regards,

Rob(inet)

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 | 
TEL 954-607-4296 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE: bestplace |  
Web: bestplace.biz  | Web: seo-diy.com





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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Zoltán Németh
2008. 03. 12, szerda keltezéssel 13.27-kor Greg Donald ezt írta:
> On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> > ok, I admit I don't have experience with Ruby but I have experience with
> >  php. and I don't have experience with Ruby because I read some manuals
> >  and example codes and whatnot and I just could not get to like it at
> >  all.
> 
> That's a lot different from your previous blanket statement of "Ruby
> as a language just plain sucks".  I hate you less now that I know a
> bit more about you, see how that works?

didn't you notice the smiley at the end of that line? that was not a
serious plain statement but some mocking at you because you made a plain
statement about RoR being better.

> 
> > it's just so strange and different from anything I know (php, c,
> >  java) -
> 
> Ruby has a lot of functional language influence.  Once you use it you
> really start to like how much shorter your iterative loops are for
> example.  The first two developers I worked with using Ruby also knew
> ML and Scheme.  One of them suggested I go study Scheme so I would
> appreciate Ruby more.  I did so for several weeks and now I do.  Ruby
> provides everything from the procedural world we're currently used to
> seeing in PHP, C, and Java, but it also adds functional style that
> makes for some utterly beautiful, compact code.

'utterly beautiful' is again a matter of taste :)
of course, I admit that Ruby would provide me all the features I
currently use, it has to, otherwise noone would start using it instead
of their current language. and yes, I see from the examples that it is
shorter. but is shortness/compactness such a great advantage? I'm not at
all sure about that.

> 
> > and I could not find out any good reasons for most of the
> >  differences...
> 
> And you won't until you use it in practice more than once.  But that's
> true of most any language.  I worked in Python by day for the better
> part of last year and man was it fun seeing other ideas for how to do
> things.

that might be true, but in the last year I've been working on the same
big project, and it seems I will be working on it for this year too, you
know, next versions and such, so at this moment I don't have serious
amount of time to experiment with anything. in fact, I'm also a bit
workaholic and also I'm attending some evening university so I hardly
have time to read a manual completely...

> 
> > e.g. how come function definitions are between 'def' and
> >  'end'?
> 
> def is shorter than PHP's "function" qualifier?  I give up.  'end' is
> optionally replacable with '}',  as is 'do' and '{' but you probably
> didn't ever get to that page in the Ruby book you read.

as I said above, I had/have not much time, so my reading might have been
sloppy... and is shortness that important?

> 
> > I just don't like it and it's a matter of taste,
> 
> In my experience "matter of taste" usually equates to "resistance to
> learning", but call it what you will.

well, there is difference between that. its like if you have a very
limited time frame you can spend on learning, you choose to learn more
of something you like already, no? sure, if I had more time, I would
experiment more with things I don't like or I don't know really.

> 
> > so there is no
> >  need to argue about it more... :)
> 
> There's always reason to argue the features of a given language.  For
> example you may need to try and convince me at some point that Zombie
> is a great language:
> 
> http://www.dangermouse.net/esoteric/zombie.html
> 
> Or not.



> 
> >  however that's not about the framework, I admit that Rails had several
> >  new and useful concepts, and I know that the framework I currently use
> >  took a lot of ideas from there.
> 
> Those other frameworks can never be as powerful as Rails because they
> aren't written in something as meta-capable as Ruby.  Can you do this
> in PHP?
> 
> class Foo
> end
> 
> f = Foo.new
> 
> class Foo
>   Resource.find( :all ).each do |r|
> res = r.name.downcase
> define_method( "op_cost_#{ res }".to_sym ) do
>   self.properties.inject( 0 ){ |c,p| c + p.send( "op_cost_#{ res }" ) }
> end
>   end
> end
> 
> cost = f.op_cost_wheat
> 
> No you can't.  PHP doesn't support adding methods to classes at
> runtime, nor does it support adding methods to instantiated objects of
> those classes at runtime.  And that's just one example.  These sort of
> OO advantages exist throughout Ruby.
> 
> You don't love these features because you don't know they exist.  You
> don't know they exist because you haven't given the language more than
> a few minutes of your time.  Running through some silly little 5
> minute Rails scaffolding tutorial will in no way teach you the real
> power that exists in Ruby.

hmm that feature looks interesting, however I can't really think of a
case where I would want to modify the class definition of an
instantiated object maybe later, when I'll have some more time I
give Ruby a second run

[PHP] PHP CLI neat errors!

2008-03-12 Thread Steve Finkelstein
So, I use a Mac to develop with. I used to host Zend Core on my box,
until I switched to the MAMP PRO framework.

Unfortunately somewhere in between, this lovely issue started occuring
with my CLI binary of PHP:

foo:~ sf$ php -l
dyld: NSLinkModule() error
dyld: Symbol not found: _zend_extensions
 Referenced from: /usr/local/Zend/Core/lib/zend/ZendExtensionManager.so
 Expected in: flat namespace

Trace/BPT trap

I could recompile PHP because if I'm reading this properly, some
dynamically shared libraries aren't loading. Before I do that though,
was curious if anyone ever faced the same dilemma before.

Cheers!

/sf

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



Re: [PHP] Storing values between multiple page forms

2008-03-12 Thread Daniel Brown
On Wed, Mar 12, 2008 at 2:37 PM, Jim Lucas <[EMAIL PROTECTED]> wrote:
>  If you are going to follow Daniel's example, since you could potentially be
>  working with more then one server on any given order, you might want to look 
> at
>  using a multi-dimensional array to store your values in.

An excellent point, Jim.  I hadn't even thought to mention that,
to be honest.  That should be a great fit for what Matt's working on.

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] Storing values between multiple page forms

2008-03-12 Thread Jim Lucas

Matty Sarro wrote:

Yeah, I'm working on this with the hopes of it turning into a full module
for a larger project I'm working on... but I'm still a bit of a noob :)
Thanks for the assistance guys!

On Tue, Mar 11, 2008 at 11:48 AM, Daniel Brown <[EMAIL PROTECTED]> wrote:


On Tue, Mar 11, 2008 at 11:11 AM, Matty Sarro <[EMAIL PROTECTED]> wrote:

Greets all!
 I am working on a minor project for work for entering inventory

information

 for servers we ship out.

 Here is my plan:
 First page -
 Get client name, number of servers, and find number of miscellaneous
 equipment(s) being shipped (UPS's, monitors, etc)

[snip!]

 I'm still planning this out... my major concern is how would I maintain
 values between pages?

\n";
print_r($_SESSION);
echo "\n";
?>

   RTFM: http://php.net/session

   Keep in mind, it'll only work on the same server and same domain.
Otherwise, you may want to look into using wildcard cookies.

--


Daniel P. Brown
Senior Unix Geek






If you are going to follow Daniel's example, since you could potentially be 
working with more then one server on any given order, you might want to look at 
using a multi-dimensional array to store your values in.


$_SESSION['order_info'] = array();

$_SESSION['order_info']['customer_data'] = array();

$_SESSION['order_info']['customer_data']['name'] = '';

$contact_data = array();
$contact_data['type'] = 'billing';
$contact_data['address']  = '123 Someplace Ave';
$contact_data['city'] = 'New York';
$contact_data['state']= 'NY';
$contact_data['phone_number'] = '2134526523';

$_SESSION['order_info']['customer_data']['contact_data'][0] = $contact_data;

$contact_data = array();
$contact_data['address']  = 'shipping';
$contact_data['city'] = '321 Somewhere Ave';
$contact_data['state']= 'New York';
$contact_data['state']= 'NY';
$contact_data['phone_number'] = '2134526523';

$_SESSION['order_info']['customer_data']['contact_data'][1] = $contact_data;

$server['make']  = 'Dell';
$server['model'] = 'Power Edge 2400';
$server['ram']   = '2gig';
$server['hd']= '6x18g Seagate U320 SCSI';
$server['video'] = '64 ATI';

$_SESSION['order_info']['servers'][0]  = $server;

$server['make']  = 'Dell';
$server['model'] = 'Power Edge 2600';
$server['ram']   = '2gig';
$server['hd']= '3x36g Seagate U320 SCSI';
$server['video'] = '64 ATI';

$_SESSION['order_info']['servers'][1]  = $server;


As you might have guessed, I like arrays.

I would actually go as far as making arrays out of the ram, hd, etc... data. 
This would allow me to have detailed information about each section/option.


Hope this helps

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> ok, I admit I don't have experience with Ruby but I have experience with
>  php. and I don't have experience with Ruby because I read some manuals
>  and example codes and whatnot and I just could not get to like it at
>  all.

That's a lot different from your previous blanket statement of "Ruby
as a language just plain sucks".  I hate you less now that I know a
bit more about you, see how that works?

> it's just so strange and different from anything I know (php, c,
>  java) -

Ruby has a lot of functional language influence.  Once you use it you
really start to like how much shorter your iterative loops are for
example.  The first two developers I worked with using Ruby also knew
ML and Scheme.  One of them suggested I go study Scheme so I would
appreciate Ruby more.  I did so for several weeks and now I do.  Ruby
provides everything from the procedural world we're currently used to
seeing in PHP, C, and Java, but it also adds functional style that
makes for some utterly beautiful, compact code.

> and I could not find out any good reasons for most of the
>  differences...

And you won't until you use it in practice more than once.  But that's
true of most any language.  I worked in Python by day for the better
part of last year and man was it fun seeing other ideas for how to do
things.

> e.g. how come function definitions are between 'def' and
>  'end'?

def is shorter than PHP's "function" qualifier?  I give up.  'end' is
optionally replacable with '}',  as is 'do' and '{' but you probably
didn't ever get to that page in the Ruby book you read.

> I just don't like it and it's a matter of taste,

In my experience "matter of taste" usually equates to "resistance to
learning", but call it what you will.

> so there is no
>  need to argue about it more... :)

There's always reason to argue the features of a given language.  For
example you may need to try and convince me at some point that Zombie
is a great language:

http://www.dangermouse.net/esoteric/zombie.html

Or not.

>  however that's not about the framework, I admit that Rails had several
>  new and useful concepts, and I know that the framework I currently use
>  took a lot of ideas from there.

Those other frameworks can never be as powerful as Rails because they
aren't written in something as meta-capable as Ruby.  Can you do this
in PHP?

class Foo
end

f = Foo.new

class Foo
  Resource.find( :all ).each do |r|
res = r.name.downcase
define_method( "op_cost_#{ res }".to_sym ) do
  self.properties.inject( 0 ){ |c,p| c + p.send( "op_cost_#{ res }" ) }
end
  end
end

cost = f.op_cost_wheat

No you can't.  PHP doesn't support adding methods to classes at
runtime, nor does it support adding methods to instantiated objects of
those classes at runtime.  And that's just one example.  These sort of
OO advantages exist throughout Ruby.

You don't love these features because you don't know they exist.  You
don't know they exist because you haven't given the language more than
a few minutes of your time.  Running through some silly little 5
minute Rails scaffolding tutorial will in no way teach you the real
power that exists in Ruby.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Stut

On 12 Mar 2008, at 17:31, Wolf wrote:

 Richard Heyes <[EMAIL PROTECTED]> wrote:

Greg Donald wrote:

You're
gonna restrict the entire development team from using a given  
feature

just because you don't want to invest 20 minutes in getting your
newbie developer up to spead?  That's pure idiocy.


No it's not. It's not like require_once() is a hassle to type/use
anyhow. Things like editor macros and templates help out enormously  
and

by using them over __auto load you (a business) could save yourself a
lot of time and hence money.


I actually prefer to use a site prepend and append, then in the  
prepend file is where I throw all my requires and such.  pretty much  
takes care of any learning curve since with the prepended file doing  
the heavy lifting.


But by doing so you're including a lot of code you almost certainly  
don't use on every page. That can pointlessly consume resources on a  
busy server.


I use __autoload (and for new projects the SPL version) because I know  
that anyone who can't "get it" within 5 minutes is not someone I want  
to work with.


Not using language features because some developers might not know  
about it is going to restrict you to the sort of instruction set you  
get in Assembler. I've been working with PHP for a very long time and  
I certainly don't claim to know everything about it or about every  
feature it has. Restrict your code in that way and you'll create a  
slow unmaintainable mess.


IMHO.

-Stut

--
http://stut.net/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings

On Wed, 2008-03-12 at 18:21 +0100, Zoltán Németh wrote:
> 2008. 03. 12, szerda keltezéssel 12.12-kor Greg Donald ezt írta:
> > On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> > > but I strongly think that Ruby as a
> > > language just plain sucks ;)
> > 
> > And exactly how many projects do you have under your belt to allow you
> > to develop this opinion?  What's the url to any one of them?
> > 
> > Unlike you I actually have thousands of lines of Ruby code under my
> > belt that allows me to properly develop an opinion of Ruby and Rails
> > and how they both compare to every other programming language and
> > framework I know and have developed in.  Need a URL?
> 
> ok, I admit I don't have experience with Ruby but I have experience with
> php. and I don't have experience with Ruby because I read some manuals
> and example codes and whatnot and I just could not get to like it at
> all. it's just so strange and different from anything I know (php, c,
> java) - and I could not find out any good reasons for most of the
> differences... e.g. how come function definitions are between 'def' and
> 'end'?

Because they didn't follow convention... *HAHAHA* oh my, I think I just
pee'd myself.

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] What's wrong the __autoload()?

2008-03-12 Thread Wolf

 Richard Heyes <[EMAIL PROTECTED]> wrote: 
> Greg Donald wrote:
> > On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> >> That's not quite the situation. Finding good developers isn't easy, so
> >>  lots of companies will go for "acceptable" ones, who are less likely to
> >>  know of __autoloads existence. Hence, using __autoload is unwise.
> > 
> > A lesser developer should be paid less and should be expected to
> > produce less but he should not in any way be allowed to refrain from
> > learning.
> 
> I agree. But having worked in the (then) fast paced environment of 
> online DVD rental, time was not available.

Learning always has to happen, even if you don't think it is...  Some are just 
slower then others. 

> > How long does it take to understand __autoload() anyway?  5-10
> > minutes?
> 
> I would say as long as it takes to read the manual page, which isn't 
> that long at all.

And you have to couple in with that the person's mental capacity for what they 
are trying to learn, their background, and if they have any other knowledge of 
the subject.

>  > You're
> > gonna restrict the entire development team from using a given feature
> > just because you don't want to invest 20 minutes in getting your
> > newbie developer up to spead?  That's pure idiocy.
> 
> No it's not. It's not like require_once() is a hassle to type/use 
> anyhow. Things like editor macros and templates help out enormously and 
> by using them over __auto load you (a business) could save yourself a 
> lot of time and hence money.

I actually prefer to use a site prepend and append, then in the prepend file is 
where I throw all my requires and such.  pretty much takes care of any learning 
curve since with the prepended file doing the heavy lifting.

Wolf

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Zoltán Németh
2008. 03. 12, szerda keltezéssel 12.12-kor Greg Donald ezt írta:
> On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> > but I strongly think that Ruby as a
> > language just plain sucks ;)
> 
> And exactly how many projects do you have under your belt to allow you
> to develop this opinion?  What's the url to any one of them?
> 
> Unlike you I actually have thousands of lines of Ruby code under my
> belt that allows me to properly develop an opinion of Ruby and Rails
> and how they both compare to every other programming language and
> framework I know and have developed in.  Need a URL?

ok, I admit I don't have experience with Ruby but I have experience with
php. and I don't have experience with Ruby because I read some manuals
and example codes and whatnot and I just could not get to like it at
all. it's just so strange and different from anything I know (php, c,
java) - and I could not find out any good reasons for most of the
differences... e.g. how come function definitions are between 'def' and
'end'? I just don't like it and it's a matter of taste, so there is no
need to argue about it more... :)

however that's not about the framework, I admit that Rails had several
new and useful concepts, and I know that the framework I currently use
took a lot of ideas from there.

greets,
Zoltán Németh

> 
> 
> -- 
> Greg Donald
> http://destiney.com/
> 


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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
>  > Imagine at Blizzard one morning, "Hey guys, we're not going to be able
>  > to use function pointers on the new Diablo III like we had planned to
>  > do, the new hires down the hall don't understand them very well so
>  > just don't use them, OK?"
>
> This is not a valid comparison. The above is the replacement of one
>  convention with another convention. It is not a case of circumventing a
>  convention to achieve a specific, and probably desired outcome.

It's a dead-on, same example, just with a different programming
language and a different language feature.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> No it's not. It's not like require_once() is a hassle to type/use
>  anyhow. Things like editor macros and templates help out enormously and
>  by using them over __auto load you (a business) could save yourself a
>  lot of time and hence money.

I'm not defending __autoload() specifically, I don't do much OO PHP
anyway so I couldn't possibly care less about it.  My argument is that
asking other developers to not use specific language features simply
because lesser developers may not know them very well is just plain
dumb.  I'm sorry you don't get it and I'm done trying to help you get
it.  Good luck codling your lesser developers.  May they never learn
jack on their own.

*sigh*


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings

On Wed, 2008-03-12 at 11:26 -0500, Greg Donald wrote:
> On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> > It's a perfectly viable business reason.
> 
> No it's not.  I guess you need a "business" scenario to wrap your head
> around the idiocy.
> 
> Here you go:
> 
> Imagine at Blizzard one morning, "Hey guys, we're not going to be able
> to use function pointers on the new Diablo III like we had planned to
> do, the new hires down the hall don't understand them very well so
> just don't use them, OK?"

This is not a valid comparison. The above is the replacement of one
convention with another convention. It is not a case of circumventing a
convention to achieve a specific, and probably desired outcome.

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] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings

On Wed, 2008-03-12 at 11:12 -0500, Greg Donald wrote:
> On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > But then you'd end up with something like Ruby on Rails... and we all
> >  know about Ruby on Rails *VOMIT*.
> 
> You clearly don't know much about it or else you wouldn't be bashing
> it.  Period.

Ummm, I've looked into Ruby and RoR. I've tried it out. I've read many
many many articles on it. I JUST DON'T LIKE IT.

> Just admit the fact that you're resistant to learn new,
> better ways of doing things and move on.

Ooooh... a personal attack... what a great way to make me reflect upon
my dislike of RoR. I think the only person around here qualified to
throw around "facts" about me is... you know... ME!

> On the other hand, if there's something in Rails you genuinely don't
> understand, I'll be happy to assist you with that particular
> understanding, off-list or wherever, free of charge.

Oh, there's nothing I don't understand about it. I just don't like it.
Can't a person just not like something anymore? Can't I have my own
opinion anymore? What year is this? 1984?? ... In an alternate universe
that was supposed to be averted?

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] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> but I strongly think that Ruby as a
> language just plain sucks ;)

And exactly how many projects do you have under your belt to allow you
to develop this opinion?  What's the url to any one of them?

Unlike you I actually have thousands of lines of Ruby code under my
belt that allows me to properly develop an opinion of Ruby and Rails
and how they both compare to every other programming language and
framework I know and have developed in.  Need a URL?


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Richard Heyes

Greg Donald wrote:

On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:

That's not quite the situation. Finding good developers isn't easy, so
 lots of companies will go for "acceptable" ones, who are less likely to
 know of __autoloads existence. Hence, using __autoload is unwise.


A lesser developer should be paid less and should be expected to
produce less but he should not in any way be allowed to refrain from
learning.


I agree. But having worked in the (then) fast paced environment of 
online DVD rental, time was not available.



How long does it take to understand __autoload() anyway?  5-10
minutes?


I would say as long as it takes to read the manual page, which isn't 
that long at all.


> You're

gonna restrict the entire development team from using a given feature
just because you don't want to invest 20 minutes in getting your
newbie developer up to spead?  That's pure idiocy.


No it's not. It's not like require_once() is a hassle to type/use 
anyhow. Things like editor macros and templates help out enormously and 
by using them over __auto load you (a business) could save yourself a 
lot of time and hence money.


--
Richard Heyes
Employ me:
http://www.phpguru.org/cv

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Zoltán Németh
2008. 03. 12, szerda keltezéssel 11.12-kor Greg Donald ezt írta:
> On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > But then you'd end up with something like Ruby on Rails... and we all
> >  know about Ruby on Rails *VOMIT*.
> 
> You clearly don't know much about it or else you wouldn't be bashing
> it.  Period.  Just admit the fact that you're resistant to learn new,
> better ways of doing things and move on.

hey, we had a conversation about this a while back, and I'm still not
convinced about RoR being 'better'. it has several cool ideas, which
some php frameworks also follow now (and a few that would be cool in php
frameworks but not yet implemented), but I strongly think that Ruby as a
language just plain sucks ;)

greets,
Zoltán Németh

> 
> On the other hand, if there's something in Rails you genuinely don't
> understand, I'll be happy to assist you with that particular
> understanding, off-list or wherever, free of charge.
> 
> >  Who wants to be stuck on a track when they can soar with the eagles.
> 
> I dunno, why not ask the many Rails clone authors?  I certainly don't
> see any Ruby programmers trying to copy ZF or Symphony.
> 
> >  > http://en.wikipedia.org/wiki/Convention_over_Configuration
> >
> > Interesting how the article promotes the ideas of both convention and
> >  configuration co-existing so that one doesn't lose versatility. Thus,
> >  one could infer that any good framework would allow both paradigms.
> 
> Rails supports both naturally.  It has configurable environments for
> development, testing, and production, all pre-configured for the most
> common cases.  You can even create your own new environments if you
> have something that doesn't fit into dev/test/prod very easily.
> Complete versatility in every regard thanks to Ruby's meta-ness.
> 
> 
> -- 
> Greg Donald
> http://destiney.com/
> 


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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> That's not quite the situation. Finding good developers isn't easy, so
>  lots of companies will go for "acceptable" ones, who are less likely to
>  know of __autoloads existence. Hence, using __autoload is unwise.

A lesser developer should be paid less and should be expected to
produce less but he should not in any way be allowed to refrain from
learning.

How long does it take to understand __autoload() anyway?  5-10
minutes?  15 or 20 if you play with an example for a bit?  You're
gonna restrict the entire development team from using a given feature
just because you don't want to invest 20 minutes in getting your
newbie developer up to spead?  That's pure idiocy.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] A Quick Reminder....

2008-03-12 Thread Ray Hauge

Jason Pruim wrote:


On Mar 12, 2008, at 11:06 AM, Daniel Brown wrote:

On Wed, Mar 12, 2008 at 11:01 AM, TG <[EMAIL PROTECTED]> 
wrote:
How about something OT that we can argue about...   driving on the 
left side

of the road versus the right side.  How does your country compare?


   Here in Pennsyltucky, a lot of people drive on the left, despite
the fact that the whole US is supposed to drive on the right.  It
usually doesn't turn out very good.  .:shakes head, solemnly:.

   Not very good at all.


Up here in the great big hand (Michigan for those who don't know) during 
the winter we have so much snow on the ground that you just kind of 
drive where ever looks like road... Even if it means you have people 
passing on your right going the opposite way.



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]






I'm in Fargo, North Dakota (the "that's a state?" state).  We experience 
very much the same thing.  Especially on the side roads that don't get 
cleared as well.  You just have to make sure that you don't run into 
each other and you're good.


As far as replies, I like bottom posting because it keeps the 
conversation flow more in tact.  GMail does a good job regardless of 
bottom or top posting though.


--
Ray Hauge
www.primateapplications.com

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Richard Heyes

It's a perfectly viable business reason.


No it's not.  I guess you need a "business" scenario to wrap your head
around the idiocy.

Here you go:

Imagine at Blizzard one morning, "Hey guys, we're not going to be able
to use function pointers on the new Diablo III like we had planned to
do, the new hires down the hall don't understand them very well so
just don't use them, OK?"


That's not quite the situation. Finding good developers isn't easy, so 
lots of companies will go for "acceptable" ones, who are less likely to 
know of __autoloads existence. Hence, using __autoload is unwise.


--
Richard Heyes
Employ me:
http://www.phpguru.org/cv

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Eric Butera
On Wed, Mar 12, 2008 at 10:05 AM, Gustavo Narea <[EMAIL PROTECTED]> wrote:
> Hello all,
>
>  I'm wondering what's wrong with the use of __autoload(), since I see that
>  projects like the Zend Framework don't use it and prefer to require_once
>  each required file.
>
>  Thanks in advance.
>  --
>  Gustavo Narea.
>  http://gustavonarea.net/
>
>  Get GNU/Linux! http://www.getgnulinux.org/
>
>
>  --
>  PHP General Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Use spl autoload register instead.  This way your app and dependent
libraries can have their own autoloaders.

http://us2.php.net/manual/en/function.spl-autoload-register.php

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> It's a perfectly viable business reason.

No it's not.  I guess you need a "business" scenario to wrap your head
around the idiocy.

Here you go:

Imagine at Blizzard one morning, "Hey guys, we're not going to be able
to use function pointers on the new Diablo III like we had planned to
do, the new hires down the hall don't understand them very well so
just don't use them, OK?"


-- 
Greg Donald
http://destiney.com/

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



RE: [PHP] A Quick Reminder....

2008-03-12 Thread TG



- Original Message -
From: Andrés Robinet <[EMAIL PROTECTED]>
To: "'Wolf'" <[EMAIL PROTECTED]>,   "'Jason Pruim'" <[EMAIL PROTECTED]>
Cc: "'TG'" <[EMAIL PROTECTED]>, "'Daniel Brown'" <[EMAIL PROTECTED]>,   "'PHP 
General List'" 
Date: Wed, 12 Mar 2008 11:58:26 -0400


> How about when someone "middle-posts" like this... such as some kind of 
> "quoting attempt"...

This is acceptable if there are multiple points.  Better than trying to address 
each point at the top OR bottom.  That just gets awkward.

> Or even worse... tries to quote several of the previous posters in several 
> places?

That's no problem as long as the quoted text included is relevant to the 
response or may be helpful if getting someone "caught up" on at least that 
segment of the conversation.  It doesn't have to include everything having been 
said since the beginning of the conversation.


> So in the end everything is screwed up...

What's screwed up?  Is this unclear?   This is more about what people choose to 
leave in a message versus what they should be trimming out than an issue of 
top/inline/bottom posting.

> ... and he/she still ends with a 
> 
> "Regards,
> 
> Mr X"
> 
> ..as if he/she did no wrong?

Wrong in your eyes, but that's pretty subjective.

> That's the bad thing :D


Is it?  hah.

-TG

sorry...


"Regards.. -TG"  hah


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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Richard Heyes

 For example a junior developer who doesn't know of its existence  and is
 new to a job is less likely to admit ignorance and ask how a class is
 being defined when __autoload() is being used.


That's a the dumbest reason I've ever heard to not use a given language feature.


It's a perfectly viable business reason.

--
Richard Heyes
Employ me:
http://www.phpguru.org/cv

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



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> But then you'd end up with something like Ruby on Rails... and we all
>  know about Ruby on Rails *VOMIT*.

You clearly don't know much about it or else you wouldn't be bashing
it.  Period.  Just admit the fact that you're resistant to learn new,
better ways of doing things and move on.

On the other hand, if there's something in Rails you genuinely don't
understand, I'll be happy to assist you with that particular
understanding, off-list or wherever, free of charge.

>  Who wants to be stuck on a track when they can soar with the eagles.

I dunno, why not ask the many Rails clone authors?  I certainly don't
see any Ruby programmers trying to copy ZF or Symphony.

>  > http://en.wikipedia.org/wiki/Convention_over_Configuration
>
> Interesting how the article promotes the ideas of both convention and
>  configuration co-existing so that one doesn't lose versatility. Thus,
>  one could infer that any good framework would allow both paradigms.

Rails supports both naturally.  It has configurable environments for
development, testing, and production, all pre-configured for the most
common cases.  You can even create your own new environments if you
have something that doesn't fit into dev/test/prod very easily.
Complete versatility in every regard thanks to Ruby's meta-ness.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] A Quick Reminder....

2008-03-12 Thread TG

RFC1855/FYI28:
ftp://ftp.rfc-editor.org/in-notes/rfc1855.txt
ftp://ftp.rfc-editor.org/in-notes/fyi/fyi28.txt

Found via the RFC-Editor archive search:
http://www.rfc-editor.org/

Ok, so this RFC discourages top posting, but it was also written 13 years ago 
when Usenet and other threaded/flat message board type systems were 
prominent.   From doing some quick searches, the predominant opinion seems 
to be "bottom posting was the style back then, most new online services 
lean toward top posting".

Here's quick rundown of services and if they position the cursor at the top 
or bottom when replying:

Gmail: top post
Yahoo Mail: top post
Microsoft Outlook: top post
Hotmail: positions cursor on "To:" line, tabbing down to body puts cursor at 
top
Squirrelmail 1.4: positions cursor on "To:" line, tabbing downt to body puts 
cursor at bottom
Comcast Mail Center: top post

I actually prefer inline responses when there are many different things being 
responded to, but top-posting  when there's just a point or two and I'm 
already familiar with the conversation.  Anyone coming in at the middle of 
the conversation can refer to what's below if needed, but don't have to 
look at it if they already know what's going on.Top-posting, to me, is 
definitely more efficient and preferable.

Do people on Blackberry's and iPhones really want to scroll past a bunch of 
stuff they've already read to get to the actual current message?


Now, don't get me wrong, I'm not saying bottom posting is bad.  I'm really 
just pointing out that it is a preference issue.   And if there's a problem 
with archives and digests, maybe the archives and digests should be 
updated.   It shouldn't matter if people top- or bottom-post, as long as 
they trim messages so there's not a lot of superfluous junk involved.  
THAT's really what causes issues in archives and digests in my experience.. 
regardless of top/bottom posting.

It seems that bottom posting was more of a necessity years ago and that many 
people cling to it as "absolute ettiquette" due more to tradition and 
preference than anything else.

As for hypocrites... I'm not sure how that applies.  Unless you're saying 
people who adhere to strict web standards but still top-post are 
hypocrites.   If you can show me an actual ratified "standard" that says we 
must all top post, then maybe you have a point.  But since the only 
'official' document is an RFC (and my requested comments appear above) from 
13 years ago, then I'll have to call bunk on hypocracy in this case.   It 
would be like saying "I was in the military and we all addressed our 
superiors with SIR  SIR! therefore, since I'm your boss, that's the 
communications standard you must adhere to.. despite not being in the 
miiltary".

Ooops.. I violated another standard.   The period should be within the quotes 
   ... military." Crap.  I'm breaking the internet by not following 
standards.  Oops. I mean. "Internet" (capitalized).

Just deal with the fact that this is a "holy war" issue that nobody going to 
convince anyone to change their mind about and let's move on.If it 
seriously causes a problem with archives and digests, then someone needs to 
update the way messages are presented in the archives and digests because 
it's antiquated.

I recommend using a nice threaded email service like Gmail and not using 
digests..You get a similar effect, but without all this crazy confusion 
when someone top-posts or someone doesn't trim their messages properly.

-TG


- Original Message -
From: Aschwin Wesselius <[EMAIL PROTECTED]>
To: Daniel Brown <[EMAIL PROTECTED]>
Cc: TG <[EMAIL PROTECTED]>, PHP General List 

Date: Wed, 12 Mar 2008 16:14:03 +0100

> But I don't know who started with top-posting which is against the 
> netiquette RFC.
> 
> People sticking with strict HTML, coding standards in PHP, valid XML, 
> nice pixelf*cked CSS etc. and not posting below a message on a list are 
> a bunch of hypocrites. Simple as that.
> -- 
> 
> Aschwin Wesselius


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



RE: [PHP] A Quick Reminder....

2008-03-12 Thread Andrés Robinet
I don't know... but...

> -Original Message-
> From: Wolf [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2008 11:30 AM
> To: Jason Pruim
> Cc: TG; Daniel Brown; PHP General List
> Subject: Re: [PHP] A Quick Reminder
> 
> 
>  Jason Pruim <[EMAIL PROTECTED]> wrote:
> >
> > On Mar 12, 2008, at 11:06 AM, Daniel Brown wrote:
> >
> > > On Wed, Mar 12, 2008 at 11:01 AM, TG <[EMAIL PROTECTED]>
> > > wrote:
> > >> How about something OT that we can argue about...   driving on the
> > >> left side
> > >> of the road versus the right side.  How does your country compare?

How about when someone "middle-posts" like this... such as some kind of 
"quoting attempt"...

> > >
> > >Here in Pennsyltucky, a lot of people drive on the left, despite
> > > the fact that the whole US is supposed to drive on the right.  It
> > > usually doesn't turn out very good.  .:shakes head, solemnly:.
> > >
> > >Not very good at all.
> >
> > Up here in the great big hand (Michigan for those who don't know)
> > during the winter we have so much snow on the ground that you just
> > kind of drive where ever looks like road... Even if it means you have
> > people passing on your right going the opposite way.

Or even worse... tries to quote several of the previous posters in several 
places?

> >
> When I lived in South Dakota, we did the same thing...
> 
> Here in the state of North Carolina (otherwise known as confusion central
> during ANY type of weather) they drive anywhere between the 2 white lines,
> generally as slow as humanly possible with their blinkers on and tieing up
> all lanes...  Even during a 85 degree, 0% overcast, 0% humidity day...
> *grumble*
> 
> 

So in the end everything is screwed up...

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

... and he/she still ends with a 

"Regards,

Mr X"

..as if he/she did no wrong?

That's the bad thing :D


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



Re: [PHP] A Quick Reminder....

2008-03-12 Thread Per Jessen
Daniel Brown wrote:

> Here in Pennsyltucky, a lot of people drive on the left, despite
> the fact that the whole US is supposed to drive on the right.  It
> usually doesn't turn out very good.  .:shakes head, solemnly:.

Don't worry Dan, evolution will sort that out eventually. 


/Per Jessen, Zürich


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



Re: [PHP] mail function and headers

2008-03-12 Thread Alain Roger
ok, so this is what i got and it is still remaining... :-(

Received: from serdev ([127.0.0.1]) by home.com with MailEnable ESMTP; Wed,
> 12 Mar 2008 16:40:18 +0100
> Date: Wed, 12 Mar 2008 16:40:18 +0100
> Subject: subject 3
> To: [EMAIL PROTECTED]
> From: raf, news <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Return-Path: <[EMAIL PROTECTED]>
> X-Mailer: PHP/5.2.4
> MIME-Version: 1.0
> Content-type: text/plain; charset=iso-8859-1
> Content-Transfer-encoding: 7bit
>

as you can see my Return-Path is still pointing on the wrong direction :-(
any other idea ?

A.

On Wed, Mar 12, 2008 at 4:11 PM, spacemarc <[EMAIL PROTECTED]> wrote:

> 2008/3/12, Daniel Brown <[EMAIL PROTECTED]>:
> > You have the From: header parameters reversed.  Try this:
> >
> >   >  $headers  = "From: ".$fromname." <".$email.">\r\n";
> >  $headers .= "Reply-To: ".$email."\r\n";
> >  $headers .= "X-Mailer: PHP/".phpversion()."\r\n";
> >  /*
> > 
> >  */
> >  ?>
>
> you can add these headers:
>
> $header = "From: $fromname<$email>\n";
> $header .= "Reply-To: $email\n";
> $header .= "Return-Path: <$email>\n";
> $header .= "X-Mailer: PHP/" . phpversion() . "\n";
> $header .= "MIME-Version: 1.0\n";
> $header .= "Content-type: text/plain; charset=iso-8859-1\n";
> $header .= "Content-Transfer-encoding: 7bit\n";
>
> Try it.
>
> --
> Scripts: http://www.spacemarc.it
>



-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Robert Cummings

On Wed, 2008-03-12 at 10:33 -0500, Greg Donald wrote:
> On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> > > I'm wondering what's wrong with the use of __autoload(), since I see that
> >  > projects like the Zend Framework don't use it and prefer to require_once
> >  > each required file.
> >
> > Things that happen without you explicitly causing them (ie require() et
> >  al) can lead to confusion.
> 
> It's called "convention over configuration" and that's exactly where
> good frameworks should be headed.

But then you'd end up with something like Ruby on Rails... and we all
know about Ruby on Rails *VOMIT*.

Who wants to be stuck on a track when they can soar with the eagles.

> http://en.wikipedia.org/wiki/Convention_over_Configuration

Interesting how the article promotes the ideas of both convention and
configuration co-existing so that one doesn't lose versatility. Thus,
one could infer that any good framework would allow both paradigms.

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] strtotime( 'last Sunday' ) and republicans

2008-03-12 Thread Greg Donald
On 3/10/08, Wolf <[EMAIL PROTECTED]> wrote:
> Watch throwing that blame around there Greg, you get to thank the
>  democrats for NAFTA and the hurting the heartlands

No matter where we draw the borders or put the roads and highways,
it's still just the one planet, with the same finite resources we all
have to share.  Being mad about globalization is pointless, it's
inevitable.


-- 
Greg Donald
http://destiney.com/

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



Fwd: [PHP] mail function and headers

2008-03-12 Thread Alain Roger
ok i will try... what about UTF-8 to ensure unicode ?
my website and especially the form which will send this email, will be
filled in by several nationalities... spanish, english, french, slovak,
german,,...
so isn't it easier to set up utf-8 ?

A.


On Wed, Mar 12, 2008 at 4:11 PM, spacemarc <[EMAIL PROTECTED]> wrote:

> 2008/3/12, Daniel Brown <[EMAIL PROTECTED]>:
> > You have the From: header parameters reversed.  Try this:
> >
> >   >  $headers  = "From: ".$fromname." <".$email.">\r\n";
> >  $headers .= "Reply-To: ".$email."\r\n";
> >  $headers .= "X-Mailer: PHP/".phpversion()."\r\n";
> >  /*
> > 
> >  */
> >  ?>
>
> you can add these headers:
>
> $header = "From: $fromname<$email>\n";
> $header .= "Reply-To: $email\n";
> $header .= "Return-Path: <$email>\n";
> $header .= "X-Mailer: PHP/" . phpversion() . "\n";
> $header .= "MIME-Version: 1.0\n";
> $header .= "Content-type: text/plain; charset=iso-8859-1\n";
> $header .= "Content-Transfer-encoding: 7bit\n";
>
> Try it.
>
> --
> Scripts: http://www.spacemarc.it
>



-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008



-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Re: [PHP] mail function and headers

2008-03-12 Thread Alain Roger
ok i will try... what about UTF-8 to ensure unicode ?
my website and especially the form which will send this email, will be
filled in by several nationalities... spanish, english, french, slovak,
german,,...
so isn't it easier to set up utf-8 ?

A.

On Wed, Mar 12, 2008 at 4:11 PM, spacemarc <[EMAIL PROTECTED]> wrote:

> 2008/3/12, Daniel Brown <[EMAIL PROTECTED]>:
> > You have the From: header parameters reversed.  Try this:
> >
> >   >  $headers  = "From: ".$fromname." <".$email.">\r\n";
> >  $headers .= "Reply-To: ".$email."\r\n";
> >  $headers .= "X-Mailer: PHP/".phpversion()."\r\n";
> >  /*
> > 
> >  */
> >  ?>
>
> you can add these headers:
>
> $header = "From: $fromname<$email>\n";
> $header .= "Reply-To: $email\n";
> $header .= "Return-Path: <$email>\n";
> $header .= "X-Mailer: PHP/" . phpversion() . "\n";
> $header .= "MIME-Version: 1.0\n";
> $header .= "Content-type: text/plain; charset=iso-8859-1\n";
> $header .= "Content-Transfer-encoding: 7bit\n";
>
> Try it.
>
> --
> Scripts: http://www.spacemarc.it
>



-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> > I'm wondering what's wrong with the use of __autoload(), since I see that
>  > projects like the Zend Framework don't use it and prefer to require_once
>  > each required file.
>
> Things that happen without you explicitly causing them (ie require() et
>  al) can lead to confusion.

It's called "convention over configuration" and that's exactly where
good frameworks should be headed.

http://en.wikipedia.org/wiki/Convention_over_Configuration

>  For example a junior developer who doesn't know of its existence  and is
>  new to a job is less likely to admit ignorance and ask how a class is
>  being defined when __autoload() is being used.

That's a the dumbest reason I've ever heard to not use a given language feature.


-- 
Greg Donald
http://destiney.com/

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



Re: [PHP] A Quick Reminder....

2008-03-12 Thread Wolf

 Jason Pruim <[EMAIL PROTECTED]> wrote: 
> 
> On Mar 12, 2008, at 11:06 AM, Daniel Brown wrote:
> 
> > On Wed, Mar 12, 2008 at 11:01 AM, TG <[EMAIL PROTECTED]>  
> > wrote:
> >> How about something OT that we can argue about...   driving on the  
> >> left side
> >> of the road versus the right side.  How does your country compare?
> >
> >Here in Pennsyltucky, a lot of people drive on the left, despite
> > the fact that the whole US is supposed to drive on the right.  It
> > usually doesn't turn out very good.  .:shakes head, solemnly:.
> >
> >Not very good at all.
> 
> Up here in the great big hand (Michigan for those who don't know)  
> during the winter we have so much snow on the ground that you just  
> kind of drive where ever looks like road... Even if it means you have  
> people passing on your right going the opposite way.
> 
When I lived in South Dakota, we did the same thing...

Here in the state of North Carolina (otherwise known as confusion central 
during ANY type of weather) they drive anywhere between the 2 white lines, 
generally as slow as humanly possible with their blinkers on and tieing up all 
lanes...  Even during a 85 degree, 0% overcast, 0% humidity day...  *grumble*



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



Re: [PHP] PHP & Ajax progress bar

2008-03-12 Thread Thijs Lensselink

Quoting Daniel Brown <[EMAIL PROTECTED]>:


On Wed, Mar 12, 2008 at 11:03 AM, Philip Thompson
<[EMAIL PROTECTED]> wrote:

On Mar 12, 2008, at 9:52 AM, Thijs Lensselink wrote:
 > Quoting Philip Thompson <[EMAIL PROTECTED]>:
 >>
 >> How do you pronounce your name?
 >
 > Well.. how to explain this one...
 >
 > thijs : T + [ice]
 >

 Which is different than the famous rapper/actor...

 hijs-t : [ice] + T



HA!

--


Daniel P. Brown
Senior Unix Geek




Same reaction here!



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



Re: [PHP] A Quick Reminder....

2008-03-12 Thread Jason Pruim


On Mar 12, 2008, at 11:06 AM, Daniel Brown wrote:

On Wed, Mar 12, 2008 at 11:01 AM, TG <[EMAIL PROTECTED]>  
wrote:
How about something OT that we can argue about...   driving on the  
left side

of the road versus the right side.  How does your country compare?


   Here in Pennsyltucky, a lot of people drive on the left, despite
the fact that the whole US is supposed to drive on the right.  It
usually doesn't turn out very good.  .:shakes head, solemnly:.

   Not very good at all.


Up here in the great big hand (Michigan for those who don't know)  
during the winter we have so much snow on the ground that you just  
kind of drive where ever looks like road... Even if it means you have  
people passing on your right going the opposite way.



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]




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



Re: [PHP] A Quick Reminder....

2008-03-12 Thread Aschwin Wesselius

Daniel Brown wrote:

On Wed, Mar 12, 2008 at 11:01 AM, TG <[EMAIL PROTECTED]> wrote:
  

 How about something OT that we can argue about...   driving on the left side
 of the road versus the right side.  How does your country compare?



Here in Pennsyltucky, a lot of people drive on the left, despite
the fact that the whole US is supposed to drive on the right.  It
usually doesn't turn out very good.  .:shakes head, solemnly:.

Not very good at all.


It's the French that started to drive on the right side of the road:

http://users.pandora.be/worldstandards/driving%20on%20the%20left.htm

But I don't know who started with top-posting which is against the 
netiquette RFC.


People sticking with strict HTML, coding standards in PHP, valid XML, 
nice pixelf*cked CSS etc. and not posting below a message on a list are 
a bunch of hypocrites. Simple as that.

--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other'/


Re: [PHP] PHP & Ajax progress bar

2008-03-12 Thread Daniel Brown
On Wed, Mar 12, 2008 at 11:03 AM, Philip Thompson
<[EMAIL PROTECTED]> wrote:
> On Mar 12, 2008, at 9:52 AM, Thijs Lensselink wrote:
>  > Quoting Philip Thompson <[EMAIL PROTECTED]>:
>  >>
>  >> How do you pronounce your name?
>  >
>  > Well.. how to explain this one...
>  >
>  > thijs : T + [ice]
>  >
>
>  Which is different than the famous rapper/actor...
>
>  hijs-t : [ice] + T
>

HA!

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] mail function and headers

2008-03-12 Thread spacemarc
2008/3/12, Daniel Brown <[EMAIL PROTECTED]>:
> You have the From: header parameters reversed.  Try this:
>
>$headers  = "From: ".$fromname." <".$email.">\r\n";
>  $headers .= "Reply-To: ".$email."\r\n";
>  $headers .= "X-Mailer: PHP/".phpversion()."\r\n";
>  /*
> 
>  */
>  ?>

you can add these headers:

$header = "From: $fromname<$email>\n";
$header .= "Reply-To: $email\n";
$header .= "Return-Path: <$email>\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "MIME-Version: 1.0\n";
$header .= "Content-type: text/plain; charset=iso-8859-1\n";
$header .= "Content-Transfer-encoding: 7bit\n";

Try it.

-- 
Scripts: http://www.spacemarc.it

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



Re: [PHP] A Quick Reminder....

2008-03-12 Thread Daniel Brown
On Wed, Mar 12, 2008 at 11:01 AM, TG <[EMAIL PROTECTED]> wrote:
>  How about something OT that we can argue about...   driving on the left side
>  of the road versus the right side.  How does your country compare?

Here in Pennsyltucky, a lot of people drive on the left, despite
the fact that the whole US is supposed to drive on the right.  It
usually doesn't turn out very good.  .:shakes head, solemnly:.

Not very good at all.

-- 


Daniel P. Brown
Senior Unix Geek


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



Re: [PHP] PHP & Ajax progress bar

2008-03-12 Thread Philip Thompson

On Mar 12, 2008, at 9:52 AM, Thijs Lensselink wrote:


Quoting Philip Thompson <[EMAIL PROTECTED]>:


On Mar 12, 2008, at 5:02 AM, Thijs Lensselink wrote:


Thijs Lensselink 写道:


How do you pronounce your name?


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


Well.. how to explain this one...

thijs : T + [ice]

That's the best i can do :)



Which is different than the famous rapper/actor...

hijs-t : [ice] + T

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



Re: [PHP] A Quick Reminder....

2008-03-12 Thread TG

I call TROLL on Dan!  :)   I top post for what I consider to be legitmate 
reasons just like you bottom post for reasons you consider to be legitmate.

Can't we all just get along?


How about something OT that we can argue about...   driving on the left side 
of the road versus the right side.  How does your country compare?

http://i32.photobucket.com/albums/d35/wereallouttabubblegum/Drives_On_Right.jpg

(thus begins a month-long discussion of top posting and driving habits...  
php general archive weeps)  :)

-TG

- Original Message -
From: "Daniel Brown" <[EMAIL PROTECTED]>
To: "PHP General List" 
Date: Wed, 12 Mar 2008 10:54:29 -0400
Subject: [PHP] A Quick Reminder

> Please don't top-post!  ;-P
> 
> -- 
> 
> 
> Daniel P. Brown
> Senior Unix Geek
> 




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



Re: [PHP] Timezone management

2008-03-12 Thread Daniel Brown
On Wed, Mar 12, 2008 at 10:50 AM, Jim Lucas <[EMAIL PROTECTED]> wrote:
>
> Lamonte H wrote:
>  > After a while of studying different softwares,  I've still been getting
>  > confused on how to make a timezone management script to display time in
>  > different time zones.  Like right now im in -0600 CST GMT,  how would I
>  > create a script that would work on any server that would allow me to 
> display
>  > my current time from -12 to 12 GMT in a select box so others could pick
>  > their own time also.
>  >
>
>  Don't forget, there are a few time zones that are off by 30 minutes

You are correct, sir!

This is why you may want to check into using date("O"); to check the offset.

-- 


Daniel P. Brown
Senior Unix Geek


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



  1   2   >