I mean than when you run PHP in CGI mode, PHP doesn�t read default php.ini
location. It first to look php in your actual path. An example...

ecazfe04:/home3/www# php -v
PHP 4.3.1 (cgi), Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies


ecazfe04:/home3/www# export REQUEST_METHOD="POST"
                // Now we are in CGI mode as if it was called from Apache.

ecazfe04:/home3/www# export REDIRECT_STATUS="200"
            // To avoid force-cgi-redirect

ecazfe04:/home3/www# php -v
Content-type: text/html
X-Powered-By: PHP/4.3.1

No input file specified.
        // Ok, we are in CGI mode and it looks for a file.

/home3/www# cd <path_to_file>
/home3/www# php index.php
    Everithings gos OK, except that if exists php.ini in <path_to_file> PHP
uses it. That overrides default compilation option. You can see it if you
use phpinfo() in 'index.php'.

    I think this shouldn�t be the correct way of reading php.ini, but maybe
I�m wrong. Can anybody help me? I run a webserver (Apache+PHP) that hosts
some virtualhosts and I don�t won�t that my customers could use an alternate
php.ini.

    PS: Sorry, I�m Spanish and I don�t know if my explanation is clear
enough.











Jos� Luis P�rez Ruiz
Arrakis Servicios y Comunicaciones S.L.U.
Edificio Expo, C/ Inca Garcilaso s/n
Isla de la Cartuja
41092 Sevilla
Telefono: 955 550 509


**********************************************
Noticia legal
Este mensaje electr�nico contiene informaci�n de BT Ignite Espa�a S.A.U. que
es privada y confidencial, siendo para el uso exclusivo de la persona (s) o
entidades arriba mencionadas. Si usted no es el destinatario se�alado, le
informamos que cualquier divulgaci�n, copia, distribuci�n o uso de los
contenidos est� prohibida. Si usted ha recibido este mensaje por error, por
favor borre su contenido lo antes posible. Gracias.


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

Reply via email to