Forum


Replies: 6   Views: 5638
Trial installation for laravel
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by cjbm2994  · 03-10-2017 - 11:13

Hello, I'm interested in purchasing a license for this, but for now, I'm trying to run the trial version if it is compatible with our use case.

1.) Is this package compatible with any server? We use nginx.
2.) Is there any way to test the product with laravel? I read somewhere in the docs that it is only for premium subscription. 
3.) I tried testing the sample classes, but whenever i try to, it returns an error message. 
Here's my configuration info:

If you have any issue or problem please send us the following info:

PHP_VERSION: 7.1.7

PHP_OS: Darwin

PHP_UNAME: Darwin Charless-MacBook-Air.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

SERVER_NAME: 

SERVER_SOFTWARE: 

SERVER_ADDR: 

SERVER_PROTOCOL: 

HTTP_HOST: 

HTTP_X_FORWARDED_FOR: 

PHP_SELF: /Users/cjmalata/Downloads/phpdocx-trial-basic-7.0/check.php

ZipArchive: 1

DomDocument: 1

SimpleXMLElement: 1

Tidy: 

heres the message,​

Air:~ macbook$ php ~/Downloads/phpdocx-trial-basic-7.0/examples/Core/embedHTML/sample_1.php 

PHP Warning:  require_once(../../../classes/CreateDocx.inc): failed to open stream: No such file or directory in /Users/user/Downloads/phpdocx-trial-basic-7.0/examples/Core/embedHTML/sample_1.php on line 3


Warning: require_once(../../../classes/CreateDocx.inc): failed to open stream: No such file or directory in /Users/user/Downloads/phpdocx-trial-basic-7.0/examples/Core/embedHTML/sample_1.php on line 3

PHP Fatal error:  require_once(): Failed opening required '../../../classes/CreateDocx.inc' (include_path='.:') in /Users/user/Downloads/phpdocx-trial-basic-7.0/examples/Core/embedHTML/sample_1.php on line 3


Fatal error: require_once(): Failed opening required '../../../classes/CreateDocx.inc' (include_path='.:') in /Users/user/Downloads/phpdocx-trial-basic-7.0/examples/Core/embedHTML/sample_1.php on line 3

Posted by admin  · 03-10-2017 - 11:21

Hello,

phpdocx can run on any server with PHP 5.2 or newer installed: apache, nginx, lighttpd, FastCGI, PHP CLI mode, php-fpm...

About your questions:

  • The trial package doesn't include PHP namespaces, so we recommend you to test the package standalone. Advanced and Premium licenses include a package with PHP namespaces support recommended to use the library with frameworks such as Laravel or Symfony (https://www.phpdocx.com/documentation/cookbook/integrate-phpdocx-with-laravel). When you move a phpdocx script created without namespaces to the package with PHP namespaces you just need to add the namespaces to do it works.
  • You are getting a not found when including the main phpdocx file (CreateDocx.inc). We recommend you to check and run the included samples in the package and the practical guide available on https://www.phpdocx.com/documentation/practical

Regards.

Posted by cjbm2994  · 03-10-2017 - 11:43

I'm actually trying to run the included samples..
 

Charless-MacBook-Air:phpdocx-trial-basic-7.0 cjbm2994$ php examples/Core/addText/sample_1.php 

PHP Warning:  require_once(../../../classes/CreateDocx.inc): failed to open stream: No such file or directory in /Users/cjmalata/Downloads/phpdocx-trial-basic-7.0/examples/Core/addText/sample_1.php on line 3

 

Warning: require_once(../../../classes/CreateDocx.inc): failed to open stream: No such file or directory in /Users/cjmalata/Downloads/phpdocx-trial-basic-7.0/examples/Core/addText/sample_1.php on line 3

PHP Fatal error:  require_once(): Failed opening required '../../../classes/CreateDocx.inc' (include_path='.:') in /Users/cjmalata/Downloads/phpdocx-trial-basic-7.0/examples/Core/addText/sample_1.php on line 3

 

Fatal error: require_once(): Failed opening required '../../../classes/CreateDocx.inc' (include_path='.:') in /Users/cjmalata/Downloads/phpdocx-trial-basic-7.0/examples/Core/addText/sample_1.php on line 3

Charless-MacBook-Air:phpdocx-trial-basic-7.0 cjbm2994$ 

Posted by admin  · 03-10-2017 - 11:48

Hello,

Please open the folder of the sample and run it:

$ cd examples/Core/addText

$ php sample_1.php

The samples use a relative path to include phpdocx and other files.

Regards.

Posted by cjbm2994  · 03-10-2017 - 11:53

That explains it. thanks for that. 

Posted by cjbm2994  · 03-10-2017 - 11:58

Hey, 

I tried running your sample file, but when I updated some part of the text, it's not generating properly. The generated output is based on the original sample file.

Posted by admin  · 03-10-2017 - 12:21

Hello,

Unless you are using some cache (such as an op-code that doesn't refresh automatically scripts when they change) that makes no sense.

We don't know what could be wrong on your server; maybe you don't have write access to the output file, or you are trying to open an already opened document (and the app doesn't refresh the content if it's already open), or you don't have changed/saved the script or any other unknown issue.

As you are using a trial package, we recommend you to follow the practical guide and check the included samples and your server logs.

Regards.