Mongodb 500 Internal error

Mongodb 500 Internal error

panpanshpanpansh Posts: 14Questions: 0Answers: 0
edited October 2012 in General
Hello Allan,
I'm decided to use a database where my data is stored now :)
I use this php script http://datatables.net/development/server-side/php_mongodb in order to get the rows.
On localhost with mongodb on localhost too .. it works.
but when I use a distant mongodb like : $m = new Mongo('mongodb://mongo-1:27017');
(no user ... no password ... it's normal)
I get a 500 internal server error from my apache ... the connection looks good ..
But with phpMoAdmin (on the same apache server) I can see the datas ...

Please you can help me ?

Replies

  • allanallan Posts: 63,262Questions: 1Answers: 10,423 Site admin
    Not really - I now next to nothing about MongoDB and this isn't a DataTables issue. I'd suggest asking on StackOverflow or similar.

    Allan
  • panpanshpanpansh Posts: 14Questions: 0Answers: 0
    Ok thanks Allan for your rapidity ;)
  • panpanshpanpansh Posts: 14Questions: 0Answers: 0
    Ho sorry Allan :
    It's due to Memory limit because I have many rows ...
    in the apache logs : /var/log/apache2/error.log
    I have : PHP Fatal error: Allowed memory size ...
    In php.ini modify : memory_limit = XXXM .. and restart apache.
    or
    In .php file directly ... add on top, after php declaration : ini_set("memory_limit","XXXM");
    this can help others ;)
    thanks
  • panpanshpanpansh Posts: 14Questions: 0Answers: 0
    Hi Allan,
    you know how to filter the return of php script like this ? :
    [code]
    $fields = array('date' => true,'class' => true, 'header' => true WHERE 'header' == 7585);
    [/code]
    Filter directly with a WHERE like directive for mongo ... not with the filtering feature of datatables.
  • allanallan Posts: 63,262Questions: 1Answers: 10,423 Site admin
    This is not a PHP forum, but specifically a forum for DataTables. I'd suggest you ask your question in a PHP forum or StackOverflow or similar.

    Allan
This discussion has been closed.