NYCPHP Meetup

NYPHP.org

[nycphp-talk] parse_ini_file() wants full path... ?

Eric Rank erank at isthmus.com
Fri Feb 27 13:29:06 EST 2004


A work around might be to use the realpath() function.

$path = realpath('./file.ini');
parse_ini_file($path);

cheers!

Eric

----- Original Message ----- 
From: "David Mintz" <dmintz at davidmintz.org>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Friday, February 27, 2004 12:05 PM
Subject: [nycphp-talk] parse_ini_file() wants full path... ?


>
> On my development machine -- RH Linux 9/Apache 1.3.27/PHP 4.3.3 -- I get a
> 'cannot open file.ini for reading' error from parse_ini_file unless I give
> it the full path.  I want to be able to say parse_ini_file('./file.ini')
> for the convenience of inter-server portability. (The caller and the ini
> file do live in the same directory.)
>
> I ~can~ do this on the production box (FreeBSD 4.8/PHP 4.3.4/Apache
> 1.3.29) and all the relevant php.ini and file permission settings are the
> same or similar, AFAICT.
>
> I'm grateful for any clues. Thanks.
>
> ---
> David Mintz
> http://davidmintz.org/
>
>         "Anybody else got a problem with Webistics?" -- Sopranos 24:17
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list