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="C:\\openfedra\\apache\\htdocs\\fedra\\sv\\cfg\\";
echo"<br>$path<br>";

echo ini_get("include_path");
echo"<br>";

echo ini_set("include_path", ini_get("include_path") . ".;" .$path);
echo"<br>";

echo ini_get("include_path");
echo"<br>";

echo ini_get("auto_prepend_file");
echo"<br>";

if(ini_alter("auto_prepend_file", $path . "systemVariables.php"))
    echo "<br>ini_alter success<br>";
else
    echo "<br>ini_alter failed<br>";

echo ini_get("auto_prepend_file");
echo"<br>";

echo"<br>xPathLibraryExt=$xPathLibraryExt<br>"; 

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:

<?
 $document_root = getenv('DOCUMENT_ROOT');
 $xPathLibraryExt=$document_root."/fedra/sv/src/lib/";
 $systemVariables=$document_root."/fedra/sv/cfg";
 $tabelle_genExt=$document_root."/fedra/sv/xml/lookup/";
 $tabella_comExt=$document_root."/fedra/sv/xml/lookup/";
 $elenco_pratExt=$document_root."/fedra/sv/pratiche/";
 $modelliExt=$document_root."/fedra/sv/xml/xmlguida/";
 $praticheExt=$document_root."/fedra/sv/pratiche/";
 $sezioniExt=$document_root."/fedra/sv/xml/xmlguida/";
 $riquadriExt=$document_root."/fedra/sv/xml/xmlguida/";
 $lookupExt = $document_root."/fedra/sv/xml/lookup/";
 $xmlguidaExt = $document_root."/fedra/sv/xml/xmlguida/";
 $formPhpExt =  $document_root."/fedra/sv/src/formphp/";
 $srcJsExt = $document_root."/fedra/sv/src/js/";
 $srcPhpExt = $document_root."/fedra/sv/src/php/";
 $srcHtmlExt = $document_root."/fedra/sv/src/html/";
 $FolderTmpExt = $document_root."/fedra/sv/tmp";
?>

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:OPENFEDRAApachexxxxxxxxx.php"

> NB there should not be an '='.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to