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 7046579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:40:03+00:00 2026-05-28T02:40:03+00:00

OS: ubuntu 11.10 Webserver: Apache Code: PHP Hello I am trying to exec a

  • 0

OS: ubuntu 11.10
Webserver: Apache
Code: PHP

Hello I am trying to “exec” a C code through PHP web page. When I run the same C code directly on terminal, it works fine, but when I “exec” it through PHP, I get a segmentation fault.

Any idea why such behavior? My C code is doing small “malloc”s at a few places. The code never the less works fine on directly executing through terminal using ./a.out

Is there a way for me to gdb the C code, when PHP tries to execute it?

Thanks

  • 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-28T02:40:03+00:00Added an answer on May 28, 2026 at 2:40 am

    Hard to tell without actually seeing the code. Are you sure your program doesn’t leak? Are you able to add some debug console output to see when/where it crashes? Does your program try to access any ressources (like files, ports, etc.)? Are there sufficient rights for the web server’s user (or whoever runs the php script) to actually execute it properly?

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

Sidebar

Related Questions

OS: ubuntu 11.10 Webserver: Apache Code: PHP I am trying to display the output
While using PHP cli in ubuntu i got apache as web server i cant
I have an apache web server running on my ubuntu server box. Recently, I
An Apache 2.x Webserver with default configurations from the ubuntu/debian repositories will use the
My web server is running Ubuntu 10.04. I want to use PHP in conjunction
I've recently setup my Ubuntu web server with exim4 so my PHP website applications
I am running Ubuntu with an Apache webserver with Mod_python. The root directory of
ubuntu 9.04, fedora 11, redhat... what are the differences from a web server/development standpoint?
Ubuntu has 8 run levels (0-6 and S), I want to add the run
My Ubuntu server has Apache and Subversion installed. I use this server as a

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.