Question

I my project I'm using this class to handle ini files. I've developed all the project using Windows EasyPHP but when I put it in my Linux webserver, I always get this error in the log files (either using Lighttpd or Cherokee, the error is the same)

[12/11/2013 15:10:29.697] (error) handler_fcgi.c:115 - PHP Warning: parse_ini_file(Conf\confFile.ini): failed to open stream: No such file or directory in /var/www/ini.class.php on line 27 PHP Catchable fatal error: Argument 1 passed to Config::__construct() must be of the type array, boolean given, called in /var/www/ini.class.php on line 27 and defined in /var/www/ini.class.php on line 15

Was it helpful?

Solution

It sounds like your PHP process cannot access the file.

Normally this is either because the PHP process isn't running from where you think it is (and so the path is wrong). Try echoing 'getcwd()' and ssee if it returns when you expect.

Or, the path is right, but your PHP process doesn't have the required permissions to access the file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top