This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » [eZ 4.7]Problem with the package import

[eZ 4.7]Problem with the package import

[eZ 4.7]Problem with the package import

Wednesday 08 April 2015 3:07:53 pm - 7 replies

Hi all,


I have some trouble with the package import.

My website run on a Debian Jessie OS with an eZ Pubilsh Community Project 2012.6 distribution.

I need to import packages and I can't.



If I try with GUI method on backoffice, I select the package to import, I click on "Import package" button. When button was clicked, I stay on my page but the selected file for import is now empty ...


If I try with CLI method, I've got this message :

Could not import package <my_package>, invalid package file


I have the same website, with the same eZ on a Debian squeeze and everything is ok (for CLI and GUI) with the same package (same cli command and same package path).

That's why I think my trouble is with my Debian distribution, but I can't change it.


Does someone ever had a problem like this ?

Modified on Thursday 09 April 2015 10:14:33 am by Patrick P.

Wednesday 08 April 2015 4:16:00 pm

Please have a look here.

Wednesday 08 April 2015 4:36:10 pm

Hi Carlos,

I've ever try it, but nothing changed.

Thursday 09 April 2015 5:36:47 am

Hello Patrick,

Can you explain a little more detail about where you got this package, what version of eZ Publish created it, what it contains, etc? Also remember that package imports usually fail by default unless the package was created by the exact same version of eZ Publish being used to import.

In truth the package system contains so many use case specific gotchas and limitations you have to use it a lot to learn how to use it the right way to avoid potential problems. Many developers avoid it entirely for these and other historical reasons.

I say this having contributed key kernel package mission critical bugfixes, way too much time studying the code and extensive testing over many many years. All that said the systems have gotten improvements over the years and not entirely abandoned but then again their is a reason why this functionality is not built upon more by other users ... like the historical tar limit issue that was avoided for years indirectly.

Perhaps if you share more information about what your trying to do exactly we can make more positive suggestions!

I hope this helps!


Thursday 09 April 2015 10:14:05 am

Hello Heath,


On Jessie or Squeeze, it's exactly the same website (it's a dump from Squeeze to Jessie).

This is my basical config (but I've not the hand on it)


## Squeeze

- eZ Publish : Community Project 2012.6 (Community Project 2012.6)

- PHP : 5.3.3-7

- Apache : 2.2.16

- MySQL : 5.1.73-1



## Jessie

- eZ Publish : Community Project 2012.6 (Community Project 2012.6)

- PHP : 5.6.2-1

- Apache : 2.4.10

- MySQL : 5.5.39-1



My package contain two object classes (2 custom forms). It's was created by a third eZ site which run on a Squeeze.

I can import this package on my Squeeze's eZ site, but not on my Jessie's eZ site. (CLI & GUI)

After this fail, I tried to import an "official" eZ Package downloaded on (ezwebin_design_blue) and the result is the same.

If I try an import with GUI method, I select my ezpkg, I click on "Import Package" and my selected ezpkg disappears leaving the field empty. When this happens, I've this error message in debug toolbar : Failed loading temporary package Uploaded file is not an eZ Publish package. 

If I try with CLI method, I've got this error : Could not import package <my_package>, invalid package file.




I hope I'm more explicit this time, I going to check all the package loading process, but I begin to be short of ideas ...




[ EDIT ]

I analysed the package loading process with adding some logs from ezpm.php & ezpackage.php

In ezpackage.php there is this function :

 static function fetchDOMFromFile( $filename )
        if ( file_exists( $filename ) )
            $dom = new DOMDocument( '1.0', 'utf-8' );
            $dom->preserveWhiteSpace = false;
            $success = $dom->load( $filename );          
            if ( !$success )
                return false;
                return $dom;
        return false;


If I do a CLI import on Squeeze, this function return $dom

If I do the same CLI import on Jessie, this function return false cause file_exists($filename) is false.


At the entry of function $filename is not null. His value is like "var/ezflow_site/cache/packages/import/870822689/package.xml".


Modified on Thursday 09 April 2015 3:50:19 pm by Patrick P.

Thursday 09 April 2015 4:12:31 pm

Hello Patrick,

Right off the bat I see exactly what your first major problem is, your php version.

The php upgrade your doing will require an eZ Publish upgrade to support 5.4+ aka 5.6!

I recommend you upgrade to the 2014.11 build or else much of eZ Publish by default will not work correctly and be very hard to troubleshoot.

I like your development edit of your last post to show your debugging the code execution process, good job! Based on your comments you may wish to check to ensure your permissions in the failing test case allow you to write out the file in question so that it can even be written to disk and can be read both by the webserver user and the user executing the php cli manual import. It might also be failing also further up the call chain (and not writing out the file to disk).

That said in general you will be chasing your own tail until you upgrade eZ properly as the community build your using was not designed to run on anything past 5.3 and core kernel problems prevent eZ from functioning normally on 5.4+

I hope this helps!


THEME: KFlay - Wishing It Was You, 

Modified on Thursday 09 April 2015 4:13:53 pm by // kracker

Friday 10 April 2015 9:21:21 am

Hello Kracker

 your comment is really helpfull.

I tried to upgrade to eZ 5.4 and all my problems were solved (yes,  there were other small bugs x) )


Thank you !

Friday 10 April 2015 5:30:00 pm

Hello Patrick,

I'm glad you solved the problem!

Also glad you listened to me when I told you that you needed an upgrade for eZ to run correctly on the jessie server!

You would not believe how many people refuse to believe me, understand or even try to upgrade when we say it's required. In the end many suffer needlessly when they refuse to do the upgrades when they are required, ehh .. but not you man, your one of the good ones!

Good luck with the small bugfixes, I'm sure you'll solve those too.

Take it eZ!


THEME: KFlay - Bad Things :


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from