WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a form within a Meta Box on the 'Add New Page' screen.

I want the data from this form to be sent to an OData service on a central server.

I can see that OData is supported on PHP (http://odataphp.codeplex.com/) but it requires the OData for PHP SDK to be installed on the server. Because the server could be Windows/UNIX/LINUX/other I don't know if I can create a generic installation file to make it transparent for the user to install my plugin.

What would be the best method of doing this?

share|improve this question
How can your plugin work on WordPress.com when WordPress.com does not support 3rd party plugins? Also OData is a large and complex service: odata.org/developers/protocols/operations Which specific operations are you trying to support? Please give us your use-case so we can better understand what you are asking – MikeSchinkel Jan 9 '11 at 18:41
This is my 1st plugin, I didn't realise that wordpress.com doesn't support 3rd party plugins. Thanks for the info! I want users to complete a form (within a meta box on the 'Add new post' page) which will give details of cars. When they add the post, the form data will be displayed in their post and also submitted (via OData) to an OData service on a public server. The server will then process the data and display it on a website. – Techboy Jan 9 '11 at 21:29
If you have general questions about writing a plugin, ask them. If you have specific questions about making use of ODdata, than you've asked your question on the wrong site. Please check the FAQ. – hakre Jan 10 '11 at 13:20
@hakre This question is valid. I am asking how I can embed the OData SDK within my WordPress plugin. I do know how I want to use OData, I only explained the intended usage of it in my above comment because @MikeSchinkel asked for the use case – Techboy Jan 10 '11 at 20:10
Thanks for the clarification. You can embed the OData SDK with wordpress just like with anything PHP. Install, Configure, done. – hakre Jan 11 '11 at 10:31
up vote 2 down vote accepted

So basically what you're asking is how to create a php-based installer for the OData SDK, right? Or how to somehow package it with your plugin?

First I thought you could just include the whole framework in your plugin folder, and include it directly from there. But it turns out (from reading the install docs) that installation of the SDK requires some actual changes to the php ini outside of just adding the include path, and the SDK itself has several dependencies (php-xml, php-xsml, curl modules).

In short, I don't think you can do this effectively with a php-based installer. And I don't know of any WordPress-specific bundling techniques that help.

My best advice is: find another way to do the remote logging that doesn't rely on OData. For example, build a simple REST service on your centralized server that can be hit using wp_http.

If you NEED to use OData for some reason, simply make it a prerequisite for your plugin. Find a way to test for its existence, and spit out a warning that says "you need the OData SDK" if it isn't installed.

If none of that helps, try contacting folks who work on the OData SDK (http://odataphp.codeplex.com/team/view). Distributing this software isn't really an issue that's specific to WordPress... they may have better general advice for making a portable php-based installer.

share|improve this answer
Thank you for the good answer. I don't want to have to rely on people having the OData SDK already installed (because my intended audience won't be that technical) so I will look at using REST with wp_http. I will also ask on odataphp.codeplex.com/team/view. Thanks. – Techboy Jan 11 '11 at 7:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.