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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:47:49+00:00 2026-06-15T13:47:49+00:00

shell_exec(traceroute IPaddress) returns traceroute to IPaddress (IPaddress), 30 hops max, 40 byte packets How

  • 0

shell_exec("traceroute IPaddress) returns traceroute to IPaddress (IPaddress), 30 hops max, 40 byte packets

How do I retrieve the actual list of hops so I can tell where a problem occurs?

  • 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-06-15T13:47:50+00:00Added an answer on June 15, 2026 at 1:47 pm

    Those messages are supposed to be written to stderr instead of the regular stdout, so I’m not too sure why you’re seeing them appear in the output.

    Instead of shell_exec() I would recommend using exec() because it captures both the output AND the return code of the process:

    exec('traceroute example.com 2>&1', $out, $code);
    if ($code) {
        die("An error occurred while trying to traceroute: " . join("\n", $out);
    }
    print_r($out);
    

    To speed up the command a little you could use the -n option when you run traceroute to avoid having to do DNS lookups for the intermediate hops.

    Note that running traceroute can take a while; if you run it on the command line you can sometimes see lines with * * * in them, which can take ages!

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

Sidebar

Related Questions

It seems like I can't use shell_exec or proc_open on my shared server. The
echo shell_exec(ll); Why doesn't php show me a list of files and directories when
I was experimenting with shell_exec and commands, and I can't seem to get this
You can do this if the file is a file in the filesystem: shell_exec("file
I'm trying to limit the max execution time of shell_exec in PHP to say
I have the following PHP code: shell_exec((traceroute odesk.com > trace.txt;echo 'traceIsDone'>>trace.txt) &); This line
When I execute my command in PHP with shell_exec it always returns an empty
shell_exec and exec are not returning any content. I can't figure out what's wrong.
I have a problem with running lame encoder via shell_exec script in php. And
You can easily use exec() or shell_exec() to execute a system command, like ls

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.