Re: [PHP] try - catch is not so clear to me...

2009-04-14 Thread Bastien Koert
On Mon, Apr 13, 2009 at 11:34 PM, Lamp Lists lamp.li...@yahoo.com wrote: From: Marc Steinert li...@bithub.net To: Lamp Lists lamp.li...@yahoo.com Cc: php-general@lists.php.net Sent: Monday, April 13, 2009 11:27:08 AM Subject: Re: [PHP] try - catch

Re: [PHP] try - catch is not so clear to me...

2009-04-14 Thread Lamp Lists
From: Bastien Koert phps...@gmail.com To: Lamp Lists lamp.li...@yahoo.com Cc: Marc Steinert li...@bithub.net; php-general@lists.php.net Sent: Tuesday, April 14, 2009 8:11:04 AM Subject: Re: [PHP] try - catch is not so clear to me... On Mon, Apr 13, 2009 at 11

Re: [PHP] try - catch is not so clear to me...

2009-04-14 Thread Bastien Koert
[snip] function send_confirmation_email($to, $subject, $body) { $headers =MIME-Versin: 1.0\n . Content-type: text/plain; charset=ISO-8859-1; format=flowed\n . Content-Transfer-Encoding: 8bit\n . Reply-To: Contact

[PHP] try - catch is not so clear to me...

2009-04-13 Thread Lamp Lists
hi to all! actually, the statement in the Subject line is not 100% correct. I understand the purpose and how it works (at least I think I understand :-)) but to me it's so complicated way? let's take a look in example from php.net(http://us3.php.net/try) ?php function inverse($x) { if

Re: [PHP] try - catch is not so clear to me...

2009-04-13 Thread Kyle Smith
Lamp Lists wrote: hi to all! actually, the statement in the Subject line is not 100% correct. I understand the purpose and how it works (at least I think I understand :-)) but to me it's so complicated way? let's take a look in example from php.net(http://us3.php.net/try) ?php function

Re: [PHP] try - catch is not so clear to me...

2009-04-13 Thread Lamp Lists
From: Kyle Smith kyle.sm...@inforonics.com To: Lamp Lists lamp.li...@yahoo.com Cc: php-general@lists.php.net Sent: Monday, April 13, 2009 9:52:36 AM Subject: Re: [PHP] try - catch is not so clear to me... Lamp Lists wrote: hi to all! actually, the statement

Re: [PHP] try - catch is not so clear to me...

2009-04-13 Thread Lamp Lists
From: Lamp Lists lamp.li...@yahoo.com To: php-general@lists.php.net Sent: Monday, April 13, 2009 9:29:16 AM Subject: [PHP] try - catch is not so clear to me... hi to all! actually, the statement in the Subject line is not 100% correct. I understand

Re: [PHP] try - catch is not so clear to me...

2009-04-13 Thread Marc Steinert
Basically try-catch gives you the ability to handle errors outside a class or method scope, by the calling instance. This comes in handy, if you are programming in an object orientated way and thus enables you to seperate error handling from the rest of your functionality. Means, your methods do

RE: [PHP] try - catch is not so clear to me...

2009-04-13 Thread Bob McConnell
From: Marc Steinert Basically try-catch gives you the ability to handle errors outside a class or method scope, by the calling instance. This comes in handy, if you are programming in an object orientated way and thus enables you to seperate error handling from the rest of your

Re: [PHP] try - catch is not so clear to me...

2009-04-13 Thread Lamp Lists
From: Marc Steinert li...@bithub.net To: Lamp Lists lamp.li...@yahoo.com Cc: php-general@lists.php.net Sent: Monday, April 13, 2009 11:27:08 AM Subject: Re: [PHP] try - catch is not so clear to me... Basically try-catch gives you the ability to handle errors

Re: [PHP] Try{} Catch()

2008-01-01 Thread Martin Alterisio
2007/12/31, Richard Lynch [EMAIL PROTECTED]: On Sun, December 23, 2007 3:50 pm, Martin Alterisio wrote: It's not supposed to be practical, it's just a way to handle errors. You shouldn't rely on try/catch for algorithm implementation. You create exceptions for errors and unexpected

Re: [PHP] Try{} Catch()

2007-12-31 Thread Richard Lynch
On Sun, December 23, 2007 3:50 pm, Martin Alterisio wrote: It's not supposed to be practical, it's just a way to handle errors. You shouldn't rely on try/catch for algorithm implementation. You create exceptions for errors and unexpected behavior. Then in some other part of the system you

[PHP] Try{} Catch()

2007-12-23 Thread Al
Try() and Catch() seems neat; but, I've not found it to be very practical. Anyone using it? How? Al... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Try{} Catch()

2007-12-23 Thread Martin Alterisio
It's not supposed to be practical, it's just a way to handle errors. You shouldn't rely on try/catch for algorithm implementation. You create exceptions for errors and unexpected behavior. Then in some other part of the system you use try/catch to prevent the code from terminating abruptly. You

Re: [PHP] Try{} Catch()

2007-12-23 Thread Al
I understand it's intended use and how to use it, have just not found a good use for it yet. Martin Alterisio wrote: It's not supposed to be practical, it's just a way to handle errors. You shouldn't rely on try/catch for algorithm implementation. You create exceptions for errors and

RE: [PHP] Try{} Catch()

2007-12-23 Thread ked
- From: Al [mailto:[EMAIL PROTECTED] Sent: Monday, December 24, 2007 5:59 AM To: php-general@lists.php.net Subject: Re: [PHP] Try{} Catch() I understand it's intended use and how to use it, have just not found a good use for it yet. Martin Alterisio wrote: It's not supposed

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-19 Thread Rodolfo De Nadai
Hello James, in future we will implement the script with cron, i've already talk to the support server guys... and i think this would be the best pratice... But for now i was wondering if there's a workaround... because in the moment my boss tell me to not change anything that could delay the

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-18 Thread Rodolfo De Nadai
, September 17, 2007 1:00 PM To: Daevid Vincent Cc: php-general@lists.php.net Subject: Re: [PHP] Try to find a solution, when restart Apache with PHP Script Hi Daevid, This app keep alive forever as well? When you restart apache what happend to your app? Daevid Vincent escreveu

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-18 Thread James Ausmus
On 9/17/07, Rodolfo De Nadai [EMAIL PROTECTED] wrote: Hi all... I'm facing a serious problem with my application. I have a script write in PHP that starts in Internet Explorer, this script keep on running until a varible value change on my MySQL database. The problem is that when i restart

[PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Rodolfo De Nadai
Hi all... I'm facing a serious problem with my application. I have a script write in PHP that starts in Internet Explorer, this script keep on running until a varible value change on my MySQL database. The problem is that when i restart Apache, the process child initalized isn't kill... then the

RE: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Edward Kay
I'm facing a serious problem with my application. I have a script write in PHP that starts in Internet Explorer, this script keep on running until a varible value change on my MySQL database. The problem is that when i restart Apache, the process child initalized isn't kill... then the apache

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Rodolfo De Nadai
Edward , my best guess is that not IE is holding the connection but the apache user... because the process is related to the apache user... and there's more i can close IE, bacause i use the directive 2 log.log on the call of system. Example: system(php myscript.php 2 log.log ); This why IE

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Rodolfo De Nadai
Jim, i've already look for pcntl... but the support server guys, tell me that they can't install php modules that are not pre-compiled... so, pcntl is not an alternative... I think you are right... i have to make this script a daemon... but how can i do that with php??... the problem is that

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Jim Lucas
Rodolfo De Nadai wrote: Edward , my best guess is that not IE is holding the connection but the apache user... because the process is related to the apache user... and there's more i can close IE, bacause i use the directive 2 log.log on the call of system. Example: system(php myscript.php 2

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Rodolfo De Nadai
No... it not should only run when i'm connected to it throught a web server... it means that when i go to specific IE page and press a button named 'Enable' the daemon should be called and start to run indefinitly, and i'm able to close IE session and the daemon keep working as well... That's

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Jim Lucas
Rodolfo De Nadai wrote: No... it not should only run when i'm connected to it throught a web server... it means that when i go to specific IE page and press a button named 'Enable' the daemon should be called and start to run indefinitly, and i'm able to close IE session and the daemon keep

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Rodolfo De Nadai
Right on the moment this process is not a option... because the project should end in 4 weeks... perhaps after a while i could try use this ideia of yours... But right now i have to find a diferent solution... But thanks Jim... that open new horizons... Jim Lucas escreveu: Rodolfo De Nadai

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Jim Lucas
Rodolfo De Nadai wrote: Jim, i've already look for pcntl... but the support server guys, tell me that they can't install php modules that are not pre-compiled... so, pcntl is not an alternative... Bummer, get new support server guys... no, but really I think you are right... i have

RE: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Daevid Vincent
-Original Message- From: Rodolfo De Nadai [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 5:25 AM To: php-general@lists.php.net Subject: [PHP] Try to find a solution, when restart Apache with PHP Script Hi all... I'm facing a serious problem with my application

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Rodolfo De Nadai
Hi Daevid, This app keep alive forever as well? When you restart apache what happend to your app? Daevid Vincent escreveu: -Original Message- From: Rodolfo De Nadai [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 5:25 AM To: php-general@lists.php.net Subject: [PHP

RE: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Daevid Vincent
. -Original Message- From: Rodolfo De Nadai [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 1:00 PM To: Daevid Vincent Cc: php-general@lists.php.net Subject: Re: [PHP] Try to find a solution, when restart Apache with PHP Script Hi Daevid, This app keep alive forever as well? When

[PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-14 Thread Rodolfo De Nadai
Hi all... I'm facing a serious problem with my application. I have a script write in PHP that starts in Internet Explorer, this script keep on running until a varible value change on my MySQL database. The problem is that when i restart Apache, the process child initalized isn't kill... then

[PHP] Try XMLWriter ... was Re: [PHP] OO purism sucks - sell me on PHP5?

2006-06-02 Thread D. Dante Lorenso
[EMAIL PROTECTED] wrote: What are some of the other killer features of PHP5 that I may be sleeping on here. You have got to get your hands on XMLWriter. I don't write any XHTML inside php any more. I've wrapped the XMLWriter object inside my own object and now I can create 100%

[PHP] try

2003-10-19 Thread sun zheng
with best wishes Zheng Sun _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Try/Catch

2003-09-09 Thread --
Hello Jay, Yes, I´m running PHP5. And in my code you can see that the exception is throwed in an a call to a methode from an aggregated object in a suclassed one ($this-curl-GET()). The GET() methode throws the excpetion if curl_exec returns an error. But one would expect that the

Re: [PHP] Try/Catch

2003-09-09 Thread Curt Zirzow
* Thus wrote -- ([EMAIL PROTECTED]): Hello Jay, Yes, I´m running PHP5. And in my code you can see that the exception is throwed in an a call to a methode from an aggregated object in a suclassed one ($this-curl-GET()). The GET() methode throws the excpetion if curl_exec returns an

[PHP] Try/Catch

2003-09-08 Thread --
Well, may question is about the Scope of Throwed Execeptions. Look my example: I have something like this: //...cut... try { $res = $this-curl-GET($this-url[0]); } catch (Exception $e) {

RE: [PHP] Try/Catch

2003-09-08 Thread Jay Blanchard
[snip] Try/Catch Well, may question is about the Scope of Throwed Execeptions. [/snip] What version of PHP are you running? Only V5 has this kind of exception handling. See http://www.php.net/zend-engine-2.php HTH! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Try to get PHP to read the content from MS Word

2001-08-16 Thread Jack
Dear all I'm trying to get PHP to read the content which created by MS Word.But when php runs, and it just return Nothing (Blank ) to the browser!! Actually , i was thinking to make a HTML Page which can let user to type in the content, then the content will copy to a file and finally a php will

Re: [PHP] Try to get PHP to read the content from MS Word

2001-08-16 Thread Mukul Sabharwal
Hi, MS Word encodes it's contents, so you'll need to use the COM interface to access MS Word Files. A tutorial is available @ http://www.xeru.com on COM with PHP4. --- Jack [EMAIL PROTECTED] wrote: Dear all I'm trying to get PHP to read the content which created by MS Word.But when php

[PHP] try catch in php?

2001-02-26 Thread Jeff
Is there any equivalent java try catch syntax in php ? Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] try catch in php?

2001-02-26 Thread Jason Cox
No, PHP doesn't have the extensive error handling that Java does. It's a bit more like C. Jason - Original Message - From: "Jeff" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 26, 2001 6:30 PM Subject: [PHP] try catch in php? Is there any equivalent java

[PHP] try - catch ?

2001-02-03 Thread Alain Fontaine
Hi, Are there any plans on implementing something like Exception handling into future versions of PHP? That would be great. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

Re: [PHP] try - catch ?

2001-02-03 Thread Teodor Cimpoesu
Alain Fontaine wrote: Hi, Are there any plans on implementing something like Exception handling into future versions of PHP? That would be great. I do remember Zeev saying it is considered for future implementation. I don't remember if it was on this list or php-dev one, though. --