failed to open stream: No such file or directory

Topics: Developer Forum, Project Management Forum, User Forum
Jul 24, 2013 at 11:13 AM
I'm experiencing this error in my server:

Warning: require_once(/Classes/PHPExcel.php): failed to open stream: No such file or directory in /home/u927716272/public_html/calculadora_excel.php on line 41 Fatal error: require_once(): Failed opening required '/Classes/PHPExcel.php' (include_path='.:/usr/lib/php:usr/lib/php') in /home/u927716272/public_html/calculadora_excel.php on line 41

but it results that when i make the tests in my local host there isn't any problem with the class which i'm using (PHPExcel version 1.79) and my PHP Version is 5.3.

The source code that i'm using is the following:

Line 39: set_include_path(get_include_path() . PATH_SEPARATOR . 'usr/lib/php');
Line 40: include('Classes/PHPExcel.php');
Line 41: require_once '/Classes/PHPExcel.php';

i'm waiting of your reply

Thank you very much.
Coordinator
Jul 24, 2013 at 12:14 PM
Besides asking why you're trying to include/require PHPExcel.php twice?

Line 41; the leading / means that PHP is looking for the PHPExcel.php file in the /Classes directory.... immediately below your filesystem root directory.