Using phpLiveDocx with ZendCore for i5

General discussion on Zend Core for IBM System i
Post Reply
tfranke
Posts: 23
Joined: Wed Mar 25, 2009 10:54 am
Location: Essen, Germany

Using phpLiveDocx with ZendCore for i5

Post by tfranke » Tue Apr 21, 2009 7:59 am

Hi,

I want to use phpLiveDocx http://www.phplivedocx.org/to convert an RTF file to pdf.
After installing the system I tried to modify the includes converter sample to run as a webside:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
		          "http://www.w3.org/TR/html4/loose.dtd">
		<meta http-equiv="content-language" content="de">
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<HTML>
		<head>
		<title>PDF Dokument erzeugen</title>
		</head>
		<body>

<?php

require_once dirname(__FILE__) . '/../../common.php';
require_once 'Converter.php';


// -----------------------------------------------------------------------------

$filename = 'document.doc';  // file to convert
$format   = 'pdf';           // format to which to convert

// -----------------------------------------------------------------------------

$targetFilename = Converter::getFilename($filename, $format);

echo 'Converting %s to %s... ', $filename, $targetFilename;

$targetDocument = Converter::convert($filename, $format);

if (false !== $targetDocument) {
    file_put_contents($targetFilename, $targetDocument);
    print("DONE.\n");
} else {
    print("ERROR.\n");
}

?>
</body>
</html>
When I "start" the skript it runs some seconds and the the browser wants me to Save the convert-document2.php Skript instead of displaying it. Other PHP-Skripts run without problems. If I remove the line with

Code: Select all

$targetDocument = Converter::convert($filename, $format);
the skript runs normal (with output in the browser window), but (as expected) don't convert anything.
Does anybody has an idea what the problem could be here?
The PHP-errorlog doesn't show anything.
I also tried the telephone bill sample in the same way, but it doesn't do anything.....

Thanks for any ideas....

Greetings
Thorsten

tfranke
Posts: 23
Joined: Wed Mar 25, 2009 10:54 am
Location: Essen, Germany

Re: Using phpLiveDocx with ZendCore for i5

Post by tfranke » Tue Apr 21, 2009 1:06 pm

After conversing with the phpLiveDocx support they suplied me with another version of the toolkit.

This version now leads to another error, with seems to be a specific "Zend Core for i5 Problem". When I start the scipt now it runs for some time and then the server returns:
Proxy-Fehler -
> Der Proxy-Server hat eine ungültige Antwort von einem übergeordneten Server empfangen.
>
> Verarbeitung der Anforderung durch Proxy nicht möglich für GET
> /phplivedocx/samples/mail-merge/convert/convert-document2.php
>
> Grund: Beim Lesen der Daten vom fernen Server (127.0.0.1) ist ein Fehler aufgetreten.
Any idea how to solve this?

Greetings
Thorsten

tfranke
Posts: 23
Joined: Wed Mar 25, 2009 10:54 am
Location: Essen, Germany

Re: Using phpLiveDocx with ZendCore for i5

Post by tfranke » Thu Apr 23, 2009 10:49 am

Problem solved!

The problem was an old version of "Zend Framework" on our i5. We had 1.6 installed and phplivedocx seems to need something newer.
After installing the 1.7.8 on our i5 it runs without problem.

Greetings
Thorsten

Post Reply