3 Replies - 1642 Views - Last Post: 21 April 2011 - 07:10 AM Rate Topic: -----

#1 olibenu  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 45
  • View blog
  • Posts: 537
  • Joined: 31-December 08

c++ shared library to php extension

Posted 21 April 2011 - 02:40 AM

I've written a shared library (lib*.so) in c++ and would like to use it in a website.
I'm not a PHP programmer, but i've seen a howto.
My webhost runs Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635.
I do not know what this means but:
1. Can I create my own php extensions when another party is hosting my web pages
2. If I can, is the above server compatible with what I'll do (it seems to me it runs windows, and my library is in linux)
3. Is the extension writing a job for a php developer or c++ developer (from what i see in the howto above it seems to demand knowledge of both languages)

Is This A Good Question/Topic? 0
  • +

Replies To: c++ shared library to php extension

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3633
  • View blog
  • Posts: 5,755
  • Joined: 08-June 10

Re: c++ shared library to php extension

Posted 21 April 2011 - 03:25 AM

Hey.

I know little about building extensions (nothing, really), but I can tell you that most hosts will be hesitant about including custom extensions. It's always kind of risky. - I would at least make sure they will before you spend a lot of time on it.

Also:

Quote

(it seems to me it runs windows, and my library is in linux)

"Apache/2.2.17 (Unix) ..." B)
Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 5949
  • View blog
  • Posts: 23,207
  • Joined: 23-August 08

Re: c++ shared library to php extension

Posted 21 April 2011 - 05:13 AM

Yes it demands knowing both languages, primarily C++. Whether your host will allow you to host your own extensions is a question for them. If you write your PHP extensions without any OS-specific functions it should probably run on any system.
Was This Post Helpful? 1
  • +
  • -

#4 sas1ni69  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 85
  • View blog
  • Posts: 431
  • Joined: 04-December 08

Re: c++ shared library to php extension

Posted 21 April 2011 - 07:10 AM

You will need to write the extension in C++ and to use it on a PHP interface.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1