This project is read-only.

phpword does not work in linux OC

Jul 18, 2011 at 7:36 AM

I have my application server build on windows OC ( PHP, apache 2.2.14, phpword ). When I migrate to linux does not work.

Parts of my code:

        $section->addText('Hello!', array('name' => 'Arial', 'size' => '11', 'bold' => true), 'pStyle');

        header ( 'Content-Description: File Transfer' );
        header("Content-type: application/");
        header("Content-Disposition: attachment; filename=temp.doc");
        header("Pragma: no-cache");

        $objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');

If any ideas?

Mar 6, 2012 at 7:26 AM

I had the same problem, because I had changed PHPWord.php in phpword.php and the map PHPWord in phpword. Linux is case sensitive...