Pluf Framework

Issue 144: Add the App's folder in the include_path - migrate.php

Reported by Julien Ballestracci, Feb 27, 2009

The problem:

$ php migrate.php -a -d -i 
--conf=/workspace/mysite/src/MyApp/conf/myapp.php 

Fatal error: Pluf::loadConfig(): Failed opening required 
'MyApp/relations.php' 
(include_path='.:/usr/share/php:/usr/share/pear:/home/julien/lib/pluf
-master/src') in /home/julien/lib/pluf-master/src/Pluf.php on line 
71

Call Stack:
    0.0007     112544   1. {main}() 
/home/julien/lib/pluf-master/src/migrate.php:0
    0.0058     471176   2. Pluf::start() 
/home/julien/lib/pluf-master/src/migrate.php:158
    0.0059     471176   3. Pluf::loadConfig() 
/home/julien/lib/pluf-master/src/Pluf.php:42


-------

Solved by adding:

set_include_path(get_include_path().PATH_SEPARATOR.dirname($what['con
f']).'/../../');
before Pluf::start();

Comment 1 by Loïc d'Anterroches, Mar 9, 2009

Nice idea as if we follow the conventions of Pluf it will work most 
of the time.
Status: Accepted
Owner: loic

Comment 2 by Thomas Riché, Apr 12, 2010

Hello,

You will find attached patches to enable the loading of arrays 
instead of files to Pluf::loadConfig and Dispatcher::loadControllers

Created: 4 years 2 months ago by Julien Ballestracci

Updated: 3 years 1 month ago

Status: Accepted

Owner: Loïc d'Anterroches

Followed by: 2 persons

Labels:
Priority:Medium
Type:Defect