problem with test file function ->save

Apr 2, 2010 at 9:34 PM


i dont know why, but im stacked at this line in those test files:
$objWriter->save(str_replace('.php', '.pptx', __FILE__));
i got echos from previous lines but the script ends up here.

php > 5.2, gentoo unix server. user rights.
i changed also the case file name from PHPPowerpoint to PHPPowerPoint, i dont know what to do next. and possibly, where can i find the result ppt file ?

May 14, 2010 at 8:08 PM
Edited May 14, 2010 at 9:02 PM

I had the same issue , and also other problems that were not too hard to fix after I got clued in that it could be minor spelling stuff. Are you at least getting the error messages on the results page after attempting to execute. That helped me. It would probably help to just paste those errors here.

One thing I recall changing on my system that I believe helped me along was setting the PHPPOWERPOINT_ROOT environment variable. on my system.  Mind you,  I am on a LINUX system.

In the PHPPowerPoint.php file,  in the Classes directory you will find this block of code:
               /** PHPExcel root directory */
               if (!defined('PHPPOWERPOINT_ROOT')) {        
                    define('PHPPOWERPOINT_ROOT', dirname(__FILE__) . '/');        
                    require(PHPPOWERPOINT_ROOT . 'PHPPowerPoint/Autoloader.php');        
Notice that its looking for this environment variable.

Look  into 02presentation.php and you will find a line including the Classes directory
        >    set_include_path(get_include_path() . PATH_SEPARATOR . '../Classes/'); 


There will be other includes also using the environment variable, and other files that started working once I got PHPPOWERPOINT_ROOT setup.





May 14, 2010 at 9:26 PM

I'll take a look at the PHPPOWERPOINT_ROOT constant and autoloader over the weekend.