logo
Ask your Symfony questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$4
Why would inclusion of the config file fail intermittently?

On a Symfony 1.0 project, does anyone ever get an intermittent errror like this one?

Warning: include(SF_ROOT_DIR/config/config.php): failed to open stream: No such file or directory in /home/public/microsoft/apps/exchange/config/config.php on line 4

Warning: include(): Failed opening 'SF_ROOT_DIR/config/config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/public/microsoft/apps/exchange/config/config.php on line 4

Warning: require_once(/util/sfCore.class.php): failed to open stream: No such file or directory in /home/public/microsoft/apps/exchange/config/config.php on line 7

Fatal error: require_once(): Failed opening required '/util/sfCore.class.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/public/microsoft/apps/exchange/config/config.php on line 7


Right now we have several deevelopers working on separate machines, each with a local copy of the software. All of them occasionally get this error. Anyone familiar with this?

This question has been answered.

marshall | 08/03/10 at 11:46am Edit


(2) Responses

See a threaded view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    11/20/10
    8:07pm
    Gordon Franke says:

    i think your web/index.php or web/frontend_dev.php is not correct it must define the SF_ROOT_DIR constant

    example:


    define('SF_ROOT_DIR', realpath(dirname(__FILE__).'/..'));
    define('SF_APP', 'frontend');
    define('SF_ENVIRONMENT', 'dev');
    define('SF_DEBUG', true);

    require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');

    sfContext::getInstance()->getController()->dispatch();


    can you post your config/config.php and your web/index.php

  • avatar
    Last edited:
    11/20/10
    8:07pm
    Jakub Zalas says:

    Do you mount directories with your source code? In some cases mounted shares can make the files not readable/accessible.

    Anyway it seems you have something uncommon in your config/config.php file. Usually there are only two variables defined (paths to symfony libs):


    <?php

    // symfony directories
    $sf_symfony_lib_dir = '/usr/share/php/symfony';
    $sf_symfony_data_dir = '/usr/share/php/data/symfony';

    Previous versions of this answer: 08/03/10 at 12:54pm | 08/03/10 at 12:54pm

This question has expired.





Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.