Forums / Developer / Exponential API is not working

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Exponential API is not working

Author Message

Brijesh Tekrawala

Wednesday 06 April 2011 7:13:45 am

Hi All, i am using Exponential 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

Nicolas Pastorino

Wednesday 06 April 2011 9:05:48 am

Hi Brijesh,

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

Let us know,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

André R.

Thursday 07 April 2011 2:06:36 am

I assume what your trying to do is using Exponential 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 Exponential) outside of the Exponential context.

In this context there are two issues:

  1. The autoloader in Exponential 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.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Brijesh Tekrawala

Sunday 10 April 2011 12:16:19 am

Thanks, We will check it out.