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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:37:19+00:00 2026-05-25T13:37:19+00:00

What i need to do if next code gives me seg fault ? $handle

  • 0

What i need to do if next code gives me seg fault ?

    $handle = opendir("ssh2.sftp://$sftp".'/usr/bin/');
    $file = readdir($handle);
    closedir($handle);

where $sftp is

    $this->_connection = ssh2_connect($this->_server, 22);
    if($this->_authType==ExportInterface::CONN_AUTH_KEY) {
        ssh2_auth_pubkey_file($this->_connection,$this->_user,$this->_key,$this->_privateKey);
    } else {
        ssh2_auth_password($this->_connection,$this->_user,$this->_password);
    }
    $sftp = ssh2_sftp($this->_connection);

Connect work well. and segfault is when only i use readdir function.

  • 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-25T13:37:20+00:00Added an answer on May 25, 2026 at 1:37 pm

    A seg(mentation) fault is an internal error in php or the SSH/SFTP extension. You should file a bug against the extension in question.

    Don’t forget to include a short, reproducible example. Since this may be only reproducible with your specific combination of ssh client and server, you should reproduce the bug first in a brand-new VM and record every step you make, like this:

    1. Install Ubuntu 11.04 amd64 in the VM
    2. Install ssh with $ sudo apt-get install ssh
    3. Configure ssh with …
    4. Install php with $ sudo apt-get install php5-cli
    5. Copy the script [link to http://pastebin.com/ here] to the VM
    6. Type php ssh-segfault.php and receive a segfault.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need property name in my app and I use next code to get
This following code gives me the error below . I think I need InvokeRequired
I need to create next and previous link urls here's a sample <a href=/calendar/2009/10/>previous</a>
I need to align two divs next to each other, so that each contains
In my next rails project I'm going to need blogging functionality. I'm wondering whether
i need a pop up window which asks me before proceeding to next like
I need to call a method I have defined as: -(IBAction)next:(id)sender{ ... } I
I have the next problem: I need to process only 1 request at a
I need replace slide effect to fade-out/fade-in effect on the prev and next slide
Over the next few months, we need to consider the best technology/technique for periodically

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.