PHP set_include_path and require_once

330 Views Asked by At

I have an error that happens only on my host server, on my local environment not:

Fatal error: require_once() [function.require]: Failed opening required '\Audero\Loader\AutoLoader.php' (include_path='.:/usr/share/pear:/usr/share/php:/home/httpd/vhosts/webox-it.com/ofrom.webox-it.com/modules/Concordancier....\lib') in /home/httpd/vhosts/webox-it.com/ofrom.webox-it.com/modules/Concordancier/data_manager.php on line 1670

Here is my code:

set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/../../lib/');
require_once 'Audero\Loader\AutoLoader.php';
spl_autoload_register('Audero\Loader\AutoLoader::autoload');
    // Extract the chunk and save it on the hard disk
    try {

        $extractor = new \Audero\WavExtractor\AuderoWavExtractor($inputFile);
        $extractor->saveChunk($start, $end, $outputFile);
...

Files structure: /lib/Audero/Loader/Autoloader.php

Calling file emplacement: /modules/Concordancier/data_manager.php

In my local environment there's no problem, php can load the autoloader, but in the prod server it does not. The source files structure is exactly the same as the local one, and the relative path looks correct. The php version in prod is 5.3.27 so it should work ?

Any idea ?

0

There are 0 best solutions below