php-general Digest 30 Jul 2008 14:48:31 -0000 Issue 5597

Topics (messages 277448 through 277474):

Re: Why PHP4?
        277448 by: mike
        277449 by: VamVan
        277456 by: Richard Heyes
        277457 by: Per Jessen
        277458 by: Richard Heyes
        277459 by: Hélio Rocha
        277460 by: Thijs Lensselink
        277461 by: Richard Heyes
        277462 by: Hélio Rocha
        277463 by: Per Jessen
        277464 by: Per Jessen
        277466 by: Richard Heyes
        277467 by: Lester Caine
        277468 by: Per Jessen
        277469 by: Per Jessen
        277473 by: Lester Caine
        277474 by: Micah Gersten

Re: PHP4 vs PHP5 classes
        277450 by: Chris
        277451 by: Jim Lucas
        277452 by: Robert Cummings
        277454 by: Larry Garfield
        277455 by: Robert Cummings

Re: limiting the amount of emails sent at a time in a batch send
        277453 by: Chris

Creating new site
        277465 by: Raido
        277470 by: Jason Pruim
        277471 by: Richard Heyes
        277472 by: Hélio Rocha

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message --- I started using superglobals since 4.x; not even thinking about it from a security angle per se, but because it just makes sense to know the source of where your input data is coming from. I guess technically security is a byproduct of that thinking too.



On Jul 29, 2008, at 7:31 PM, VamVan <[EMAIL PROTECTED]> wrote:

Its because PHP got really famous with version 4.0 and many people actually converted their CGI or other websites in to PHP 4 websites because it was easy and cheap. But 5.0 brought too many changes like serious OOPS and register global concepts for security, which is useful but made transition difficult. I feel thats why PHP 4 is still supported.

Its not only the language that has changed, but also people had to upgrade their skill set and there was some learning curve involved.

Unfortunately everyone fell in the trap of register globals which was not dealt until php 4.3.1 as a security concept. Pear and Pecl were there but everyone was pretty much writing all the code (reinventing the wheel) from scratch. This brings in huge code base to change.

I liked PHP because intitially it was a procedural langauge and it resembled C. But now with OOPS you can build powerful websites which is good.

There are many other cases but I feel strongly this is what makes them still support PHP 4.

Thanks

--- End Message ---
--- Begin Message ---
I agree but not everyone think in the sameway. I have seen several big
websites that got hit because they haven't used super globals in the code
and their hosting provided would just change the PHP.ini setting and nothing
would work.

GET, POST , SESSION, REQUEST everything was all dealt as just variable.

On Tue, Jul 29, 2008 at 7:36 PM, mike <[EMAIL PROTECTED]> wrote:

> I started using superglobals since 4.x; not even thinking about it from a
> security angle per se, but because it just makes sense to know the source of
> where your input data is coming from. I guess technically security is a
> byproduct of that thinking too.
>
>
>
>
> On Jul 29, 2008, at 7:31 PM, VamVan <[EMAIL PROTECTED]> wrote:
>
>  Its because PHP got really famous with version 4.0 and many people
>> actually converted their CGI or other websites in to PHP 4 websites because
>> it was easy and cheap. But 5.0 brought too many changes like serious OOPS
>> and register global concepts for security, which is useful but made
>> transition difficult. I feel thats why PHP 4 is still supported.
>>
>> Its not only the language that has changed, but also people had to upgrade
>> their skill set and there was some learning curve involved.
>>
>> Unfortunately everyone fell in the trap of register globals which was not
>> dealt until php 4.3.1 as a security concept. Pear and Pecl were there but
>> everyone was pretty much writing all the code (reinventing the wheel) from
>> scratch. This brings in huge code base to change.
>>
>> I liked PHP because intitially it was a procedural langauge and it
>> resembled C. But now with OOPS you can build powerful websites which is
>> good.
>>
>> There are many other  cases but I feel strongly this is what makes them
>> still support PHP 4.
>>
>> Thanks
>>
>

--- End Message ---
--- Begin Message ---
> I agree but not everyone think in the sameway. I have seen several big
> websites that got hit because they haven't used super globals in the code
> and their hosting provided would just change the PHP.ini setting and nothing
> would work.

Well if it's a "big" website then why use a hoster that changes the
php.ini without much, if any, thought?

-- 
Richard Heyes
http://www.phpguru.org

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:

>> I agree but not everyone think in the sameway. I have seen several
>> big websites that got hit because they haven't used super globals in
>> the code and their hosting provided would just change the PHP.ini
>> setting and nothing would work.
> 
> Well if it's a "big" website then why use a hoster that changes the
> php.ini without much, if any, thought?
> 

The technical abilities and awareness is often inversely proportional to
the size of the hoster. 


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
> The technical abilities and awareness is often inversely proportional to
> the size of the hoster.

Lol.

-- 
Richard Heyes
http://www.phpguru.org

--- End Message ---
--- Begin Message ---
Sorry to disagree,

But I think that with PHP4 a lot of people start thinking that they could be
programmers (maybe they can, developers it's another story). When php5 came
they didn't know how do deal with the deprecated methods and worst, some
hosters didn't know how to virtualize a f1ck1n' server with Apache+PHP5. A
lot of mistakes were made when php5 came out but how can a language grow up
when they DEPRECATE the syntax? we're not talking about removing the last
';'...
Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing it,
and the ones who are stuck in 4 are not helping.

When U write code, U must not be worried 'bout the next upgrade of your
server!


Best regards!

On Wed, Jul 30, 2008 at 3:31 AM, VamVan <[EMAIL PROTECTED]> wrote:

> Its because PHP got really famous with version 4.0 and many people actually
> converted their CGI or other websites in to PHP 4 websites because it was
> easy and cheap. But 5.0 brought too many changes like serious OOPS and
> register global concepts for security, which is useful but made transition
> difficult. I feel thats why PHP 4 is still supported.
>
> Its not only the language that has changed, but also people had to upgrade
> their skill set and there was some learning curve involved.
>
> Unfortunately everyone fell in the trap of register globals which was not
> dealt until php 4.3.1 as a security concept. Pear and Pecl were there but
> everyone was pretty much writing all the code (reinventing the wheel) from
> scratch. This brings in huge code base to change.
>
> I liked PHP because intitially it was a procedural langauge and it
> resembled
> C. But now with OOPS you can build powerful websites which is good.
>
> There are many other  cases but I feel strongly this is what makes them
> still support PHP 4.
>
> Thanks
>

--- End Message ---
--- Begin Message ---
Quoting Hélio Rocha <[EMAIL PROTECTED]>:

Sorry to disagree,

But I think that with PHP4 a lot of people start thinking that they could be
programmers (maybe they can, developers it's another story). When php5 came
they didn't know how do deal with the deprecated methods and worst, some
hosters didn't know how to virtualize a f1ck1n' server with Apache+PHP5. A
lot of mistakes were made when php5 came out but how can a language grow up
when they DEPRECATE the syntax? we're not talking about removing the last
';'...

O come on. All people have had enough time to get used to it. Between the time PHP5 first came out and when it started to gain attention mainstream wise. Is a gap of 5 years. I think 5 years is enough to get used to new / deprecated features. I still think PHP is moving the right way.

When i do an upgrade i first check change logs. You can always expect things to change. It's a dynamic world we live in :)

Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing it,
and the ones who are stuck in 4 are not helping.

When U write code, U must not be worried 'bout the next upgrade of your
server!


Best regards!

On Wed, Jul 30, 2008 at 3:31 AM, VamVan <[EMAIL PROTECTED]> wrote:

Its because PHP got really famous with version 4.0 and many people actually
converted their CGI or other websites in to PHP 4 websites because it was
easy and cheap. But 5.0 brought too many changes like serious OOPS and
register global concepts for security, which is useful but made transition
difficult. I feel thats why PHP 4 is still supported.

Its not only the language that has changed, but also people had to upgrade
their skill set and there was some learning curve involved.

Unfortunately everyone fell in the trap of register globals which was not
dealt until php 4.3.1 as a security concept. Pear and Pecl were there but
everyone was pretty much writing all the code (reinventing the wheel) from
scratch. This brings in huge code base to change.

I liked PHP because intitially it was a procedural langauge and it
resembled
C. But now with OOPS you can build powerful websites which is good.

There are many other  cases but I feel strongly this is what makes them
still support PHP 4.

Thanks



Personally i use PHP5 when ever i can. But at work we are stuck with some small legacy applications . And some major applications written on top of PHP4. For which is no time to do the research let alone the time to rebuild them. I think there are a few reasons why people still use PHP4.

1. People learned PHP4 as a hobby. So upgrading knowledge goes much slower. Then when you have to stay on top work wise. (which will create a chicken egg situation with point 2)

2. Hosting providers have no clue how to configure their environment. Or are stuck with customers running PHP4 applications.

3. No time to research and rebuild existing applications. (which will create a chicken egg situation with point 2)



--- End Message ---
--- Begin Message ---
> Sorry to disagree,

That's nothing to apologise for.

> But I think that with PHP4 a lot of people start thinking that they could be
> programmers (maybe they can, developers it's another story). When php5 came
> they didn't know how do deal with the deprecated methods and worst, some
> hosters didn't know how to virtualize a f1ck1n' server with Apache+PHP5. A
> lot of mistakes were made when php5 came out but how can a language grow up
> when they DEPRECATE the syntax? we're not talking about removing the last

That's not the problem of the PHP developers. Learning is not a case
of spend a few years doing it and you're set - it's a life long thing.

> Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing it,
> and the ones who are stuck in 4 are not helping.

There are alternatives - have you heard of Brainfuck?

> When U write code, U must not be worried 'bout the next upgrade of your
> server!

Of course you should. Writing code with every eventuality in mind is
simply ludicrous. And you really should expect things to change when
major versions are changed - that's why release notes exist.

-- 
Richard Heyes
http://www.phpguru.org

--- End Message ---
--- Begin Message ---
Brainfuck rox! LOL :)

Sure you must see the changelog and other things but take a look:
I can do more and better things with the next generation of the language in
which i wrote my app, but i don't think that it's fair that my app doens't
compile (if it was a compiled language) or stops executing just because i
get an upgrade.

On Wed, Jul 30, 2008 at 10:56 AM, Richard Heyes <[EMAIL PROTECTED]>wrote:

> > Sorry to disagree,
>
> That's nothing to apologise for.
>
> > But I think that with PHP4 a lot of people start thinking that they could
> be
> > programmers (maybe they can, developers it's another story). When php5
> came
> > they didn't know how do deal with the deprecated methods and worst, some
> > hosters didn't know how to virtualize a f1ck1n' server with Apache+PHP5.
> A
> > lot of mistakes were made when php5 came out but how can a language grow
> up
> > when they DEPRECATE the syntax? we're not talking about removing the last
>
> That's not the problem of the PHP developers. Learning is not a case
> of spend a few years doing it and you're set - it's a life long thing.
>
> > Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing
> it,
> > and the ones who are stuck in 4 are not helping.
>
> There are alternatives - have you heard of Brainfuck?
>
> > When U write code, U must not be worried 'bout the next upgrade of your
> > server!
>
> Of course you should. Writing code with every eventuality in mind is
> simply ludicrous. And you really should expect things to change when
> major versions are changed - that's why release notes exist.
>
> --
> Richard Heyes
> http://www.phpguru.org
>

--- End Message ---
--- Begin Message ---
Hélio Rocha wrote:

> methods and worst, some hosters didn't know how to virtualize a
> f1ck1n' server with Apache+PHP5. 

Despite their many inabilities, I doubt if any hosting service would
have a problem with that. 
If you're trying to figure out why so many haven't changed, there's one
question you need to ask - why should they?  What's the business-case?


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
Richard Heyes wrote:

> 
>> When U write code, U must not be worried 'bout the next upgrade of
>> your server!
> 
> Of course you should. Writing code with every eventuality in mind is
> simply ludicrous. 

Umm, I beg to differ.  A developer should not need to worry about a
possible/future upgrade of the runtime platform.  I certainly don't
worry about the next release of gcc or glibc when I write C. 



/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
> Umm, I beg to differ.  A developer should not need to worry about a
> possible/future upgrade of the runtime platform.  I certainly don't
> worry about the next release of gcc or glibc when I write C.

Minor point releases certainly, but not major ones. They're major
upgrades for a reason - things change.

-- 
Richard Heyes
http://www.phpguru.org

--- End Message ---
--- Begin Message ---
Per Jessen wrote:
Richard Heyes wrote:

When U write code, U must not be worried 'bout the next upgrade of
your server!
Of course you should. Writing code with every eventuality in mind is
simply ludicrous.

Umm, I beg to differ.  A developer should not need to worry about a
possible/future upgrade of the runtime platform.  I certainly don't
worry about the next release of gcc or glibc when I write C.

I can live with both sides of the argument.

All the SQL scripts I write SHOULD still work with a later version of the database engine, but changes to make things compatible with standards can cause problems with that. So I need to test scripts following a major release.

PHP upgrades have certainly broken backwards compatibility, but then I've had similar problems with the Borland C compilers as well. But at least Borland attempt to update things to at least compile in later versions and warn of the 'errors'

gcc has had problems and I see various posts about 'not using version xxx' for building yyy because it's broken. So we all have to live with the possibility that a later version may not ACTUALLY work for us - and wait for the problem to be fixed either in gcc or the application. ( Wasn't there a problem with PHP5 and some version of gcc? )

I don't agree with a lot of the 'changes' that are being forced into PHP5 and certainly feel that they should have been kept to PHP6, but the real problem to date has been BACKPORTING some of these changes TO PHP4 rather than having frozen any 'development' of PHP4 a lot earlier. I never used PHP4 and I would prefer not to have to worry about it now, but projects I am using still maintain backwards compatibility rather than also freezing a version that works with PHP4.X and then moving developments forward. Currently I'm looking at a lot of 'deprecated' messages from PHP5.3.x and wondering "Do I fix them and risk problems with PHP4 compatibility or do I just switch off the error?"

Some ISP's are still only supporting rather ancient versions of PHP4. They should simply be warned of the security risks. Some ISP's have a PHP5 offering, but again an older version simply because it causes less problems when converting from PHP4. PHP5.3 is going to throw up another round of problems which makes a move from PHP4 even more time consuming so there should be a serious discussion as to *IF* that should be allowed? Keeping moving the goal posts even further from an environment into which PHP4 applications can be ported easily is the problem, rather than the switch from PHP4 to PHP5 pre say :(

Lets request that PHP5.3 is not released at this time, but instead an effort is put in to get all the major web applications at least running in PHP5.2 before even more changes are introduced.

And a beta release of PHP6 with a clean unicode base would be nice ...

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

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:

>> Umm, I beg to differ.  A developer should not need to worry about a
>> possible/future upgrade of the runtime platform.  I certainly don't
>> worry about the next release of gcc or glibc when I write C.
> 
> Minor point releases certainly, but not major ones. They're major
> upgrades for a reason - things change.

Yes, but a change in the language or a library should not force anyone
to make source code changes.  IMHO, that is to be avoided at all costs. 
A recompile is acceptable, of course. 


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
Lester Caine wrote:

> Some ISP's are still only supporting rather ancient versions of PHP4.
> They should simply be warned of the security risks. Some ISP's have a
> PHP5 offering, but again an older version simply because it causes
> less problems when converting from PHP4. 

The problem for an ISP is - with thousands of customers, he has no way
of knowing who has used what PHP extension or feature.  Without
virtually guaranteed backwards compatibility, a mass upgrade of 4 to 5
could be a major headache.  
Besides, are the security risks sufficiently severe for the ISP to
warrant the upgrade effort+headache?


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
Per Jessen wrote:
Lester Caine wrote:

Some ISP's are still only supporting rather ancient versions of PHP4.
They should simply be warned of the security risks. Some ISP's have a
PHP5 offering, but again an older version simply because it causes
less problems when converting from PHP4.

The problem for an ISP is - with thousands of customers, he has no way
of knowing who has used what PHP extension or feature.  Without
virtually guaranteed backwards compatibility, a mass upgrade of 4 to 5
could be a major headache. Besides, are the security risks sufficiently severe for the ISP to
warrant the upgrade effort+headache?

Having seen the problems some of the 'upgrades' have caused I can only agree. But getting a stable version of PHP5 out on to which existing PHP4 users can be migrated is probably essential. And feature freezing that base is a must, so that at least there is a fixed target. I've managed to sort of jump through single versions of 5.0.x - 5.1.6 and now 5.2.6 although the latter was more due to regressive bugs in most of the versions from 5.1.6 to 5.2.6.

At present I can't see any logic reason to even bother with 5.3 until all of my customer sites have been moved to 5.2.6 which will probably take another year. so anything that helps people at least start migrating TO PHP5 should be encouraged?

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

--- End Message ---
--- Begin Message ---
Sometimes deprecation is necessary is a language feature is created out
of necessity but is superseded by a superior language form.
A great example is the HTML FONT tag.  Font tags slow down downloads and
renderings, and were deprecated in favor of CSS style sheets which offer
much more control and a smaller footprint.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Hélio Rocha wrote:
> Sorry to disagree,
>
> But I think that with PHP4 a lot of people start thinking that they could be
> programmers (maybe they can, developers it's another story). When php5 came
> they didn't know how do deal with the deprecated methods and worst, some
> hosters didn't know how to virtualize a f1ck1n' server with Apache+PHP5. A
> lot of mistakes were made when php5 came out but how can a language grow up
> when they DEPRECATE the syntax? we're not talking about removing the last
> ';'...
> Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing it,
> and the ones who are stuck in 4 are not helping.
>
> When U write code, U must not be worried 'bout the next upgrade of your
> server!
>
>
> Best regards!
>
> On Wed, Jul 30, 2008 at 3:31 AM, VamVan <[EMAIL PROTECTED]> wrote:
>
>   
>> Its because PHP got really famous with version 4.0 and many people actually
>> converted their CGI or other websites in to PHP 4 websites because it was
>> easy and cheap. But 5.0 brought too many changes like serious OOPS and
>> register global concepts for security, which is useful but made transition
>> difficult. I feel thats why PHP 4 is still supported.
>>
>> Its not only the language that has changed, but also people had to upgrade
>> their skill set and there was some learning curve involved.
>>
>> Unfortunately everyone fell in the trap of register globals which was not
>> dealt until php 4.3.1 as a security concept. Pear and Pecl were there but
>> everyone was pretty much writing all the code (reinventing the wheel) from
>> scratch. This brings in huge code base to change.
>>
>> I liked PHP because intitially it was a procedural langauge and it
>> resembled
>> C. But now with OOPS you can build powerful websites which is good.
>>
>> There are many other  cases but I feel strongly this is what makes them
>> still support PHP 4.
>>
>> Thanks
>>
>>     
>
>   

--- End Message ---
--- Begin Message ---
> Don't forget that in PHP5, the constructor named has changed.  In PHP4
> it called a method with the same name as the class.  But, in PHP5, it
> looks for __construct() instead.

If __construct doesn't exist then it falls back to the php4 way - makes
it backwards compatible :)

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

--- End Message ---
--- Begin Message ---
Chris wrote:
Don't forget that in PHP5, the constructor named has changed.  In PHP4
it called a method with the same name as the class.  But, in PHP5, it
looks for __construct() instead.

If __construct doesn't exist then it falls back to the php4 way - makes
it backwards compatible :)


But, if people want to code to php5 standards and beyond, then I would recommend always using the __construct() method to construct your class. Then make it work in php4. Not the other way around.
--- End Message ---
--- Begin Message ---
On Tue, 2008-07-29 at 22:26 -0700, Jim Lucas wrote:
> Chris wrote:
> >> Don't forget that in PHP5, the constructor named has changed.  In PHP4
> >> it called a method with the same name as the class.  But, in PHP5, it
> >> looks for __construct() instead.
> > 
> > If __construct doesn't exist then it falls back to the php4 way - makes
> > it backwards compatible :)
> > 
> 
> But, if people want to code to php5 standards and beyond, then I would 
> recommend always using the __construct() method to construct your class. 
>   Then make it work in php4.  Not the other way around.

It's unfortunate that PHP5 decided to throw a Strict Standards exception
when you include both style constructors. For instance, I'm certain at
one point the following was recommended:

<?php
class Foo
{
    function __construct()
    {
    }

    function Foo()
    {
        self::__construct();
    }
}
?>

This was perfectly compatible with PHP5 and gave precedence to the PHP5
constructor style. Somewhere along the line though PHP5 started
spouting:

    Strict Standards: Redefining already defined constructor

So I just completely removed the PHP5 style constructors from my code
and use the PHP4 style since then there are no exceptions. Mark my words
though... at some point PHP will start spewing an E_DEPRECATED for PHP4
style constructor *lol*.

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


--- End Message ---
--- Begin Message ---
On Wednesday 30 July 2008 12:44:46 am Robert Cummings wrote:

> It's unfortunate that PHP5 decided to throw a Strict Standards exception
> when you include both style constructors. For instance, I'm certain at
> one point the following was recommended:
>
> <?php
> class Foo
> {
>     function __construct()
>     {
>     }
>
>     function Foo()
>     {
>         self::__construct();
>     }
> }
> ?>
>
> This was perfectly compatible with PHP5 and gave precedence to the PHP5
> constructor style. Somewhere along the line though PHP5 started
> spouting:
>
>     Strict Standards: Redefining already defined constructor
>
> So I just completely removed the PHP5 style constructors from my code
> and use the PHP4 style since then there are no exceptions. Mark my words
> though... at some point PHP will start spewing an E_DEPRECATED for PHP4
> style constructor *lol*.
>
> Cheers,
> Rob.

Well, since PHP 4 has been officially retired as of the start of this year and 
the final-forever release of PHP 4 (4.4.9) is due by 08/08/08, I don't think 
that's much of an issue.  If you're still coding to PHP 4, you're pretty much 
on your own and need to move into this century.

Especially given the different way objects are handled between PHP 4 and PHP 
5, trying to support a dead version of PHP is simply not worth the effort.  
Go PHP 5 and don't look back.  (And if you're on a web host that is still on 
PHP 4, I recommend you switch to a web host that is not doomed to go out of 
business within the next year, because I predict it will.)

-- 
Larry Garfield
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
On Wed, 2008-07-30 at 01:16 -0500, Larry Garfield wrote:
> On Wednesday 30 July 2008 12:44:46 am Robert Cummings wrote:
> 
> > It's unfortunate that PHP5 decided to throw a Strict Standards exception
> > when you include both style constructors. For instance, I'm certain at
> > one point the following was recommended:
> >
> > <?php
> > class Foo
> > {
> >     function __construct()
> >     {
> >     }
> >
> >     function Foo()
> >     {
> >         self::__construct();
> >     }
> > }
> > ?>
> >
> > This was perfectly compatible with PHP5 and gave precedence to the PHP5
> > constructor style. Somewhere along the line though PHP5 started
> > spouting:
> >
> >     Strict Standards: Redefining already defined constructor
> >
> > So I just completely removed the PHP5 style constructors from my code
> > and use the PHP4 style since then there are no exceptions. Mark my words
> > though... at some point PHP will start spewing an E_DEPRECATED for PHP4
> > style constructor *lol*.
> >
> > Cheers,
> > Rob.
> 
> Well, since PHP 4 has been officially retired as of the start of this year 
> and 
> the final-forever release of PHP 4 (4.4.9) is due by 08/08/08, I don't think 
> that's much of an issue.  If you're still coding to PHP 4, you're pretty much 
> on your own and need to move into this century.
> 
> Especially given the different way objects are handled between PHP 4 and PHP 
> 5, trying to support a dead version of PHP is simply not worth the effort.  
> Go PHP 5 and don't look back.  (And if you're on a web host that is still on 
> PHP 4, I recommend you switch to a web host that is not doomed to go out of 
> business within the next year, because I predict it will.)

My code works fine in PHP5, it has worked fine since before PHP5
launched an official version. That said, I do still code to PHP4
compatibility... and I am certainly NOT alone. Also, for what it's
worth, at one point in "this century" PHP4 was the only option since
PHP5 was released mid 2004, therefore there is nothing about this
century that makes it the exclusive territory of PHP5. Moving along
though, it's also worth noting, that web hosts worth their salt, provide
access to both PHP4 AND PHP5 thus allowing the use of whichever version
their customers damn well please. And I will bet you a hundred bucks
there will still be PHP4 hosts in existence in another year.

http://www.nexen.net/images/stories/phpversion/200804/evolution.milieu.en.png

In April (yes I know it's now July) PHP4 was still kicking PHP5's ass.
Not bad for a dead version.

And before anyone gets their panties in a bunch, I'm not advocating
picking up and starting to work with PHP4. But I'm certainly not so full
of hubris to think just because someone said jump (or GOPHP5 if you
will) that every Bill, Bob, and Betty on the Intertubes is going to
switch from PHP4 to PHP5. There's a very real cost to switching, and if
it isn't necessary then (speaking frankly) fuckit!

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


--- End Message ---
--- Begin Message ---
>> I've done something very similar. I have a delivery timestamp column
>> in the table that is initially NULL, and I set it to UTC_TIMESTAMP()
>> for each row as I send the message. My query looks like this then:
>>
>> SELECT * FROM mail_queue WHERE delivery_timestamp IS NULL LIMIT 100.
>>
>> Andrew
>>
>>   
> Then what do you do to get the next 100 emails without sending the same
> ones

Re-read the reply.

After each email is sent, the timestamp is set.

The original query looks for timestamp fields that are not set.

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

--- End Message ---
--- Begin Message ---
Hi,

There are many sites explaining how to build new site etc but I'd like to hear what You suggest. (about how to plan whole thing and how to write separate parts which can be put together later)

I have build many small sites for myself(site to organise class assembly which is like yearly convention..it has user administration etc) but they all are anything else than OOP. But now, I need to help with creating one bigger site which should be OOP. That site should include user management(each user has it's own profile), each user can post job and other adds in different categories. (there will be many categories for example 'work,cars,training,apartments'.)
And users profile should show ads posted by himself.
Logic itself is simple:
1) unregistered user:
a) I go to site, I see categories (work offers, apartment offers, training offers, etc)
        b) I click on category I'm interested in
        c) I see ad that I'm interested in
        d) I click on it
        c) I see detailed information about it(which company posted it etc)
        d) at bottom page I see form where I can contact with ad author
2) registered user
        a) I go to site
        b) I log in, my profile page opens
c) there I can see ads posted by me..also I can see how many times ad is viewed etc
        d) i click on link 'Post new ad'
e) there i choose category and probably Ajax helps to load specific fields(for example if I choose 'Cars' as category, then fields like 'year,transmission,color, etc' will appear.

That is short summary what that site should do. It seems quite big for me so I'd be happy to hear any guidelines from people who have built big sites.

Creating forms, posting data, user login etc, these things are not problem... problem is: how to build the whole thing aimed to OOP and use with Smarty to keep things organized.

I'm not sure but I have idea about what things I should do first:

1) think and write down any function that needs to be done(for example different validations, functions for showing/posting form etc)
2) plan and create database?
3) create database class which handles database connection
But what next? Or am I starting all wrong?

Big thanks in advance,


Raido



--- End Message ---
--- Begin Message ---

On Jul 30, 2008, at 10:34 AM, Raido wrote:
[snip lots of info]
I'm not sure but I have idea about what things I should do first:

1) think and write down any function that needs to be done(for example different validations, functions for showing/posting form etc)
2) plan and create database?
3) create database class which handles database connection
But what next? Or am I starting all wrong?

Big thanks in advance,


Hi Raido,

To me it looks like you have a great start. I usually jsut jump in and start coding without too much planning. It may seem a little disorganized, but I don't believe I can come up with all the functions and all the variables for those functions before I start writing it and I see how things are heading.

Some stuff yes, like if you're going to connect to a database, that can be done ahead. But if you are searching, how will you search when you don't know what all the possible fields are that you want to search by?

As far as the list you have, use it as a road map but don't be afraid to take detours on it. Nothing on the internet is set in stone :) Add, Remove, Modify... And always push your understanding into new heights because that is what will make you an excellent Web Developer instead of a decent web programmer...

(That coffee this morning really made me positive! I may need to do that every morning... :P

--

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





--- End Message ---
--- Begin Message ---
2008/7/30 Raido <[EMAIL PROTECTED]>:
> Hi,
>
> There are many sites explaining how to build new site etc but I'd like to
> hear what You suggest. (about how to plan whole thing and how to write
> separate parts which can be put together later)

This may be of some help:

http://www.phpguru.org/static/ApplicationStructure.html

On the other hand, it may not.

-- 
Richard Heyes
http://www.phpguru.org

--- End Message ---
--- Begin Message ---
Hi,

Even if it's just a site don't thing u don't need a structure to it. Why not
a MVC structure? U can dig about cakephp on google to see some of it
working. If U don't want to use a framework, start with the business rules
u'll need, after that do the CRUD and for the piece of resistance assemble
the html for it. :)



On Wed, Jul 30, 2008 at 3:34 PM, Raido <[EMAIL PROTECTED]> wrote:

> Hi,
>
> There are many sites explaining how to build new site etc but I'd like to
> hear what You suggest. (about how to plan whole thing and how to write
> separate parts which can be put together later)
>
> I have build many small sites for myself(site to organise class assembly
> which is like yearly convention..it has user administration etc) but they
> all are anything else than OOP. But now, I need to help with creating one
> bigger site which should be OOP. That site should include user
> management(each user has it's own profile), each user can post job and other
> adds in different categories. (there will be many categories for example
> 'work,cars,training,apartments'.)
> And users profile should show ads posted by himself.
> Logic itself is simple:
> 1) unregistered user:
>        a) I go to site, I see categories (work offers, apartment offers,
> training offers, etc)
>        b) I click on category I'm interested in
>        c) I see ad that I'm interested in
>        d) I click on it
>        c) I see detailed information about it(which company posted it etc)
>        d) at bottom page I see form where I can contact with ad author
> 2) registered user
>        a) I go to site
>        b) I log in, my profile page opens
>        c) there I can see ads posted by me..also I can see how many times
> ad is viewed etc
>        d) i click on link 'Post new ad'
>        e) there i choose category and probably Ajax helps to load specific
> fields(for example if I choose 'Cars' as category, then fields like
>  'year,transmission,color, etc' will appear.
>
> That is short summary what that site should do. It seems quite big for me
> so I'd be happy to hear any guidelines from people who have built big sites.
>
> Creating forms, posting data, user login etc, these things are not
> problem... problem is: how to build the whole thing aimed to OOP and use
> with Smarty to keep things organized.
>
> I'm not sure but I have idea about what things I should do first:
>
> 1) think and write down any function that needs to be done(for example
> different validations, functions for showing/posting form etc)
> 2) plan and create database?
> 3) create database class which handles database connection
> But what next? Or am I starting all wrong?
>
> Big thanks in advance,
>
>
> Raido
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---

Reply via email to