Thanks Jason.

I use PHP as CGI in Win32 system because It is most stable like Apache

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:


echo ini_get("include_path");

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

echo ini_get("include_path");

echo ini_get("auto_prepend_file");

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

echo ini_get("auto_prepend_file");


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');
 $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: 


ini_alter failed


Warning: Failed opening 'functionXpath.php' for inclusion
in C:\OPENFEDRA\Apache\htdocs\fedra\sv\src\html\benvenut.php on line 39

Warning: Failed opening 'datiConfig.php' for inclusion
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

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]
> > 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 (
To unsubscribe, visit:

Reply via email to