[PHP] ini function like ini_set and ini_alter
Thanks for all. My end it is Apache 1.3.27 and PHP 4.3.2 in Win32 system NT 4.0. I have the php.ini auto_prepend_file like this: auto_prepend_file="C:\OPENFEDRA\Apache\htdocs\fedra\sv\cfg\" All work fine with this configuration of the php.ini. For same reason I must to do not configure php.ini and the directives auto_prepend_file must be null like auto_prepend_file =. I have discovered ini_alter function but I do not be able to work in my application. My script it is like: $path"; if(ini_alter('auto_prepend_file', $path.'systemVariables.php')) echo "ini_alter success"; else echo "ini_alter failed"; but do not work. If I change the ini_alter with include() it work all fine but I do not want to use include or require function. have sameone an idea about this code do not work?? Thanks for all and if it is possible reply to me also to e-mail follow. [EMAIL PROTECTED] www.infocamere.it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ini function like ini_set and ini_alter
Thanks Philip for the response. I can to write in step by step for to explain well my situation. 1. my application work fine in Win32 system but I must to executed it also in Linux and Mac env. It is possible. In Win32 in many case, I do not have Apache and PHP install. It is possible to have other web_server like IIS (Win32). The conflict with my application are only for the TCP IP Port. In Win32 system I can install Apache and PHP with same component of the application without are invasive because *all* object (module apache + module php + script php + XML files and so on ) are under my folder like C:\OPENFEDRA\apache\htdocs... or C:\OPENFEDRA\php\extensionsetc In the Linux system the distribution have Apache and PHP installed as for default. I do not want to install Apache and PHP and I do not wnat to are invasive in this env because it is possible that Apache and PHp are used to worh with others application of the User's. For this reson I think it is better to modify dinamically the php.ini directives from my scripts PHP. In this way my application can work in the other web_server like IIS but if it is PHP interpreted installed. 2. I have use include_once() function at the init of the project. But in the next time, I have think that it is a good way to write my script PHP witout to re-call in any script this function. I have discovered the auto_prepend_files directive of the php.ini and it is a good way instead to use in any script include_once() or require_once(). One other thing; I think that auto_prepend_file have a good peformance insted of the include or require. 3. I have tried to use also the directives of Apache creating a file .htaccess that he contains the directive of php.ini like this: php_value auto_prepend_file "C:/OPENFEDRA/Apache/htdocs/fedra/sv/cfg/systemVariables.php" and without modify my script PHP. But I have not understood where to put these file and then putting the directive of Apache AllowOverride to the All value I have a InternalServer error. Also on this you can help me? Ciao e grazie Franco. Philip Olson wrote: > Reread the docs here (the table): > > http://www.php.net/ini_set > > You cannot set this directive at runtime. Using .htaccess > is as close as you'll get to that. I see no reason why > using auto_prepend_file here would be better than include() > as this is exactly what include() is for. > > Regards, > Philip > > On 4 Dec 2002, Franco Pozzer wrote: > > > Thanks for all. > > > > My end it is Apache 1.3.27 and PHP 4.3.2 in Win32 system NT 4.0. > > > > I have the php.ini auto_prepend_file like this: > > auto_prepend_file="C:\OPENFEDRA\Apache\htdocs\fedra\sv\cfg\" > > > > All work fine with this configuration of the php.ini. > > > > For same reason I must to do not configure php.ini and the directives > > auto_prepend_file must be null like auto_prepend_file =. > > > > I have discovered ini_alter function but I do not be able to work in my > > application. > > > > My script it is like: > > > $path="C:\\OPENFEDRA\\Apache\\htdocs\\fedra\\sv\\cfg\\"; > > > > echo"$path"; > > > > if(ini_alter('auto_prepend_file', $path.'systemVariables.php')) > > echo "ini_alter success"; > > else > > echo "ini_alter failed"; > > > > but do not work. > > > > If I change the ini_alter with include() it work all fine but I do not > > want to use include or require function. > > > > have sameone an idea about this code do not work?? > > > > Thanks for all and if it is possible reply to me also to e-mail follow. > > > > [EMAIL PROTECTED] > > www.infocamere.it > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ini function like ini_set and ini_alter
Thanks Janson. plaese write step by step how to do to confugure apache. remeber this. I work in Win32 system and PHp worh as CGI. I have created .htaccess like this: php_value auto_prepend_file="C:OPENFEDRA\Apache\htdocs\fedra\sv\cfg\systemvariables.php" and httpd.conf modify in this directives : # # This controls which options the .htaccess files in directories can # override. Can also be "All", or any combination of "Options", "FileInfo", # "AuthConfig", and "Limit" # AllowOverride All But I have and error like this: error.log: [Wed Dec 04 15:14:53 2002] [alert] [client 127.0.0.1] c:/openfedra/apache/htdocs/.htaccess: Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration The .htaccess files it is under this folder C:\OPENFEDRA\apache\conf\ Please see other response that I have write ed I have explain my test. Thanks. ciao Franco. Jason Wong wrote: > On Thursday 05 December 2002 00:33, Franco Pozzer wrote: > > Thanks for all. > > > > My end it is Apache 1.3.27 and PHP 4.3.2 in Win32 system NT 4.0. > > > > I have the php.ini auto_prepend_file like this: > > auto_prepend_file="C:OPENFEDRAApachehtdocsfedrasvcfg" > > > > All work fine with this configuration of the php.ini. > > > > For same reason I must to do not configure php.ini and the directives > > auto_prepend_file must be null like auto_prepend_file =. > Why could you not configure your php.ini? > Other places where you can set auto_prepend_file is in httpd.conf or in a > ..htaccess file. > > I have discovered ini_alter function but I do not be able to work in my > > application. > > > > My script it is like: > > > $path="C:\OPENFEDRA\Apache\htdocs\fedra\sv\cfg\"; > > > > echo"$path"; > > > > if(ini_alter('auto_prepend_file', $path.'systemVariables.php')) > You can't set the auto_prepend_file value at runtime -- auto_prepend has > (should have) already taken place by the time your script is run! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ini function like ini_set and ini_alter
Thanks Jason. I use PHP as CGI in Win32 system because It is most stable like Apache module. I have make a same code PHP like this follow that I try ini_set and ini_aletr function instead of the -htaccess solution. The code that try it is this: $path"; echo ini_get("include_path"); echo""; echo ini_set("include_path", ini_get("include_path") . ".;" .$path); echo""; echo ini_get("include_path"); echo""; echo ini_get("auto_prepend_file"); echo""; if(ini_alter("auto_prepend_file", $path . "systemVariables.php")) echo "ini_alter success"; else echo "ini_alter failed"; echo ini_get("auto_prepend_file"); echo""; echo"xPathLibraryExt=$xPathLibraryExt"; The file that I try to *load* into my script it is in the C:\OPENFEDRA\apache\htdocs\fedra\sv\cfg\systemVariables and it is this: The error it is: C:\openfedra\apache\htdocs\fedra\sv\cfg\ ;c:\php4\pear ;c:\php4\pear ;c:\php4\pear.;C:\openfedra\apache\htdocs\fedra\sv\cfg\ ini_alter failed C:\openfedra\apache\htdocs\fedra\sv\cfg\systemVariables.php xPathLibraryExt= Warning: Failed opening 'functionXpath.php' for inclusion (include_path='.;c:\php4\pear.;C:\openfedra\apache\htdocs\fedra\sv\cfg\') in C:\OPENFEDRA\Apache\htdocs\fedra\sv\src\html\benvenut.php on line 39 Warning: Failed opening 'datiConfig.php' for inclusion (include_path='.;c:\php4\pear.;C:\openfedra\apache\htdocs\fedra\sv\cfg\') in C:\OPENFEDRA\Apache\htdocs\fedra\sv\src\html\benvenut.php on line 58 I this that auto_prepend_file it is set by ini_alter function because the echo before and after function write the odl (Null value) and new value (C:\openfedra\apache\htdocs\fedra\sv\cfg\systemVariables.php). But do not undestand because The ini_alter exit with failed and because the next path variables are not find in the script. Ciao franco. Jason Wong wrote: > On Thursday 05 December 2002 17:29, Franco Pozzer wrote: > > > > plaese write step by step how to do to confugure apache. > > > > remeber this. I work in Win32 system and PHp worh as CGI. > I don't use PHP as CGI with Apache so I don't think I can help you here. > But ... > > I have created .htaccess like this: > > > > php_value > > auto_prepend_file="C:OPENFEDRAApachehtdocsfedrasvcfgsystemvariables.p > >hp" > I have a feeling that if you're using PHP/CGI then you cannot set PHP > options using a .htaccess file ... > > But I have and error like this: > > > > error.log: [Wed Dec 04 15:14:53 2002] [alert] [client 127.0.0.1] > > c:/openfedra/apache/htdocs/.htaccess: Invalid command 'php_value', perhaps > > mis-spelled or > > defined by a module not included in the server configuration > which is why you get this error. > In any case, the correct way to specify php options in a .htaccess file is: > php_value auto_prepend_file "C:OPENFEDRAApachex.php" > NB there should not be an '='. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] EZ_Publish
> Can anyone explain to me how to do to make a demo db? I have load in my dbrms demokernel.sql and i have modify httpd.conf with indication about ez_publish/doc/install. I have modify set.ini with a name of the db and the uid a pwd to access of the db. Thanks for all. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php