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 Publish API is not working

ez Publish API is not working

ez Publish API is not working

Wednesday 06 April 2011 4:13:45 pm - 3 replies

Hi All, i am using eZ Publish API in one my custom PHP script. when browsing it is giving an error on UAT server. it is working fine locally so no issue with script. Can you please let me know what setting we need to do to run eZ API from PHP page. Thanks Brijesh

Wednesday 06 April 2011 6:05:48 pm

Hi Brijesh,

How did you integrate your PHP script ? Embedded in an eZ Publish module for instance ? Also, what errors do you get, concretely ?

Let us know,

Thursday 07 April 2011 11:06:36 am

I assume what your trying to do is using eZ Publish classes (the word API is a bit misleading here as we don't have a public api yet in a SDK sense, so API in this context refers to general classes in eZ Publish) outside of the eZ Publish context.

In this context there are two issues:

  1. The autoloader in eZ Publish assumes it is at the root.
  2. Not all classes are autoloaded yet, at least datatypes are left and might be other places as well. This is a long term process getting rid of all artifacts from the php4 era.

Both can maybe be worked around by changing current working directory* before you include autloader and start using classes, but there are no guarantees of it though.
* Just adding include path would be enough for class loading, but to make sure misc cache and filesystem code don't break changing cwd is probably better.

Modified on Thursday 07 April 2011 11:09:09 am by André R

Sunday 10 April 2011 9:16:19 am

Thanks, We will check it out.


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

36 542 Users on board!

Forums menu

Proudly Developed with from