Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6348697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:28:12+00:00 2026-05-24T21:28:12+00:00

Sorry this is a total newb question but there is this really great C-library

  • 0

Sorry this is a total newb question but there is this really great C-library available and I would like to call functions from it using php. However I have a linux server. Here are the specs:

  • Apache version 2.2.17
  • PHP version 5.2.17
  • MySQL version 5.1.56-community-log
  • Architecture x86_64
  • Operating system linux
  • Kernel version 2.6.32-29.1.BHsmp

Would I be able to call the functions from the C-library in php (ex. using php exec()) if the C-library is on the linux server? If so does the library need to be re-compiled using gcc?

Thanks much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:28:13+00:00Added an answer on May 24, 2026 at 9:28 pm

    With those specs. you basically have two options.

    1. Create a wrapper library which acts as a PHP extension which enables you to call your C-functions directly from PHP, for example mylib_awesome_func('hello');

    2. Create a command line utility which acts as an interface to your C library and then call this tool with exec() in PHP.

    Option one could be considered more “clean” but is definitely harder, whereas option two may be very easy but may in some cases not be possible depending on what kind of data needs to be transmitted/manipulated back and forth to and from the library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry if this is a really basic question but it's been really getting to
Sorry if this is a total noob question, but I wanted to try to
Sorry this is a basic question, but all my research just barely missed answering
sorry this is such a simple question but I can't figure it out. How
Sorry if this question is too vague, but I'd rather not muddy it's point
Sorry for this long post. The question is however small but requires full detail.
Sorry if this is too obvious, but I am a total newcomer to lua,
I'm sorry if this is really basic, but: I feel at some point I
I'm really sorry to do this, but this problem represents a possibly exploitable security
sorry if my question kind of doesn't make sense but i am total confused

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.