Re: [PHP] Is it possible to disable eval()?

2007-08-16 Thread Steffen Ebermann
On Thu, Aug 16, 2007 at 09:50:30PM +0800, hshh wrote: I try to disable eval() function in php script, but failed. In php.ini disable_functions=eval is not work, but other functions. So, is it possible to disable eval()? Thanks. It don't work because eval() isn't a function. The Suhosin

Re: [PHP] Move and rename help...

2007-08-08 Thread Steffen Ebermann
On Wed, Aug 08, 2007 at 11:39:20PM +0100, Joker7 wrote: Can anyone give me some pointer,here's my problem.I wish to move a file from a local server to a remote one.The file is in the format ([EMAIL PROTECTED]) on moving the file to the remote server I wish to remove the time stamp part of

Re: [PHP] [pcre] backreferences to all matches of a repeated subexpression

2007-08-02 Thread Steffen Ebermann
On Wed, Aug 01, 2007 at 08:05:09PM -0700, Jack Bates wrote: I'm not sure how to get an array of all subexpression matches, in the order matches appear in the subject, instead of the order expressions appear in the pattern. This problem gave me a headache. My only idea is to use preg_split()

Re: [PHP] registered globals on localhost (apache)

2007-02-22 Thread Steffen Ebermann
On Thu, Feb 22, 2007 at 01:40:53PM -, Ross wrote: I have my RG's switched off in my local .ini but I am tinkering about with oscommerce. php_value register_globals on I tried to change add this line to the .htaccess file in the catalog folder but still gives the error Server

Re: [PHP] LOL, preg_match still not working.

2007-02-17 Thread Steffen Ebermann
As far as I tested, the regular expression works how it is intended to work. Maybe this a touch easier to read line do it for you: elseif (preg_match('|[EMAIL PROTECTED]*();:_. /\t-]|', $comment)) On Sat, Feb 17, 2007 at 09:27:59AM -0500, Beauford wrote: Hi, I previously had some

Re: [PHP] LOL, preg_match still not working.

2007-02-17 Thread Steffen Ebermann
Addendum: I encountered a problem when the string contains linebreaks. Maybe adding \n\r into the brackets fixes your problem. On Sat, Feb 17, 2007 at 09:27:59AM -0500, Beauford wrote: Hi, I previously had some issues with preg_match and many of you tried to help, but the same problem

Re: [PHP] LOL, preg_match still not working.

2007-02-17 Thread Steffen Ebermann
It's 6.2 but PHP 4.4.4. Basically, I'm not getting any error. The expression just don't match. I don't know if it should or not. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] what do i need to disable

2007-02-08 Thread Steffen Ebermann
It's more secure to begin with converting the string using htmlentities() and reconverting allowed tags afterwards. See http://alistapart.com/articles/secureyourcode http://alistapart.com/articles/secureyourcode2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] what do i need to disable

2007-02-08 Thread Steffen Ebermann
By using something like $var = preg_replace( !lt;(i|b|small|big|code)gt;(.+)lt;/\\1gt;!isU, \\1\\2/\\1, $var); you can accomplish a solution where only closed tags will be reconverted. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Regex Mixtake

2007-02-03 Thread Steffen Ebermann
You have to use preg_match_all() if (preg_match_all(!\(.+)\!sU, $var, $match)) On Sat, Feb 03, 2007 at 12:36:59PM -0500, Manolet Gmail wrote: Hi, i have a problem using regex, i want to get all the text between so i try this... $subject = 'menu Archer?,-,Chief?,L_Menu2,Big

Re: [PHP] Regex Mixtake

2007-02-03 Thread Steffen Ebermann
I don't know, but http://php.net/manual/en/function.ereg.php says Note: preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg(). On Sat, Feb 03, 2007 at 01:58:50PM -0500, Manolet Gmail wrote: anyway, PCRE is better that ereg?

Re: [PHP] Regex Mixtake

2007-02-03 Thread Steffen Ebermann
Side note: $exp = explode('', $var); foreach ($exp as $key = $val) if ($key%2!=0) $arr[] = $val; var_dump($arr); works without regular expressions. -- Steffen On Sat, Feb 03, 2007 at 12:36:59PM -0500, Manolet Gmail wrote: Hi, i have a problem using regex, i want to get all the text

Re: [PHP] preg_replace();

2007-02-02 Thread Steffen Ebermann
This always works for me: if (preg_match_all(!\(.+)\!sU, $var, $match)) { for ($i=0; $icount($match[0]); $i++) { $old = $match[1][$i]; $new = preg_replace(!\|| !, _, $old); $var = str_replace(\$old\, \$new\, $var); } } On Fri, Feb 02, 2007 at 07:30:37PM +0100, Sébastien WENSKE

Re: [PHP] preg_replace(); [solved]

2007-02-02 Thread Steffen Ebermann
Maybe you just mistyped that, but this would *probably* also match on s= or bar=, cause [ and ] are metacharacters. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_replace();

2007-02-02 Thread Steffen Ebermann
On Fri, Feb 02, 2007 at 09:01:38PM +0100, Steffen Ebermann wrote: $new = preg_replace(!\|| !, _, $old); Heyha, the mail's subject gone obsolete. preg_replace isn't necessary at all. Better use: $new = str_replace(array (|, ), _, $old); -- PHP General Mailing List (http://www.php.net