Reply to Re: WAMP5, short tags and CLI PHP issue

Your name:

Reply:


Posted by comp.lang.php on 01/29/07 14:32

On Jan 29, 9:28 am, Erwin Moller
<since_humans_read_this_I_am_spammed_too_m...@spamyourself.com> wrote:
> 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)?
>
> > PhilHi 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.

Thanx, however, I was unaware that I was using php-cgi.exe as I have
been using what I thought was php.exe instead. Will have to see if
that has the same "-d" option, would save a lot of time and effort
were it to be so, thanx!

Phil


>
> Hope that helps.
> Good luck. (Migrations are always a pain.)
>
> Regards,
> Erwin Moller

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация