RE: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Nauman Akbar
Hello! Let us consider my scenario. I am developing a XML based web service. Using pre PHP 5 features, I am stuck with DOM, SOAP or plain old XML parser. Too cumbersome - eh. I specifically upgraded my server to PHP 5 to make use of SimpleXML. I am sure there are many other packages that are

Re: [PHP] Re: Are PHP5 features worth it?

2006-12-20 Thread Tony Marston
Larry Garfield [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tuesday 19 December 2006 19:24, Tony Marston wrote: I have written a large application which uses the OO features of PHP 4, and the same code runs untouched with PHP 5. There is no advantage in making use of some

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Jochem Maas
Nauman Akbar wrote: Hello! Let us consider my scenario. I am developing a XML based web service. Using pre PHP 5 features, I am stuck with DOM, SOAP or plain old XML parser. Too the DOM extension is php5 only! it replaces DOMXML. again the SOAP extension (very nice it is too) is php5 only.

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-19 19:05:23 +0100: I'm writing a PHP program and I've got a number of concerns. The program is about 20 KLOC at the moment, but will probably grow quite a lot. I'm using OOP throughout, and I don't really have a lot of problems with what PHP4 can do with OOP.

Re: [PHP] Video question

2006-12-20 Thread Philipp Schwarz
You can put the video into a flash file and start playing the video with Javascript. If someone downloads the video, he will see a blank page, because of the missing start command from Javascript. Problem: If someone downloads the compleate page, he can watch the video. You can solve this by

Re: [PHP] Payflow and Php5 on FreeBSD

2006-12-20 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-19 18:33:07 -0500: I'm trying to get payflow working with php5 as a loadable extension. My configure line has: '--with-pfpro=shared,/usr/local' and php5 installed fine via FreeBSD ports. I then installed Payflow pro also via FreeBSd ports. I'm getting an

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Jochem Maas
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-12-19 19:05:23 +0100: ... ... What major compelling reasons do I have to start using exceptions and OOP-5? All the things you mentioned, and then some. Someone else mentioned that PHP 5 is much less inclined to copy objects. it's not

Re: [PHP] Database Question

2006-12-20 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-20 00:01:29 -0700: I'm starting to log weather data to a database and I'm trying to figure out what's the best way to create the tables. The reports are coming in every minute, of every hour, 24 hours a day. Eventually, I'd like to do some calculations on

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Robert Cummings
On Wed, 2006-12-20 at 11:49 +0100, Jochem Maas wrote: How about iterators? You can have objects that look like arrays yet they take much less memory: $rs = $db-query($select); # query the db foreach ($rs as $row) { # fetch the row whatever($row); } ah yes

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-20 11:49:25 +0100: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-12-19 19:05:23 +0100: What major compelling reasons do I have to start using exceptions and OOP-5? All the things you mentioned, and then some. Someone else mentioned that PHP 5 is

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Jochem Maas
Robert Cummings wrote: On Wed, 2006-12-20 at 11:49 +0100, Jochem Maas wrote: How about iterators? You can have objects that look like arrays yet they take much less memory: $rs = $db-query($select); # query the db foreach ($rs as $row) { # fetch the row whatever($row);

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Robert Cummings
On Wed, 2006-12-20 at 12:27 +0100, Jochem Maas wrote: Robert Cummings wrote: On Wed, 2006-12-20 at 11:49 +0100, Jochem Maas wrote: How about iterators? You can have objects that look like arrays yet they take much less memory: $rs = $db-query($select); # query the db

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-20 06:05:29 -0500: On Wed, 2006-12-20 at 11:49 +0100, Jochem Maas wrote: How about iterators? You can have objects that look like arrays yet they take much less memory: $rs = $db-query($select); # query the db foreach ($rs as $row) { #

[PHP] ob_start(ob_gzhandler) and error handling functions

2006-12-20 Thread IG
Hi, I include a php file at the beginning of every web page in this site. This include file has an error handling function and starts output buffering... // Start of Error Handler error_reporting(E_ALL ^ E_NOTICE); ini_set('log_errors','1'); function

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Bernhard Zwischenbrugger
All the XML things are new Start with DOM. If you know DOM in Browser you can use DOM in PHP5. AJAX Webapplications are not possible in PHP4. The experimental DOMXML in PHP4 is NOT standard conform and has DIFFERENT syntax than DOM in Javascript. To retrive data from AJAX is simple.

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Robert Cummings
On Wed, 2006-12-20 at 15:14 +0100, Bernhard Zwischenbrugger wrote: AJAX Webapplications are not possible in PHP4. Bullshit. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com |

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Stut
Robert Cummings wrote: On Wed, 2006-12-20 at 15:14 +0100, Bernhard Zwischenbrugger wrote: AJAX Webapplications are not possible in PHP4. Bullshit. Indeed, what with PHP being server-side and AJAX being client-side. Where AJAX is concerned the server-side technology is irrelevant. -Stut

RE: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Ray Hauge
PHP 5.2 supports JSON internally now, so you don't have to use XML. There's pros and cons associated with JSON, but that was possible with PHP4 as well. -- Ray Hauge Application Development Lead American Student Loan Services www.americanstudentloan.com -Original Message- From: Stut

[PHP] A little code snippet I wanted to share

2006-12-20 Thread Jay Blanchard
if(('12/24' $myDate) ('12/26' $myDate) (TRUE == $belief)){ echo Merry Christmas!\n; } elseif(TRUE == $variationOnATheme){ echo Happy Holidays!\n; } elseif(TRUE == $liberal) { echo Joyous ChrisMaHanuKwanzica!\n; } else { echo Bah Humbug!\n; } I probably could have used a switch

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Jochem Maas
Stut wrote: Robert Cummings wrote: On Wed, 2006-12-20 at 15:14 +0100, Bernhard Zwischenbrugger wrote: AJAX Webapplications are not possible in PHP4. Bullshit. Indeed, what with PHP being server-side and AJAX being client-side. Where AJAX is concerned the server-side technology is

[PHP] get id field in table

2006-12-20 Thread Gonzalo Gorosito
Hello! How can I identify the field ID in some table (MySQL)? Regards -- Gonzalo Gorosito Sistemas | By-Cycle Humboldt 2495, Piso 10 C1425FUG - Bs.As. Argentina Tel.: + 54 (11) 4774 6006 | Fax: + 54 (11) 4774 7117

Re: [PHP] Database Question

2006-12-20 Thread tg-php
So you have two single table votes.. make this a third. I'm guessing that each time you collect data, it's going to be one of each piece of data every time. Temperature, barametric pressure, humidity, wind direction, etc. You're not going to have 5 things all the time and like 3 other

[PHP] Trying to insert a large number from php to mysql

2006-12-20 Thread WeberSites LTD
Hi I'm trying to insert the number 1970324970930197 into a mysql BigInt(20) field. If I do a direct insert from mysql command prompt and select the record I get back the same number. If I do this from PHP I get back 197032497093. Notice that the 197 at the end is not 000. When echoing

Re: [PHP] Trying to insert a large number from php to mysql

2006-12-20 Thread Jon Anderson
WeberSites LTD wrote: I'm trying to insert the number 1970324970930197 into a mysql BigInt(20) field. If I do a direct insert from mysql command prompt and select the record I get back the same number. If I do this from PHP I get back 197032497093. Notice that the 197 at the end is not

Re: [PHP] get id field in table

2006-12-20 Thread Jochem Maas
Gonzalo Gorosito wrote: Hello! How can I identify the field ID in some table (MySQL)? the answer is probably the opposite of the answer to the following question: is this a mysql mailing list? Regards --

Re: [PHP] Trying to insert a large number from php to mysql

2006-12-20 Thread Robert Cummings
On Wed, 2006-12-20 at 10:58 -0500, Jon Anderson wrote: WeberSites LTD wrote: I'm trying to insert the number 1970324970930197 into a mysql BigInt(20) field. If I do a direct insert from mysql command prompt and select the record I get back the same number. If I do this from PHP I

RE: [PHP] Trying to insert a large number from php to mysql

2006-12-20 Thread WeberSites LTD
Thanks What I'm doing now to work around is using number_format() and str_replace() to remove the ,. This give me the string and mysql uses it correctly. -Original Message- From: Jon Anderson [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 5:59 PM To: WeberSites LTD Cc:

Re: [PHP] get id field in table

2006-12-20 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-20 16:58:43 +0100: Gonzalo Gorosito wrote: Hello! How can I identify the field ID in some table (MySQL)? the answer is probably the opposite of the answer to the following question: is this a mysql mailing list? Questions beginning with How

Re: [PHP] get id field in table

2006-12-20 Thread Jochem Maas
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-12-20 16:58:43 +0100: Gonzalo Gorosito wrote: Hello! How can I identify the field ID in some table (MySQL)? the answer is probably the opposite of the answer to the following question: is this a mysql mailing list? Questions

[PHP] use_trans_id doesn't add PHPSESSID to url string

2006-12-20 Thread blackwater dev
I have session.user_trans_id set to 1 in my php.ini file yet when I see links, the PHPSESSID isn't automatically added. I have another site where this is done by php but on another box it isn't. The broken box uses 4.3.11with the following ini settings. What am I missing? Thanks!

RE: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Bernhard Zwischenbrugger
Is there a way to parse XML in PHP4? The X in ajax means XML. If I send XML from Browser to PHP the XML must be parsed. In PHP4 there are expat functions and the experimental DOMXML functions. Both are not included in default installations. XML Support in PHP5 is realy good - in PHP4 nearly not

RE: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Robert Cummings
On Wed, 2006-12-20 at 17:38 +0100, Bernhard Zwischenbrugger wrote: Is there a way to parse XML in PHP4? Yes. And even if there weren't any libs, there's nothing stopping anyone from writing a parser in PHP itself! Cheers, Rob. -- .. |

RE: [PHP] get id field in table

2006-12-20 Thread bruce
gonzalo... i didn't see your original post... but this might help... assuming some things... not actual code, but you might get the idea. assume your tbl looks something like mysql db/tbls: table foo dog -int cat -varchar(10) etc... id -auto generated you can set up the mysql db/tbl to

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Jochem Maas
Robert Cummings wrote: On Wed, 2006-12-20 at 17:38 +0100, Bernhard Zwischenbrugger wrote: Is there a way to parse XML in PHP4? Yes. And even if there weren't any libs, there's nothing stopping anyone from writing a parser in PHP itself! ai, and in most cases a regexp will cut it, gotta love

RE: [PHP] Are PHP5 features worth it?

2006-12-20 Thread Ray Hauge
I think all this talk goes to show you that the differences between PHP4 and PHP5 are somewhat personal at this point in the game. Some people like the better OOP features of PHP5, some people think PHP5 is faster, some people like the XML/WebServices in PHP5 better, and many others (don't forget

[PHP] SoapServer and Violation of encoding rules

2006-12-20 Thread Ville Mattila
Hello readers, I am consuming a web service created with PHP from .NET application. I have defined a custom datatype in my WSDL document: types xmlns=http://schemas.xmlsoap.org/wsdl/; schema targetNamespace=urn:testService xmlns=http://www.w3.org/2001/XMLSchema; complexType

Re: [PHP] [an attempt to inject a bit of humor back into the situation] Re: [PHP] Recomended host

2006-12-20 Thread Børge Holen
On Tuesday 19 December 2006 21:52, Jochem Maas wrote: tedd wrote: At 3:50 PM -0500 12/18/06, [EMAIL PROTECTED] wrote: I'm going to be controversial here and take issue with both of you. 2. Pointing out someone's signature as being off topic is even further off topic for this list.

[PHP] Do Sockets Cache?

2006-12-20 Thread Aras
Hello :) Wonder someone can save some of my hair here. I have a daemon application listening as root on my linux server that i have written in PHP. I use it to communicate web user with the backend linux to make certain operations from web interface. I have a login/verify command that i send to

Re: [PHP] [an attempt to inject a bit of humor back into the situation] Re: [PHP] Recomended host

2006-12-20 Thread Jochem Maas
Børge Holen wrote: On Tuesday 19 December 2006 21:52, Jochem Maas wrote: tedd wrote: ... bah, I refuse to be the last BADman on this list before christmas, the last week trip to Prague really helped on the bloody selfesteam. Yeh, so on to the point. Sorry for any bad words to the loving

Re: [PHP] Do Sockets Cache?

2006-12-20 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-20 23:31:56 +0200: I have a daemon application listening as root on my linux server that i have written in PHP. I use it to communicate web user with the backend linux to make certain operations from web interface. I have a login/verify command that i send to

Re: [PHP] Do Sockets Cache?

2006-12-20 Thread Stut
Aras wrote: I have a daemon application listening as root on my linux server that i have written in PHP. I use it to communicate web user with the backend linux to make certain operations from web interface. I have a login/verify command that i send to socket server to log in. I send raw command

[PHP] RE: Are PHP5 features worth it?

2006-12-20 Thread Niels
Hi, On Wednesday 20 December 2006 19:47, Ray Hauge wrote: I think all this talk goes to show you that the differences between PHP4 and PHP5 are somewhat personal at this point in the game. Some people like the better OOP features of PHP5, some people think PHP5 is faster, some people like

Re: [PHP] RE: Are PHP5 features worth it?

2006-12-20 Thread Jochem Maas
Niels wrote: Hi, On Wednesday 20 December 2006 19:47, Ray Hauge wrote: I think all this talk goes to show you that the differences between PHP4 and PHP5 are somewhat personal at this point in the game. Some people like the better OOP features of PHP5, some people think PHP5 is faster,

Re: [PHP] RE: Are PHP5 features worth it?

2006-12-20 Thread Robert Cummings
On Thu, 2006-12-21 at 00:34 +0100, Jochem Maas wrote: I think I'll move to 5.2 within a couple of months and slowly start using some of the new features. if you get stuck you know where to find us :-) Jochem will be at Børge's place hugging and stuff :/ ... ... ... *VOMIT* :B

Re: [PHP] RE: Are PHP5 features worth it?

2006-12-20 Thread Jochem Maas
Robert Cummings wrote: On Thu, 2006-12-21 at 00:34 +0100, Jochem Maas wrote: I think I'll move to 5.2 within a couple of months and slowly start using some of the new features. if you get stuck you know where to find us :-) Jochem will be at Børge's place hugging and stuff :/ ... ...

Re: [PHP] RE: Are PHP5 features worth it?

2006-12-20 Thread Børge Holen
On Thursday 21 December 2006 01:31, Robert Cummings wrote: On Thu, 2006-12-21 at 00:34 +0100, Jochem Maas wrote: I think I'll move to 5.2 within a couple of months and slowly start using some of the new features. if you get stuck you know where to find us :-) Jochem will be at Børge's

Re: [PHP] RE: Are PHP5 features worth it?

2006-12-20 Thread jekillen
On Dec 20, 2006, at 3:14 PM, Niels wrote: Hi, On Wednesday 20 December 2006 19:47, Ray Hauge wrote: I think all this talk goes to show you that the differences between PHP4 and PHP5 are somewhat personal at this point in the game. Some people like the better OOP features of PHP5, some

[PHP] Re: Are PHP5 features worth it?

2006-12-20 Thread Niels
Hi, On Wednesday 20 December 2006 13:37, Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-12-19 19:05:23 +0100: I'm writing a PHP program and I've got a number of concerns. The program is about 20 KLOC at the moment, but will probably grow quite a lot. I'm using OOP throughout, and I

[PHP] Re: Are PHP5 features worth it?

2006-12-20 Thread Niels
Hi, On Wednesday 20 December 2006 02:24, Tony Marston wrote: Niels [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi list, I'm writing a PHP program and I've got a number of concerns. The program is about 20 KLOC at the moment, but will probably grow quite a lot. I'm using

Re: [PHP] Are PHP5 features worth it?

2006-12-20 Thread tedd
At 3:14 PM +0100 12/20/06, Bernhard Zwischenbrugger wrote: AJAX Webapplications are not possible in PHP4. Please be very, very quite, my PHP4 web AJAX Web applications don't know that and I don't want them revolting. tedd -- --- http://sperling.com http://ancientstones.com

Re: [PHP] Database Question

2006-12-20 Thread Sumeet
[EMAIL PROTECTED] wrote: So you have two single table votes.. make this a third. I'm guessing that each time you collect data, it's going to be one of each piece of data every time. As for efficiency, it's probably more efficient to keep everything in one table and do your statistics by

[PHP] Re: Video Question

2006-12-20 Thread Fahad Pervaiz
I think you want to stream video to clients like youtube??? If so there is a solution. 1. Install a streaming server on your webserver 2. Upload your video files and store them out site root directory 3. Use streaming server to output file I have worked on video streaming. I used FLV format,

[PHP] Poping array which has the matching value

2006-12-20 Thread Leo Liu
Hi, I wanted to search through the array and pop out the value which match my search criteria. For example If array has {a,b,c,d,e,f} I wanna search for c and once I found it, took it out from the array. So the result of the array after operation will be {a,b,d,e,f} If I do array_pop();

Re: [PHP] Poping array which has the matching value

2006-12-20 Thread Che Hodgins
Leo, $letters = array('a', 'b', 'c', 'd', 'e', 'f'); $key = array_search('c', $letters); $value = array_splice($letters, $key, 1); $value[0] will contain 'c' $letters will contain Array ( [0] = a [1] = b [2] = d [3] = e [4] = f ) regards, Che On 12/21/06, Leo Liu [EMAIL PROTECTED] wrote: Hi,

Re: [PHP] RE: Are PHP5 features worth it?

2006-12-20 Thread Lester Caine
jekillen wrote: Hey, I'd like to be able to run at least two versions of php on one server and switch between them because if you've written a pile of php 4x code and need to switch to 5x, Is there a real need given the cost of hardware? I run two machines - one with the stable version of