Include problems

Apr 21, 2011 at 5:44 PM

Hi,

I'm trying to test PHPPowerpoint but I can't get any of the test scripts to work.

I get the following error :

 

Warning: include(PHPPowerPoint.php) [function.include]: failed to open stream: No such file or directory in /home/tests/www/apis/phpppt/Tests/01simple.php on line 35

Warning: include() [function.include]: Failed opening 'PHPPowerPoint.php' for inclusion (include_path='.:/usr/share/php5:../Classes/') in /home/tests/www/apis/phpppt/Tests/01simple.php on line 35

Warning: include(PHPPowerPoint/IOFactory.php) [function.include]: failed to open stream: No such file or directory in /home/tests/www/apis/phpppt/Tests/01simple.php on line 38

Warning: include() [function.include]: Failed opening 'PHPPowerPoint/IOFactory.php' for inclusion (include_path='.:/usr/share/php5:../Classes/') in /home/tests/www/apis/phpppt/Tests/01simple.php on line 38
18:31:59 Create new PHPPowerPoint object
Fatal error: Class 'PHPPowerPoint' not found in /home/tests/www/apis/phpppt/Tests/01simple.php on line 42

 

All the files are there though. So I've tried to use the absolute path in the set_include_path declaration and even in the include but nothing works... :-(

Any idea on where the problem might come from?

Thanks!

Apr 23, 2011 at 11:27 PM

Just saw this and thought I quickly respond... I had a similar problem and it turned out to be filepath/filename mismatch.. it wasn't obvious as you don't expect these guys to get it wrong but I would go back over the files and double check what they are trying to include.
S

Apr 26, 2011 at 9:33 AM

Thanks Chengster ! After my post, I actually thought I'd try to check the includes individually and ended up changing the directories into lowercaps instead of the mix of upper and lowercaps (from PHPPowerpoint to phpppt).

Surprisingly it worked (not sure why) and I was able to make it work by changing the includes in all scripts...

Apr 26, 2011 at 9:35 AM

Yes, I remember it was something silly like that... not sure why they haven't fixed it in their latest release...

S

Jul 12, 2011 at 3:47 PM

The filename was: PHPPowerpoint

and the include statement:

include 'PHPPowerPoint.php';

Change the filename from PHPPowerpoint to PHPPowerPoint. (Last p into a capital P)