Forum How do I...?

Prince XML stopped working after upgrading to PHP 7.0


I just upgraded our server's PHP version from 5.6 to 7.0.

Today I discovered that after the upgrade, Prince does not work any longer.

I just downloaded the latest PHP wrapper for Prince and also updated Prince to the latest version and it's still not working.

What's happening is that the entire program just hangs after calling this line:


There are no errors, it just hangs until I refresh the page.

I followed the PHP wrapper file and found that it hangs at the "$line = fgets($pipe);" as shown below (line 1098 in the PHP wrapper class)

  private function readMessages($pipe, &$msgs, &$dats)
        while (!feof($pipe))
            $line = fgets($pipe);

When printing the contents of $pipe, I get "Resource id #800"

If you could please help us solve this, that would be greatly appreciated!

Thank you,

- Dmitri

Edited by dmitrip

This may be an instance of an issue that has been reported a couple of times without resolution, so I would very much like to identify and fix this if we can!

Would you be able to confirm that Prince runs successfully from the command-line on the same server with the same input file?

It may help to email me ( as we have prepared a checklist to narrow down the problem which may involve sending a few log files back and forth.
This issue is now fixed in Prince 11.3, thanks to Dmitri's considerable assistance and patience! :D
Thank you Mike for all your hard work! We really appreciate it! :)