Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XAMPP with PHP 5.3.1 #236

Closed
samlinux opened this issue May 11, 2014 · 15 comments
Closed

XAMPP with PHP 5.3.1 #236

samlinux opened this issue May 11, 2014 · 15 comments
Assignees

Comments

@samlinux
Copy link

samlinux commented May 11, 2014

HI is there a reason why the Sample_01_SimpleText.php example not work with the following configuration:

  • XAMPP with PHP 5.3.1

But the all requirements seems to work:

Requirements
PHP 5.3.0 ... passed
PHP extension ZipArchive ... passed
PHP extension XML ... passed
PHP extension GD (optional) ... passed

Thanks for any help


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@ivanlanin
Copy link
Contributor

Can you give us the error messages? I assume you're using Linux?

@samlinux
Copy link
Author

I use a Mac 10.9.2 and by the creation of the file there is no error message. The file can be stored without any error.

But if i try to open the file with Mac Pages or Open Office it can't open the file because the file is damaged, so the message from Open Office or Pages !

@Progi1984 Progi1984 added the Bug label May 11, 2014
@ivanlanin
Copy link
Contributor

Ok. So the file was created, but you got an error message of corrupt document when opening the file with Open Office or Pages. Can you try with other sample, e.g. Sample_04_Textrun?

I think the bug is caused by a malformed format of the resulting document. MS Word can handle the error internally, but Open Office and Pages cannot because they use more strict standard. We have to find out what went wrong in the format. I'm using MS Word on Windows, so I don't have the same problem. But my Open Office is indeed crash when I try to open Sample_01_SimpleText. I'll see what I can do, but I hope some other can help too.

@samlinux
Copy link
Author

Thanks

Can you try with other sample, e.g. Sample_04_Textrun?
there is the same problem

@ivanlanin ivanlanin added this to the 0.11.0 milestone May 14, 2014
@samlinux
Copy link
Author

Hi, is there a solution or a workaround possible ?

@ivanlanin
Copy link
Contributor

Hi @samlinux. Sorry I still can't give you any solution for now. As I've told you, I suspect that the problem was caused by the way the word processing application (Pages and OO) reads the DOCX. But I've been able to open a file produced by PHPWord from a Mac using Pages 5.x. What version of Pages and OO are you using?

@samlinux
Copy link
Author

Hi @ivanlanin, I use Pages 5.2 and ok I can see the document like you, but in the meantime I have setup a windows 7 environment so I can test the docs also on windows under Office 2010, as a small workaround for me.

@ivanlanin
Copy link
Contributor

Great. Thanks for trying to do some more tests. I'll find time to setup the same environment like you have.

ivanlanin added a commit to ivanlanin/PHPWord that referenced this issue May 30, 2014
@ivanlanin
Copy link
Contributor

Hi @samlinux. I think I found (and fixed) the bug that caused OpenOffice to crash when opening DOCX documents produced by PHPWord. Can you please get the latest version from the develop branch and try to open produced docs with OpenOffice? Thanks.

@ivanlanin ivanlanin modified the milestones: 0.12.0, 0.11.0 Jun 1, 2014
@ivanlanin ivanlanin self-assigned this Jun 1, 2014
@ivanlanin
Copy link
Contributor

@samlinux Any news? Can we close this issue? Thanks.

@samlinux
Copy link
Author

@ivanlanin hi, sorry for the late response, I was very busy, because of this I can't check it, I will check it this weekend :)

@ivanlanin
Copy link
Contributor

No problem :) Thanks.

@samlinux
Copy link
Author

Hi @ivanlanin I have tested the developer-branch, downloaded the ZIP from https://github.com/PHPOffice/PHPWord/tree/develop

but it doesn't work neither the pages nor the open-office version. The error is always the same, like described above.

This is my environment:

  • Mac: 10.9.3
  • Pages: 5.2
  • Open Office: 4.0.1
  • XAMPP 1.7.3 with PHP 5.3.1

I tried two of the samples:

  • 01 simple text
  • 03 Sections

@ivanlanin
Copy link
Contributor

Thanks for taking time to test it, @samlinux. Sorry I still couldn't help to solve the issue. We'll leave this open then.

@ghost ghost modified the milestones: 0.13.0, 0.12.0 Jan 3, 2015
@ghost ghost removed this from the v0.13.0 milestone Jul 30, 2016
@mdupont
Copy link
Contributor

mdupont commented Sep 4, 2019

Out of curiosity, I tried running PHPWord Sample_01_SimpleText.php under XAMPP 1.7.3 (PHP 5.3...). So in 2019, PHPWord doesn't even start under PHP 5.3, due to some dependencies using the short array syntax (which appeared in PHP 5.4). The first one to trigger a syntax error was guzzlehttp/promise.

So it appears that the modern PHPWord only supports PHP 5.4+ anyway. I tried with PHP 5.4, everything worked fine and the resulting file displayed OK in Word.

This issue can be closed IMHO.

@troosan troosan closed this as completed Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants