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

2008-07-30 Thread php-general-digest-help
php-general Digest 30 Jul 2008 14:48:31 - 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

Re: [PHP] PHP4 vs PHP5 classes

2008-07-30 Thread Larry Garfield
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()

Re: [PHP] PHP4 vs PHP5 classes

2008-07-30 Thread Robert Cummings
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Richard Heyes
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Per Jessen
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Richard Heyes
The technical abilities and awareness is often inversely proportional to the size of the hoster. Lol. -- Richard Heyes http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why PHP4?

2008-07-30 Thread Hélio Rocha
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'

Re: [PHP] Why PHP4?

2008-07-30 Thread Thijs Lensselink
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Richard Heyes
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Hélio Rocha
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Per Jessen
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Per Jessen
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

[PHP] Creating new site

2008-07-30 Thread Raido
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Richard Heyes
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Lester Caine
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Per Jessen
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Per Jessen
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

Re: [PHP] Creating new site

2008-07-30 Thread Jason Pruim
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?

Re: [PHP] Creating new site

2008-07-30 Thread Richard Heyes
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:

Re: [PHP] Creating new site

2008-07-30 Thread Hélio Rocha
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Lester Caine
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Micah Gersten
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

Re: [PHP] Why PHP4?

2008-07-30 Thread Micah Gersten
Sometimes speed improvements require removing things. If you end up backwards supporting everything you end up with a big monster engine that is incredibly slow. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Hélio Rocha wrote: Brainfuck rox! LOL :)

Re: [PHP] Creating new site

2008-07-30 Thread Micah Gersten
Depending on the size of the site, you might want to consider a PHP framework to start with. There's usually no point in reinventing the wheel. Someone mentioned CakePHP which utilizes MVC. I'm looking into porting my stuff to the Zend Framework which makes MVC optional, but has a lot of

Re: [PHP] Why PHP4?

2008-07-30 Thread Sancar Saran
Because, People believes Do not fix until broke Motto. Testing new online application may painfull. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why PHP4?

2008-07-30 Thread Jim Lucas
Per Jessen wrote: 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

Re: [PHP] Creating new site

2008-07-30 Thread Shawn McKenzie
Micah Gersten wrote: Depending on the size of the site, you might want to consider a PHP framework to start with. There's usually no point in reinventing the wheel. Someone mentioned CakePHP which utilizes MVC. I'm looking into porting my stuff to the Zend Framework which makes MVC optional,

Re: [PHP] Creating new site

2008-07-30 Thread Hélio Rocha
U may want to see Ruby On Rails www.rubyonrails.org . It's also a framework but for Ruby. In my opinion it's stronger than cake and there are some IDE's that do support and debug it. Cumps, Hélio Rocha On Wed, Jul 30, 2008 at 4:54 PM, Shawn McKenzie [EMAIL PROTECTED]wrote: Micah Gersten wrote:

Re: [PHP] Creating new site

2008-07-30 Thread Robert Cummings
On Wed, 2008-07-30 at 17:03 +0100, Hélio Rocha wrote: U may want to see Ruby On Rails www.rubyonrails.org . It's also a framework but for Ruby. In my opinion it's stronger than cake and there are some IDE's that do support and debug it. Dear Hélio, This is a PHP list. People usually come

Re: [PHP] Creating new site

2008-07-30 Thread Hélio Rocha
Sorry Robert and all other users. On Wed, Jul 30, 2008 at 5:07 PM, Robert Cummings [EMAIL PROTECTED]wrote: On Wed, 2008-07-30 at 17:03 +0100, Hélio Rocha wrote: U may want to see Ruby On Rails www.rubyonrails.org . It's also a framework but for Ruby. In my opinion it's stronger than cake

[PHP] Windows date(Y/m/d H:i:s) performance

2008-07-30 Thread Richard Lynch
I was profiling some code on my local dev box, and in Windows, the biggest time sink for the home page is... a call to date(Y/m/d H:i:s)?! 917 ms??? Here is what I get in a cygwin shell: php -r '$c = 100; $s = microtime(true); for($i = 0; $i $c; $i++){ $d = date(Y/m/d H:i:s); } echo

Re: [PHP] Why PHP4?

2008-07-30 Thread Jason Pruim
On Jul 30, 2008, at 10:50 AM, Micah Gersten wrote: Sometimes speed improvements require removing things. If you end up backwards supporting everything you end up with a big monster engine that is incredibly slow. Just ask Microsoft about that ;) -- Jason Pruim Raoset Inc. Technology

[PHP] Re: Windows date(Y/m/d H:i:s) performance

2008-07-30 Thread Richard Lynch
I suppose to be complete, I should point out that in Linux a call to date finishes in 1.2271404266357E-5 seconds on average. For those unfamiliar with scientific notation, that would be: 0.12271404266357 seconds, or rougly 1/10,000th of the time Doze takes. -- Some people ask for gifts

Re: [PHP] Windows date(Y/m/d H:i:s) performance

2008-07-30 Thread Andrew Ballard
On Wed, Jul 30, 2008 at 12:11 PM, Richard Lynch [EMAIL PROTECTED] wrote: I was profiling some code on my local dev box, and in Windows, the biggest time sink for the home page is... a call to date(Y/m/d H:i:s)?! 917 ms??? Here is what I get in a cygwin shell: php -r '$c = 100; $s =

Re: [PHP] Why PHP4?

2008-07-30 Thread Per Jessen
Jason Pruim wrote: On Jul 30, 2008, at 10:50 AM, Micah Gersten wrote: Sometimes speed improvements require removing things. If you end up backwards supporting everything you end up with a big monster engine that is incredibly slow. Just ask Microsoft about that ;) Better ask IBM

Re: [PHP] Re: Windows date(Y/m/d H:i:s) performance

2008-07-30 Thread Andrew Ballard
On Wed, Jul 30, 2008 at 12:19 PM, Richard Lynch [EMAIL PROTECTED] wrote: I suppose to be complete, I should point out that in Linux a call to date finishes in 1.2271404266357E-5 seconds on average. For those unfamiliar with scientific notation, that would be: 0.12271404266357 seconds, or

[PHP] Still zend_mm_heap corrupted error in PHP 5.2.6

2008-07-30 Thread santi
Dear Srs, We are having some zend_mm_heap corrupted errors followed by a Segmentation fault (11) in our Apache2 + PHP 5.2.6 servers. There are few information about this bug in internet: * #40479 - http://bugs.php.net/bug.php?id=40479 * #43295 - http://bugs.php.net/bug.php?id=43295 I have

Re: [PHP] Creating new site

2008-07-30 Thread Shawn McKenzie
Hélio Rocha wrote: U may want to see Ruby On Rails www.rubyonrails.org . It's also a framework but for Ruby. In my opinion it's stronger than cake and there are some IDE's that do support and debug it. Cumps, Hélio Rocha There's also .NET http://www.microsoft.com. It's also a framework but

[PHP] Php Help

2008-07-30 Thread birdloww.ctr
I cannot get Php to run on Solaris 10... Here is the error I am getting Trying to run php outside of apache ld.so.1: php: fatal: libldap-2.3.so.0: open failed: No such file or directory With ApacheApache will not load when

[PHP] Re: Php Help

2008-07-30 Thread Shawn McKenzie
[EMAIL PROTECTED] wrote: I cannot get Php to run on Solaris 10... Here is the error I am getting Trying to run php outside of apache ld.so.1: php: fatal: libldap-2.3.so.0: open failed: No such file or directory With

[PHP] accessing variables within objects

2008-07-30 Thread Marten Lehmann
Hello, I'm using some php-classes which worked fine with php-5.0.4. Now I tried to upgrade to php-5.2.6, but the classes give a lot of errors. If I set error_reporting(E_ALL); I see messages like Notice: Undefined property: FastTemplate::$main in /whereever/inc.template.php on line 293

Re: [PHP] accessing variables within objects

2008-07-30 Thread Jim Lucas
Marten Lehmann wrote: Hello, I'm using some php-classes which worked fine with php-5.0.4. Now I tried to upgrade to php-5.2.6, but the classes give a lot of errors. If I set error_reporting(E_ALL); I see messages like Notice: Undefined property: FastTemplate::$main in

Re: [PHP] accessing variables within objects

2008-07-30 Thread Micah Gersten
You might want to check the scope of the properties. If you want to access them outside of the class, make sure they are declared public. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Marten Lehmann wrote: Hello, I'm using some php-classes which worked

Re: [PHP] Php CLI Parser not working

2008-07-30 Thread JJB
Daniel Brown wrote: On Tue, Jul 29, 2008 at 2:19 PM, JJB [EMAIL PROTECTED] wrote: We recently rebuilt a webserver and upgraded it to opensuse 10.3. Now, when our webdev people run command line php scripts all of the included files are being output to the terminal instead of parsed.

Re: [PHP] Php CLI Parser not working

2008-07-30 Thread Daniel Brown
On Wed, Jul 30, 2008 at 4:53 PM, JJB [EMAIL PROTECTED] wrote: Hi Daniel, We are running like: php mailscript.php The version: php-v PHP 5.2.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Dec 12 2007 03:51:56) Did you check what Jim suggested, as well, about short_open_tags? If your

Re: [PHP] Why PHP4?

2008-07-30 Thread Kevin Waterson
This one time, at band camp, Richard Heyes [EMAIL PROTECTED] wrote: I'm interested - why are people still using PHP4? It's been over 4 years (I think) - plenty of time to upgrade to five. I asked that question and was called a troll... Kevin -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Web2.0 style tags - where to start?

2008-07-30 Thread Kevin Waterson
This one time, at band camp, Paul Jinks [EMAIL PROTECTED] wrote: Does anyone know of any good resources on building a tagging system? The video for now will be held on a normal LAMP machine as will everything else. Tagging... http://phpro.org/tutorials/Tagging-With-PHP-And-MySQL.html Kevin

[PHP] Not able to load the extensions

2008-07-30 Thread John Meyer
Apache 2.2 PHP 5.2.6 (as a module) Windows Relevant parts of php.ini ; Directory in which the loadable extensions (modules) reside. extension_dir = I:\php\ext extension=I:\php\ext\php_mssql.dll extension=I:\php\ext\php_mysql.dll Note: I did try it with just the name (php_mysql.dll) but it

[PHP] Back to Basics - Why Use Single Quotes?

2008-07-30 Thread Stephen
I have traditionally used double quotes going back to my PASCAL days. I see many PHP examples using single quotes, and I began to adopt that convention. Even updating existing code. And I broke some stuff that was doing variable expansion. So I am back to using double quotes. But I

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-07-30 Thread mike
On 7/30/08, Stephen [EMAIL PROTECTED] wrote: But I wonder, is there any reason to use single quotes? extremely minor performance gains, afaik. probably moreso when doing $foo[bar] and $foo['bar'] but i believe it's negligible $foo = 'bar' and $foo = bar sara golemon did some performance

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-07-30 Thread Daniel Brown
On Wed, Jul 30, 2008 at 6:51 PM, Stephen [EMAIL PROTECTED] wrote: I have traditionally used double quotes going back to my PASCAL days. I see many PHP examples using single quotes, and I began to adopt that convention. Even updating existing code. And I broke some stuff that was doing

Re: [PHP] Why PHP4?

2008-07-30 Thread Chris
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.

Re: [PHP] Not able to load the extensions

2008-07-30 Thread Jim Lucas
John Meyer wrote: Apache 2.2 PHP 5.2.6 (as a module) Windows Relevant parts of php.ini ; Directory in which the loadable extensions (modules) reside. extension_dir = I:\php\ext extension=I:\php\ext\php_mssql.dll extension=I:\php\ext\php_mysql.dll Note: I did try it with just the name

[PHP] Get Remote-Image

2008-07-30 Thread Konrad Priemer
Moin, kann mir mal wer auf die Sprünge helfen, ich bekomme es gerade nicht geregelt ein Image on-the-fly von einem Remote-Host per fsockopen auf meinen Server zu ziehen. Irgendwo hab ich da voll die Blockade ;) Mein nichtfunktionierender Versuch: ... ... $out = GET

[PHP] Best store for mans

2008-07-30 Thread php-general
Dont leave your nights dissatisfied http://uimeds.com/

[PHP] Using $_GET for POST

2008-07-30 Thread Edward Diener
In handling an HTTP POST request I came across some PHP code, which I need to modify for my own purposes, which has code like this: if ( ! (isset($_GET['x']) $_GET['x'] == 20) ) { // Do something by returning an error } Can this ever be correct when the form looks like:

Re: [PHP] Using $_GET for POST

2008-07-30 Thread Micah Gersten
This page can help you understand them better: http://us2.php.net/manual/en/language.variables.superglobals.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Edward Diener wrote: In handling an HTTP POST request I came across some PHP code, which I need

Re: [PHP] Using $_GET for POST

2008-07-30 Thread Robert Cummings
On Wed, 2008-07-30 at 22:18 -0400, Edward Diener wrote: In handling an HTTP POST request I came across some PHP code, which I need to modify for my own purposes, which has code like this: if ( ! (isset($_GET['x']) $_GET['x'] == 20) ) { // Do something by returning an

Re: [PHP] Get Remote-Image

2008-07-30 Thread Daniel Brown
On Wed, Jul 30, 2008 at 9:50 PM, Konrad Priemer [EMAIL PROTECTED] wrote: kann mir mal wer auf die Sprünge helfen, ich bekomme es gerade nicht geregelt ein Image on-the-fly von einem Remote-Host per fsockopen auf meinen Server zu ziehen. Irgendwo hab ich da voll die Blockade ;) Die

Re: [PHP] Web2.0 style tags - where to start?

2008-07-30 Thread Nitsan Bin-Nun
From my experience with Codeigniter, thats one of the best php frameworks I have ever seen. It functionality is awesome, you can integrate your own modifications to the IC core without any problems at all, for more confortable you even don't have to use a template system (but I'm pretty sure that

Re: [PHP] Using $_GET for POST

2008-07-30 Thread Nitsan Bin-Nun
Umm I suggest you try this code: index.php: ?php $formContainer = EOF form ACTION=index.php?this=isawsome=dontyou=think METHOD=POST input type='text' name='check' value='' /br / input VALUE=submit name='submitted' TYPE=submit/form EOF; if (!isset($_POST['submitted']))

Re: [PHP] Using $_GET for POST

2008-07-30 Thread Robert Cummings
On Thu, 2008-07-31 at 06:41 +0200, Nitsan Bin-Nun wrote: Umm I suggest you try this code: index.php: ?php $formContainer = EOF form ACTION=index.php?this=isawsome=dontyou=think METHOD=POST Those ampersands should be appropriately marked up. :B Cheers, Rob. --

Re: [PHP] Web2.0 style tags - where to start?

2008-07-30 Thread Jason Norwood-Young
On Thu, 2008-07-31 at 06:28 +0200, Nitsan Bin-Nun wrote: From my experience with Codeigniter, thats one of the best php frameworks I have ever seen. It functionality is awesome, you can integrate your own modifications to the IC core without any problems at all, for more confortable you even