php-general Digest 14 Mar 2011 07:43:24 -0000 Issue 7225

2011-03-14 Thread php-general-digest-help
php-general Digest 14 Mar 2011 07:43:24 - Issue 7225 Topics (messages 311823 through 311825): Help for pear 311823 by: Alejandro Crosa Probem with go-pear.bat 311824 by: Alejandro Crosa 311825 by: Tommy Pham Administrivia: To subscribe to the digest, e-mail:

php-general Digest 14 Mar 2011 20:31:21 -0000 Issue 7226

2011-03-14 Thread php-general-digest-help
php-general Digest 14 Mar 2011 20:31:21 - Issue 7226 Topics (messages 311826 through 311836): Handling exit in eval 311826 by: Thomas Björk 311827 by: Thomas Björk 311828 by: Richard Quadling 311829 by: Richard Quadling 311830 by: Thomas Björk

Re: [PHP] Probem with go-pear.bat

2011-03-14 Thread Tommy Pham
On Sun, Mar 13, 2011 at 5:49 PM, Alejandro Crosa alec...@ymail.com wrote: Hi...I try install pear by executing the go-pear.bat file, but I get a follow  message: The go.pear.phar.dll is not a image valid of  windows. Please, any help is important for me. Thanks. Alejandro See

[PHP] Handling exit in eval

2011-03-14 Thread Thomas Björk
Is there any way to emulate an exit in eval without exiting the calling script. ?php $s = 'echo Shows; exit; echo Doesn\'t show; '; eval($s); echo Never comes here; ? I would like to do something like this: ?php $s = 'echo Shows; exit; echo Doesn\'t show; '; function MakeItStop() { // Do

[PHP] Handling exit in eval

2011-03-14 Thread DELiTH
Is there any way to emulate an exit in eval without exiting the calling script. ?php $s = 'echo Shows; exit; echo Doesn\'t show; '; eval($s); echo Never comes here; ? I would like to do something like this: ?php $s = 'echo Shows; exit; echo Doesn\'t show; '; function MakeItStop() { // Do

Re: [PHP] Handling exit in eval

2011-03-14 Thread Richard Quadling
2011/3/14 Thomas Björk t...@bytecode.se: Is there any way to emulate an exit in eval without exiting the calling script. ?php $s = 'echo Shows; exit; echo Doesn\'t show; '; eval($s); echo Never comes here; ? I would like to do something like this: ?php $s = 'echo Shows; exit; echo

Re: [PHP] Handling exit in eval

2011-03-14 Thread Richard Quadling
2011/3/14 Richard Quadling rquadl...@gmail.com: And where is my UNDO button. Essentially, having exit in the eval code is no different to having it in non-eval code. eval isn't a separate entity which can be terminated. So, code the eval code differently. If you can provide some examples,

Re: [PHP] Handling exit in eval

2011-03-14 Thread DELiTH
Richard Quadling wrote: 2011/3/14 Richard Quadling rquadl...@gmail.com: And where is my UNDO button. Essentially, having exit in the eval code is no different to having it in non-eval code. eval isn't a separate entity which can be terminated. So, code the eval code differently. If you

[PHP] assistance with php not running properly

2011-03-14 Thread Jack
Hello All, I have a problem where we tried to install mod_security for apache, failed and backed out of the install. Were not sure if that's what did it, but when we run certain php scripts they are no longer working, giving us blank screen ( web browser screen ) no errors in http error log

[PHP] PHP Fatal error: Cannot redeclare class

2011-03-14 Thread Brendan_Crowley
Hi, I get the following error in my apache error log: [14-Mar-2011 14:17:27] PHP Fatal error: Cannot redeclare class I created a simplified set of php files and classes to formulate this question. I have 5 php files; 2 of which declare a class that has the same name in both. I know it would be

Re: [PHP] PHP Fatal error: Cannot redeclare class

2011-03-14 Thread Daniel Brown
On Mon, Mar 14, 2011 at 10:34, brendan_crow...@dellteam.com wrote: Hi, I get the following error in my apache error log: [14-Mar-2011 14:17:27] PHP Fatal error:  Cannot redeclare class I created a simplified set of php files and classes to formulate this question. I have 5 php files; 2 of

RE: [PHP] PHP Fatal error: Cannot redeclare class

2011-03-14 Thread Brendan_Crowley
Thanks Louis, Worked a treat! -Original Message- From: Louis Huppenbauer [mailto:louis.huppenba...@gmail.com] Sent: 14 March 2011 15:10 To: Crowley, Brendan - Dell Team Subject: Re: [PHP] PHP Fatal error: Cannot redeclare class what about http://ch2.php.net/namespaces in php 5.3?

Re: [PHP] Deleting elements from the middle of an array

2011-03-14 Thread Paul M Foster
On Mon, Mar 14, 2011 at 09:34:33PM +0100, Peter Lind wrote: On 14 March 2011 21:31, Paul M Foster pa...@quillandmouse.com wrote: Here's what I need to do: I have an indexed array, from which I need to delete elements in the middle. Once completed, the indexes should be numerically in

Re: [PHP] Deleting elements from the middle of an array

2011-03-14 Thread Peter Lind
On 14 March 2011 22:10, Paul M Foster pa...@quillandmouse.com wrote: On Mon, Mar 14, 2011 at 09:34:33PM +0100, Peter Lind wrote: On 14 March 2011 21:31, Paul M Foster pa...@quillandmouse.com wrote: Here's what I need to do: I have an indexed array, from which I need to delete elements in

Re: [PHP] Deleting elements from the middle of an array

2011-03-14 Thread Marc Guay
I've given a simplified example. The actual target array is multi-dimensional. Your questioni sn't entirely clear but there's lot of chatter about multidimensional arrays on the array_values() page that might provide a solution. -- PHP General Mailing List (http://www.php.net/) To

[PHP] php or juvascript convert IETF format to ISO08601

2011-03-14 Thread Jordan
Hello Evrybody, Can i convert IETF format (ex: Wed, 18 Oct 2009 13:00:00 EST) in ISO8601 format (ex: 2009-11-05T13:15:30Z) Does somebody know some php scripte or similar? Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php or juvascript convert IETF format to ISO08601

2011-03-14 Thread Simon J Welsh
On 15/03/2011, at 12:32 PM, Jordan wrote: Hello Evrybody, Can i convert IETF format (ex: Wed, 18 Oct 2009 13:00:00 EST) in ISO8601 format (ex: 2009-11-05T13:15:30Z) Does somebody know some php scripte or similar? Thanks... strtotime() (http://php.net/strtotime) and date()

Re: [PHP] Handling exit in eval

2011-03-14 Thread DELiTH
Richard Quadling wrote: On 14 March 2011 12:14, DELiTH t...@bytecode.se wrote: Richard Quadling wrote: 2011/3/14 Richard Quadling rquadl...@gmail.com: And where is my UNDO button. Essentially, having exit in the eval code is no different to having it in non-eval code. eval isn't a

[PHP] help with a safe mode snag

2011-03-14 Thread Jack
Hello All, Im writing a script that creates a temp file which it then encrypts and sends out in an email. This works 100% on servers that don't have safe mode, but this server with safe mode doesn't understand it's all the same user. Error: Mon Mar 14 21:10:11 2011] [error] [client

Re: [PHP] Deleting elements from the middle of an array

2011-03-14 Thread Curtis Maurand
how about creating two arrays, one empty one. pop the elements you want out of the first array and push them to the second.  skip the push on the elements you don't want in the second array? Just a thought. --curtis Paul M Foster wrote: On Mon, Mar 14, 2011 at 09:34:33PM +0100, Peter Lind

[PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-14 Thread Andy McKenzie
Greetings, I'm moving some scripts from an older server (SuSE who-knows-what, running PHP 5.2.5) to a newer one (Ubuntu 10.10, running PHP 5.3.2). For the most part there haven't been any problems, or they've been things that I was able to fix easily. This one's got me stumped. I have the

Re: [PHP] Deleting elements from the middle of an array

2011-03-14 Thread Paul M Foster
On Mon, Mar 14, 2011 at 10:14:53PM +0100, Peter Lind wrote: On 14 March 2011 22:10, Paul M Foster pa...@quillandmouse.com wrote: [snip] Remove the elements, then use sort(). I've given a simplified example. The actual target array is multi-dimensional. Sort() won't work in a case like

Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-14 Thread Adam Richardson
This one's got me stumped. I have the following line in a script: $this-bc = ($this-network | (~$this-netmask)) 4294967295; $this-network and $this-netmask should both be of type long, and I should wind up with another long. I didn't write the original method, and I can't remember what

[PHP] problem with if and exact match

2011-03-14 Thread Jack
I want to be able to match if a string is contained within the string I am evaluating. I know that if ( $name == xxjacksonxx); based on the below would be true. But I want to be able to say if jackson is contained within $name that it's a match. I tried the below without success.. Not

Re: [PHP] problem with if and exact match

2011-03-14 Thread Admin
Try If(preg_match(/Jackson/i, $name)) {echo 'match'; }else{ echo 'fail'; } Richard Buskirk Sent from my iPhone On Mar 15, 2011, at 1:02 AM, Jack jacklistm...@gmail.com wrote: I want to be able to match if a string is contained within the string I am evaluating. I know that if ( $name

Re: [PHP] problem with if and exact match

2011-03-14 Thread Simon J Welsh
On 15/03/2011, at 6:02 PM, Jack wrote: I want to be able to match if a string is contained within the string I am evaluating. I know that if ( $name == xxjacksonxx); based on the below would be true. But I want to be able to say if jackson is contained within $name that it's a

RE: [PHP] problem with if and exact match

2011-03-14 Thread Jack
Thanks everyone... great examples...works ( both methods ) Thanks! Jack -Original Message- From: Alexis Antonakis [mailto:ad...@antonakis.co.uk] Sent: Tuesday, March 15, 2011 1:10 AM To: Jack Subject: Re: [PHP] problem with if and exact match