[PHP-DEV] Re: [PHP-CVS] cvs: php4 /main main.c From: Sascha Schumann (sascha <email protected>)
Date: 08/29/00

> This is all assuming that what's being used in the thttpd module is what
> should be PATH_TRANSLATED and there just is no way to obtain it as
> full_path name there which sounds weird to me.

    Ok. Part of cleaning up the interface SAPI module<->PHP will
    be to make stuff like this more clear. There is no way to
    tell that there is some interaction going on between the
    primary_file handle passed to php_execute_script() and some
    obscure function in fopen_wrappers.c through an undocumented
    member in the request_info structure.

> Don't forget that in a threaded environment that V_GETCWD() call will not
> give you the correct result. The first time it really is set is during that
> V_CHDIR_FILE() call (i.e. with help of path_translated). So your path also
> isn't correct for threaded environments.

    The old_cwd stuff in main.c is intended to reset the cwd to
    the working directory which was active before we entered
    php_execute_script(). The first time the virtual cwd is set
    during sapi_startup() which is usually called by the main
    web-server setup function, so I don't see a problem there.

    About the thttpd API: The source code is the only available
    documentation.

    - Sascha

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>