|
Posted by comp.lang.php on 01/29/07 14:47
On Jan 29, 9:45 am, "Steve" <no....@example.com> wrote:
> "comp.lang.php" <phillip.s.pow...@gmail.com> wrote in messagenews:1170079350.729027.92780@j27g2000cwj.googlegroups.com...
> |I installed WAMP5 on my WinXP box which works just fine on its own,
> | and I found a practical way of handling my short-tag PHP script
> | via .htaccess:
> |
> | php_flag short_open_tag on
> |
> | To ensure my literally hundreds of PHP scripts will all function
> | within the WAMP5 architecture.
> |
> | However, there is a case of a series of installer scripts written in
> | PHP that are not meant to be run except as CLI PHP that obviously will
> | not benefit from .htaccess, furthermore, changing the CLI PHP scripts
> | from short to long tags is very much not an option due to both the
> | volume of scripts and code complexity as patterns of '<' . '?..' or
> | "<" . "?.." or '<' . "?.." will exist within scripts alongside the
> | dynamic generation of other PHP scripts by other CLI PHP scripts.
>
> volume is not important, nor is the pattern complex. you will either look
> for:
>
> <?
>
> or
>
> <?=
[snip]
Um, bad news, that's not all you're going to find in these installer
scripts. You're also going to find lines like this:
$php .= '<' . "?\n echo 'hello world'; ?" . '>';
And
if (preg_match('/<' . '\?/', $php)) // DO STUFF WITH $php CONTAINING
PHP CODE
Don't say I didn't warn you [re: "simplicity"]
Navigation:
[Reply to this message]
|