|
Posted by Erwin Moller on 01/29/07 14:28
comp.lang.php wrote:
> 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.
>
> Realizing that .htaccess is not usable for CLI PHP nor can I use
> ini_set(), and the business requirement of these scripts being fully
> portable installer scripts (tested so far successfully in Win XP/
> Apache 1.33/PHP 5.2.0, Win XP/Apache 2.0.53/PHP 4.3.9, WinXP/Apache
> 2.0.53/PHP 5.0.4, Linux/Apache 2.0.54/PHP 4.3.9), what other last-
> minute portable tricks would you suggest (other than the obvious:
> changing php.ini, which I can't do on certain remote host services
> this app will reside in)?
>
> Phil
Hi Phil,
Are you using php-cgi.exe ?
If so type:
php-cgi.exe -h for help
It lists amongst others the -d option.
With this option you can tell PHP beforehand to set a certain value for
anything that you might encounter in php.ini, like short_open_tags.
If this does for you what you want, you only have to change the way you call
php-cgi instead of changing all the scripts.
Hope that helps.
Good luck. (Migrations are always a pain.)
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|