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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:07:31+00:00 2026-06-08T18:07:31+00:00

I am having a problem with my PHP process crashing whenever I try to

  • 0

I am having a problem with my PHP process crashing whenever I try to connect to MongoDB from inside PHP.

    $options = array(
        'replicaSet' => false,
        'persist' => false,
        'connect' => false,
        'username' => false,
        'password' => false
    );

    $mongo = new \Mongo('mongodb://localhost:27017', $options);

The following php-cli code works fine though:

$ php -a
php > $mongo = new \Mongo('mongodb://localhost:27017');
php > var_dump($mongo);
object(Mongo)#1 (4) {
  ["connected"]=>
  bool(true)
  ["status"]=>
  NULL
  ["server":protected]=>
  string(25) "mongodb://localhost:27017"
  ["persistent":protected]=>
  NULL
}

However, there is nothing in the PHP error log when this happens (If I throw an exception right before it, that exception is logged). However, the FPM and syslogs catch the following entries. It’s as if PHP just flips out and crashes before anything can be logged.

php5-fpm.log: WARNING: [pool www] child 9261 exited on signal 11 (SIGSEGV)
after 57.894803 seconds from start


syslog: localhost kernel: [12191.961070] php5-fpm[9261]: segfault at 8 ip 
00007f5329b1b371 sp 00007fff37343b68 error 4 in libc-2.13.so[7f5329a97000+197000]
  • PHP Version 5.3.6-13ubuntu3.8 (API 20090626)
  • MongoDB 1.2.10 extension
  • Suhosin v0.9.32.1

How can I debug what appears to be an actual bug?

Update:

I just upgraded my OS to ubuntu 12.04 LTS

  • PHP Version 5.3.10-1ubuntu3.2 (API 20090626)
  • MongoDB 1.2.12 extension
  • Suhosin v0.9.33

However I still have the problem.

syslog: kernel: [ 6727.997940] php5-fpm[9012]: 
segfault at 8 ip 00007f1fdf8cab91 sp 00007fff7f07a4a8 error 4
in libc-2.15.so[7f1fdf842000+1b3000]
  • 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-08T18:07:32+00:00Added an answer on June 8, 2026 at 6:07 pm

    It seems that the problem lay with Mongo’s handling of my $options array.

    $options = array(
        'replicaSet' => false,
        'persist' => false,
        'connect' => false,
        'username' => false,
        'password' => false
    );
    
    $mongo = new \Mongo('mongodb://localhost:27017', $options);
    

    Crashes the process while the following works

    $options = array(
        'replicaSet' => false,
        'persist' => false,
        'connect' => false,
        //'username' => false,
        //'password' => false
    );
    
    $mongo = new \Mongo('mongodb://localhost:27017', $options);
    

    Basically, don’t pass a username or password unless you need too. I guess this really is a bug.

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

Sidebar

Related Questions

I'm having a problem with php's for loop. The loop iterates too fast and
I'm having a problem with a PHP website running on IIS 7 on Windows
I am having one problem with the PHP json_encode function. It encodes numbers as
I am having a problem with setting cookie with php. I am trying to
I'm having a problem with a query prepared in PHP with PDO. The code:
I'm having a problem with some code that used to work in PHP 4.X
I'm having a problem right now with a function we're using in PHP to
I'm having a problem with my ajax call. I'm submitting some info via php
I'm having a problem installing SAM 1.1.0 on fedora 16 same as here https://bugs.php.net/bug.php?id=59632&thanks=6
Well. I'm having a problem with the eval(); function in PHP. I don't quite

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.