About fifty percent of the support requests we receive originate from the fact that the client’s server upon which LiveDocx is running is not set up correctly.
To better debug such issues, we have just released a script which can be run from the command line to check that a server environment is compatible to LiveDocx.
The script check-environment.php is contained in the directory /demos/Zend/Service/LiveDocx/.
In the case that your environment is compatible to LiveDocx, you will see the following:
LiveDocx Environment Checker 1: Checking OS (Linux)..................................................PASS 2: Checking SAPI (cli)..................................................PASS 3: Checking PHP version (5.2.9).........................................PASS 4: Checking HTTP stream wrapper.........................................PASS 5: Checking HTTPS stream wrapper........................................PASS 6: Checking Zend Framework path.........................................PASS 7: Checking Zend Framework version (1.9.0)..............................PASS 8: Checking SOAP extension..............................................PASS 9: Checking DOM extension...............................................PASS 10: Checking SimpleXML extension.........................................PASS 11: Checking libXML extension............................................PASS 12: Checking your IP address (xxx.xxx.xxx.xxx)...........................PASS 13: Checking your city (Berlin)..........................................PASS 14: Checking your region (Berlin)........................................PASS 15: Checking your country (Germany)......................................PASS 16: Checking backend WSDL (0.843467950821s)..............................PASS 17: Checking backend credentials are defined.............................PASS 18: Instantiating Zend_Service_LiveDocx_MailMerge object (1.14s).........PASS Congratulations! All tests passed. The server environment, in which this script is running, is suitable for LiveDocx.
In the case that you do not have the Zend Framework correctly installed, you will see the following:
LiveDocx Environment Checker 1: Checking OS (Linux)..................................................PASS 2: Checking SAPI (cli)..................................................PASS 3: Checking PHP version (5.2.9).........................................PASS 4: Checking HTTP stream wrapper.........................................PASS 5: Checking HTTPS stream wrapper........................................PASS 6: Checking Zend Framework path.........................................FAIL [...]
In the case that your username and/or password to LiveDocx is invalid, you will see the following:
LiveDocx Environment Checker 1: Checking OS (Linux)..................................................PASS 2: Checking SAPI (cli)..................................................PASS 3: Checking PHP version (5.2.9).........................................PASS 4: Checking HTTP stream wrapper.........................................PASS 5: Checking HTTPS stream wrapper........................................PASS 6: Checking Zend Framework path.........................................PASS 7: Checking Zend Framework version (1.9.0)..............................PASS 8: Checking SOAP extension..............................................PASS 9: Checking DOM extension...............................................PASS 10: Checking SimpleXML extension.........................................PASS 11: Checking libXML extension............................................PASS 12: Checking your IP address (xxx.xxx.xxx.xxx)...........................PASS 13: Checking your city (Berlin)..........................................PASS 14: Checking your region (Berlin)........................................PASS 15: Checking your country (Germany)......................................PASS 16: Checking backend WSDL (1.38575911522s)...............................PASS 17: Checking backend credentials are defined.............................PASS 18: Instantiating Zend_Service_LiveDocx_MailMerge object (-1s)...........FAIL One or more tests failed. The web server environment, in which this script is running, does not meet the requirements for LiveDocx.
If you are having trouble getting started with LiveDocx, I would suggest you download the latest Zend Framework and try out the check-environment.php script.
August 20th, 2009 at 12:30
hi,
i am trying t install phpLiveDocx on my localhost i.e WinXP + WAMP
Executing the the check-environment.php , second point gets failed.
i.e.
2: Checking SAPI (apache2handler)……………………………………FAIL
Any help?
Thanks
August 20th, 2009 at 14:01
Hello NextGen
This means that you do not have the CLI version of PHP installed.
You can use phpLiveDocx in PHP as a server module (apache2handler). Out-of-the box, however, the sample applications only run with the CLI version. Typically both apache2handler and CLI PHP version are available on a server. Not in your case, it seems.
Not to worry: Simply create a new PHP file in a directory accessible by Apache and copy and paste (minus the first (shebang) line) the sample you want to try out, into this PHP file. Then call the file via localhost the usual way.
Do not forget to ensure that the include_path is set correctly to i) include the Zend Framework and ii) include phpLiveDocx.
Does this fix the problem?
Jonathan
September 9th, 2009 at 06:47
#!/usr/bin/php
C:\xampp\htdocs\docxtopdf\phplivedocx\samples\Zend
phpLiveDocx Environment Checker
1: Checking OS (WINNT)……………………………………………..PASS
2: Checking SAPI (apache2handler)……………………………………FAIL
3: Checking PHP version (5.2.8)……………………………………..PASS
4: Checking HTTP stream wrapper……………………………………..PASS
5: Checking HTTPS stream wrapper…………………………………….FAIL
6: Checking Zend Framework path……………………………………..PASS
7: Checking Zend Framework version (1.9.2)……………………………PASS
8: Checking SOAP extension………………………………………….PASS
9: Checking DOM extension…………………………………………..PASS
10: Checking SimpleXML extension……………………………………..PASS
11: Checking libXML extension………………………………………..PASS
12: Checking your IP address (117.199.112.216)…………………………PASS
13: Checking your city (Jodhpur)……………………………………..PASS
14: Checking your region (Rajasthan)………………………………….PASS
15: Checking your country (India)…………………………………….PASS
16: Checking backend WSDL (-1s)………………………………………FAIL
17: Checking backend credentials are defined…………………………..PASS
Notice: SoapClient::SoapClient() [soapclient.soapclient]: Unable to find the wrapper "https" – did you forget to enable it when you configured PHP? in C:\xampp\htdocs\docxtopdf\phplivedocx\samples\Zend\Soap\Client\Common.php on line 51
Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "https://api.livedocx.com/1.2/mailmerge.asmx?WSDL" in C:\xampp\htdocs\docxtopdf\phplivedocx\samples\Zend\Soap\Client\Common.php on line 51
18: Instantiating Tis_Service_LiveDocx_MailMerge object (-1s)……………FAIL
One or more tests failed. The web server environment, in which this script is
running, does not meet the requirements for phpLiveDocx.
:( help me brotha
September 9th, 2009 at 07:02
Hello Hardik
You do not have the “HTTPS stream wrapper” available in your PHP installation. All communication with the backend service is via HTTPS, hence, this wrapper is mandatory. Please contact your web server hosting company and ask that they activate “https” in PHP.
If you are developing locally, check the documentation of XAMPP to find out how to activate “https”.
Then phpLiveDocx will work for you.
Regards
Jonathan Maron
September 24th, 2009 at 15:18
Hi Jonathan,
I think I’m having the same issue as NextGen above – how do I ‘include phpLiveDocx’?
Cheers
Simon
September 25th, 2009 at 07:15
Hello Simon,
Please refer to this article http://is.gd/3ErXA for details on how to include phpLiveDocx.
If you need any more help, just let me know.
Jonathan Maron
October 7th, 2009 at 09:44
Cant make it work either..
First of all the check-environment.php file didnt format correctly on my system.. So I replaced the printf with an echo command..
Here is my output:
#!/usr/bin/php phpLiveDocx Environment Checker Checking OS (WINNT)…………………………………………….. = PASS
Checking SAPI (apache2handler)…………………………………… = FAIL
Checking PHP version (5.2.6)…………………………………….. = PASS
Checking memory limit (128M)…………………………………….. = PASS
Checking HTTP stream wrapper…………………………………….. = PASS
Checking HTTPS stream wrapper……………………………………. = FAIL
Checking Zend Framework path…………………………………….. = PASS
Checking Zend Framework version (1.9.3PL1)………………………… = PASS
Checking SOAP extension…………………………………………. = FAIL
Checking DOM extension………………………………………….. = PASS
Checking SimpleXML extension…………………………………….. = PASS
Checking libXML extension……………………………………….. = PASS
Checking your IP address (77.66.99.74)……………………………. = PASS
Checking your city (Holbæk)…………………………………….. = PASS
Checking your region (Vestsjalland)………………………………. = PASS
Checking your country (Denmark)………………………………….. = PASS
Checking backend WSDL (-1s)……………………………………… = FAIL
Checking backend credentials are defined………………………….. = PASS
Its a standard WAMP installation
October 7th, 2009 at 09:56
ok.. Got a little further..
#!/usr/bin/php phpLiveDocx Environment Checker Checking OS (WINNT)…………………………………………….. = PASS
Checking SAPI (apache2handler)…………………………………… = FAIL
Checking PHP version (5.2.6)…………………………………….. = PASS
Checking memory limit (128M)…………………………………….. = PASS
Checking HTTP stream wrapper…………………………………….. = PASS
Checking HTTPS stream wrapper……………………………………. = PASS
Checking Zend Framework path…………………………………….. = PASS
Checking Zend Framework version (1.9.3PL1)………………………… = PASS
Checking SOAP extension…………………………………………. = PASS
Checking DOM extension………………………………………….. = PASS
Checking SimpleXML extension…………………………………….. = PASS
Checking libXML extension……………………………………….. = PASS
Checking your IP address (77.66.99.74)……………………………. = PASS
Checking your city (**)…………………………………….. = PASS
Checking your region (**)………………………………. = PASS
Checking your country (Denmark)………………………………….. = PASS
Checking backend WSDL (1.6331040859222s)………………………….. = PASS
Checking backend credentials are defined………………………….. = PASS
Instantiating Tis_Service_LiveDocx_MailMerge object (-1s)…………… = FAIL
One or more tests failed. The web server environment, in which this script is running, does not meet the requirements for phpLiveDocx.
October 7th, 2009 at 10:10
ok.. Sorry for bathering.. Got it to work now.. Allthough
Checking SAPI (apache2handler) still fails
October 7th, 2009 at 10:11
Hello Bjarke
> Checking HTTPS stream wrapper……………………………………. = FAIL
This means that your system is not set up to open network connections via HTTPS.
Pls refer to http://www.theimagingsourceforums.com/showthread.php?t=322361
> Checking SOAP extension…………………………………………. = FAIL
This means that you system is not set up to use SOAP.
Please contact your system administrator to solve these problems.
> Instantiating Tis_Service_LiveDocx_MailMerge object (-1s)…………… = FAIL
This means that the credentials (username and/or password) are invalid.
Can you log in here:
https://www.livedocx.com/user/login.aspx
October 7th, 2009 at 10:13
If “Instantiating Tis_Service_LiveDocx_MailMerge object” works, you can ignore “Checking SAPI (apache2handler)”
October 16th, 2009 at 15:21
#!/usr/bin/php phpLiveDocx Environment Checker
1: Checking OS (Linux)……………………………………………..PASS
2: Checking SAPI (apache2handler)……………………………………FAIL
3: Checking PHP version (5.2.6)……………………………………..PASS
4: Checking memory limit (32M)………………………………………PASS
5: Checking HTTP stream wrapper……………………………………..PASS
6: Checking HTTPS stream wrapper…………………………………….PASS
7: Checking Zend Framework path……………………………………..PASS
and when I run /samples/mail-merge/convert-batch/run-job.php –output-format pdf, I get:
### run-job.php Batch Converter
### Start: 2009-10-16T16:14:23+02:00
but nothing converts
help?
October 16th, 2009 at 15:47
What happens to the rest of the tests. They stop at 7 in your case, but in fact run to 19. Below is the rest. Do you not see this?
8: Checking Zend Framework version (1.9.4)……………………………PASS
9: Checking SOAP extension………………………………………….PASS
10: Checking DOM extension…………………………………………..PASS
11: Checking SimpleXML extension……………………………………..PASS
12: Checking libXML extension………………………………………..PASS
13: Checking your IP address (xxx.xxx.xxx.xxx)…………………………PASS
14: Checking your city (Paris)……………………………………….PASS
15: Checking your region (Paris)……………………………………..PASS
16: Checking your country (France)……………………………………PASS
17: Checking backend WSDL (1.1011919975281s)…………………………..PASS
18: Checking backend credentials are defined…………………………..PASS
19: Instantiating Tis_Service_LiveDocx_MailMerge object (1.0631539821625s)..PASS
October 16th, 2009 at 15:57
> Do you not see this?
Nope. #7 is the last check that shows.
October 16th, 2009 at 16:03
Have you set the path to the Zend Framework? Line 14 + 15 of common.php.
October 16th, 2009 at 16:05
line 14-15=
define (‘PATH_ZF’, ‘/usr/share/ZendFramework-1.9.4/library’);
define (‘PATH_LD’, dirname(__FILE__) . ‘/../library’);
October 16th, 2009 at 16:16
OK. That is not the problem.
When you echo phpinfo(), do you see this:
http://www.phplivedocx.org/wp-content/uploads/2009/08/phpinfo-soap.png
Plus, how much memory do you have available for PHP
See php.ini, line:
memory_limit = ??M
October 16th, 2009 at 16:20
No SOAP. I was under the impression that it wasn’t required, based on this page:
http://www.phplivedocx.org/articles/getting-started-with-phplivedocx/
memory_limit=32M
October 16th, 2009 at 16:24
SOAP is absolutely required, as LiveDocx is a SOAP service. Pls activate SOAP on your server. You may also consider increasing your memory to about 128MB. Please follow these steps and let me know everything works :-) Thanks. Jonathan.
October 16th, 2009 at 16:56
SOAP activated, memory to 128MB, same result
October 16th, 2009 at 16:58
Can you post the output of the check-environment.php script?
Also what happens exactly after “7″. Does the script die? Or does it return correctly?
October 16th, 2009 at 17:11
actually, when I comment-out the following in check-environment, the check-environment script runs to the end and I get the new check-environment output below…
—— start commented out——–
if (1 === version_compare(Zend_Version::VERSION, MINIMUM_ZEND_FRAMEWORK_VERSION)) {
$result = TEST_PASS;
} else {
$result = TEST_FAIL;
$failed = true;
}
printLine($counter, ‘Checking Zend Framework version (‘ . Zend_Version::VERSION . ‘)’, $result);
$counter++;
$microtime = microtime(true);
if (false !== @file_get_contents(Tis_Service_LiveDocx_MailMerge::ENDPOINT)) {
$duration = microtime(true) – $microtime;
$result = TEST_PASS;
} else {
$duration = -1;
$result = TEST_FAIL;
$failed = true;
}
printLine($counter, ‘Checking backend WSDL (‘ . $duration . ‘s)’, $result);
$counter++;
$errorMessage = null;
try {
$microtime = microtime(true);
$phpLiveDocx = new Tis_Service_LiveDocx_MailMerge(USERNAME, PASSWORD);
$duration = microtime(true) – $microtime;
} catch (Tis_Service_LiveDocx_Exception $e) {
$duration = -1;
$errorMessage = $e->getMessage();
}
if (is_null($errorMessage)) {
$result = TEST_PASS;
} else {
$result = TEST_FAIL;
$failed = true;
}
printLine($counter, ‘Instantiating Tis_Service_LiveDocx_MailMerge object (‘ . $duration . ‘s)’, $result);
$counter++;
—— end commented out——–
—— start new output ——–
#!/usr/bin/php phpLiveDocx Environment Checker
1: Checking OS (Linux)……………………………………………..PASS
2: Checking SAPI (apache2handler)……………………………………FAIL
3: Checking PHP version (5.2.6)……………………………………..PASS
4: Checking memory limit (128M)……………………………………..PASS
5: Checking HTTP stream wrapper……………………………………..PASS
6: Checking HTTPS stream wrapper…………………………………….PASS
7: Checking Zend Framework path……………………………………..PASS
8: Checking SOAP extension………………………………………….PASS
9: Checking DOM extension…………………………………………..PASS
10: Checking SimpleXML extension……………………………………..PASS
11: Checking libXML extension………………………………………..PASS
12: Checking your IP address (18.9.60.92)……………………………..PASS
13: Checking your city (Cambridge)……………………………………PASS
14: Checking your region (Massachusetts)………………………………PASS
15: Checking your country (United States)……………………………..PASS
16: Checking backend credentials are defined…………………………..PASS
One or more tests failed. The web server environment, in which this script is running, does not meet the requirements for phpLiveDocx.
—— end new output ——–
October 19th, 2009 at 10:18
We need to find out exactly what is happening when the check-environment.php script stops. Is PHP crashing?
What happens when you execute?
echo file_get_contents(‘https://api.livedocx.com/1.2/mailmerge.asmx?WSDL’);
Do you see this:
https://api.livedocx.com/1.2/mailmerge.asmx?WSDL
December 18th, 2009 at 16:34
Jon,
Hi, I’m back!
yes, when I execute the line you gave, I see the contents of the following link.
Ben
December 18th, 2009 at 17:05
also, the script /samples/mail-merge/convert-batch/run-job.php is crashing at the line:
$phpLiveDocx = new Tis_Service_LiveDocx_MailMerge(USERNAME, PASSWORD);
January 9th, 2010 at 13:00
Hello brother,
when i convert doc to pdf i got such error.. Pls, rectify me.
Notice: SoapClient::SoapClient() [function.SoapClient-SoapClient]: Unable to find the wrapper “https” – did you forget to enable it when you configured PHP? in F:\xampp\htdocs\Raju\sample\soap.php on line 32
Warning: SoapClient::SoapClient() [function.SoapClient-SoapClient]: I/O warning : failed to load external entity “https://api.livedocx.com/1.2/mailmerge.asmx?WSDL” in F:\xampp\htdocs\Raju\sample\soap.php on line 32
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘https://api.livedocx.com/1.2/mailmerge.asmx?WSDL’ in F:\xampp\htdocs\Raju\sample\soap.php:32 Stack trace: #0 F:\xampp\htdocs\Raju\sample\soap.php(32): SoapClient->SoapClient(‘https://api.liv…’) #1 F:\xampp\htdocs\Raju\sample\phplivedocx\library\Tis\Service\LiveDocx.php(25): require_once(‘F:\xampp\htdocs…’) #2 F:\xampp\htdocs\Raju\sample\phplivedocx\library\Tis\Service\LiveDocx\MailMerge.php(25): require_once(‘F:\xampp\htdocs…’) #3 F:\xampp\htdocs\Raju\sample\phplivedocx\samples\Converter.php(28): require_once(‘F:\xampp\htdocs…’) #4 F:\xampp\htdocs\Raju\sample\doc2pdf.php(12): include(‘F:\xampp\htdocs…’) #5 {main} thrown in F:\xampp\htdocs\Raju\sample\soap.php on line 32
January 12th, 2010 at 17:14
Hi,
I am using CakePHP, so, can i use LiveDocx, without Zend Framework? is there any why i can get it done?
January 13th, 2010 at 05:44
Hello Nidhin
Yes! You can use LiveDocx in PHP without the Zend Framework — many people already do this.
Please take a look at the article Using LiveDocx with PHP 5 SoapClient. It offers a step-by-step guide.
If you need any help, please do not hesitate to contact me!
Jonathan
January 20th, 2010 at 09:57
It looks like you do not have the stream wrapper “https” installed on your server. All communication with the backend server is via SSL, hence, the “https” stream wrapper is required. Please contact your hosting company about getting this stream wrapper installed. Then LiveDocx will work perfectly on your server.
January 23rd, 2010 at 00:03
I have downloaded ZendFramework-1.9.7 and am trying to set it up. I already have an apachi server running on my windows PC and have configured PHP before downloading ZendFramework-1.9.7. However, within the ZendFramework-1.9.7/demos/Zend directory their is no /Service directory and hence no /LiveDocx and no check-environment.php. Can you please help
January 23rd, 2010 at 12:46
Zend_Service_LiveDocx is available in Zend Framework 1.10 and newer. You can download 1.10 here (currently marked as ‘unstable’):
http://www.zendframework.com/download/latest
The final stable version will release in the next few days.
January 28th, 2010 at 12:24
Update: Zend Framework 1.10.0 Full STABLE has been released! Download now!
March 23rd, 2010 at 08:50
hello Jonathan. the samples/mail-merge/convert-batch is not in the 1.10.0 anymore, nor is it in the archived version. I would really like to use this sample. Can you help me?
March 31st, 2010 at 15:04
Please refer to my comment above.
April 21st, 2010 at 15:20
Hello,
This is the result of my checking:
Zend_Service_LiveDocx Environment Checker
1: Checking OS (Linux)……………………………………………..PASS
2: Checking SAPI (cli)……………………………………………..PASS
3: Checking PHP version (5.3.2)……………………………………..PASS
4: Checking memory limit (128M)……………………………………..PASS
5: Checking HTTP stream wrapper……………………………………..PASS
6: Checking HTTPS stream wrapper…………………………………….PASS
7: Checking Zend Framework path……………………………………..PASS
8: Checking Zend Framework version (1.10.0)…………………………..PASS
9: Checking SOAP extension………………………………………….PASS
10: Checking DOM extension…………………………………………..PASS
11: Checking SimpleXML extension……………………………………..PASS
12: Checking libXML extension………………………………………..PASS
13: Checking your geo data…………………………………………..FAIL
13: Checking backend WSDL (-1.00s)……………………………………FAIL
14: Checking backend credentials are defined…………………………..PASS
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘https://api.livedocx.com/1.2/mailmerge.asmx?WSDL’ : failed to load external entity “https://api.livedocx.com/1.2/mailmerge.asmx?WSDL”
in /var/www/html/eroster/library/Zend/Soap/Client/Common.php on line 51
15: Logging into backend service (-1.00s)……………………………..FAIL
One or more tests failed. The web server environment, in which this script is
running, does not meet the requirements for Zend_Service_LiveDocx_*.
Please help
Thanks
June 25th, 2010 at 10:28
I just had a look at your check-environment.php script in ZF 1.10.6 and there’s something weird. On line 101 you seem to want to check the ZF version, but I guess you’re using the wrong constants.
if (1 === Zend_Version::compareVersion(PHP_VERSION, MIN_PHP_VERSION)) {
should probably be
if (1 === Zend_Version::compareVersion(Zend_Version::VERSION, MIN_ZF_VERSION)) {
June 25th, 2010 at 10:32
Oops, the correct fix should be :
if (1 === Zend_Version::compareVersion(MIN_ZF_VERSION)) {
July 27th, 2010 at 08:46
Zend_Service_LiveDocx Environment Checker 1: Checking OS (WINNT)……………………………………………..PASS 2: Checking SAPI (cgi-fcgi)…………………………………………FAIL 3: Checking PHP version (5.2.13)…………………………………….PASS 4: Checking memory limit (128M)……………………………………..PASS 5: Checking HTTP stream wrapper……………………………………..PASS 6: Checking HTTPS stream wrapper…………………………………….PASS 7: Checking Zend Framework path……………………………………..PASS 8: Checking Zend Framework version (1.10.5)…………………………..PASS 9: Checking SOAP extension………………………………………….PASS 10: Checking DOM extension…………………………………………..PASS 11: Checking SimpleXML extension……………………………………..PASS 12: Checking libXML extension………………………………………..PASS 13: Checking your IP address (110.139.12.46)…………………………..PASS 14: Checking your city (Surabaya)…………………………………….PASS 15: Checking your region (Jawa Timur)…………………………………PASS 16: Checking your country (Indonesia)…………………………………PASS 17: Checking backend WSDL (-1.00s)……………………………………FAIL 18: Checking backend credentials are defined…………………………..PASS 19: Logging into backend service (1.58s)………………………………PASS One or more tests failed. The web server environment, in which this script is running, does not meet the requirements for Zend_Service_LiveDocx_*.
I got script above, what is it mean??
thankz before..
August 6th, 2010 at 10:12
Dear Jonathan,
When uploaded check-environment.php in my web server it is giving the following error:
Warning: require_once(Zend/Date.php) [function.require-once]: failed to open stream: No such file or directory in /home/safeactt/public_html/Helper.php on line 25
Fatal error: require_once() [function.require]: Failed opening required ‘Zend/Date.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/safeactt/public_html/Helper.php on line 25
You can check it here:
http://www.safeact-training.com/check-environment.php
Please let me know where I am going wrong.
Thanks,