Mongodb 500 Internal error
Mongodb 500 Internal error
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 ?
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 ?
This discussion has been closed.
Replies
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
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.
Allan