Pluf Framework

Sign in or create your account | Project List | Help

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

Created: 1 year 13 days ago by Julien Ballestracci

Updated: 1 year 3 days ago

Status: Accepted

Owner: Loïc d'Anterroches

Followed by: 1 person

Labels:
Priority:Medium
Type:Defect