Forum

Need some help? Ask our community for its assistance!

You are not logged in.

#1 12-11-2012 15:01:12

mrladeia
Membre
Registered: 12-11-2012
Posts: 2

MongoDB PHP - php_mongo - extension=mongo.so

To make things right, you must install php_mongo module. Here for installation documents on PHP.net.

http://mrladeia.alwaysdata.net/rockmongo/

php_mongo module is active?

Offline

#2 12-11-2012 15:44:23

@Cyril
Staff
From: Paris
Registered: 06-02-2007
Posts: 5,666
Website

Re: MongoDB PHP - php_mongo - extension=mongo.so

Hello,

It's not preinstalled, but you can install it yourself in your own account.

Offline

#3 12-11-2012 16:04:12

mrladeia
Membre
Registered: 12-11-2012
Posts: 2

Re: MongoDB PHP - php_mongo - extension=mongo.so

I tried doing the following:

$ wget https://github.com/mongodb/mongo-php-driver/archive/master.zip
$ unzip master.zip
$ cd mongo-php-driver-master/
$ phpize
$ ./configure
$ make install

When did the "make install" appeared before other things and in the end it appeared:

----------------------------------------------------------------------
Libraries have been installed in:
   /home/mrladeia/mongo-php-driver-master/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Installing shared extensions:     /usr/lib/php5/20090626/
cp: cannot create regular file `/usr/lib/php5/20090626/#INST@3864916#': Permission denied
make: *** [install-modules] Error 1

How can I install?

Offline

#4 12-11-2012 17:00:38

@Cyril
Staff
From: Paris
Registered: 06-02-2007
Posts: 5,666
Website

Re: MongoDB PHP - php_mongo - extension=mongo.so

Skip the 'make install' step. The .so is already compiled and is located in the 'modules' directory. Just add the extension to your php.ini:

extension=/home/youraccount/path/to/mongo.so

Offline

#5 15-11-2012 12:19:58

lipaonline
Membre
Registered: 14-11-2012
Posts: 39

Re: MongoDB PHP - php_mongo - extension=mongo.so

Sorry for the newbie question wink

Why don't you add mongo.so somewhere for all clients ? ( and we just to add directive on php.ini)

2nd question:

a REST API acces is on your roadmap ? (can you add it ? smile

Offline

#6 15-11-2012 12:26:20

@Cyril
Staff
From: Paris
Registered: 06-02-2007
Posts: 5,666
Website

Re: MongoDB PHP - php_mongo - extension=mongo.so

Adding mongo.so (and many others) is planned, but we basically have to do many low-level changes to do it properly.

The REST API will be available... by the end of the day smile Stay tuned!

Offline

#7 15-11-2012 12:47:07

lipaonline
Membre
Registered: 14-11-2012
Posts: 39

Re: MongoDB PHP - php_mongo - extension=mongo.so

I'll (re)start to believe in Santa Claus ! wink

Offline

#8 16-11-2012 12:40:07

lipaonline
Membre
Registered: 14-11-2012
Posts: 39

Re: MongoDB PHP - php_mongo - extension=mongo.so

Cyril wrote:

Skip the 'make install' step. The .so is already compiled and is located in the 'modules' directory. Just add the extension to your php.ini:

extension=/home/youraccount/path/to/mongo.so

before 'make install', modules repertory is empty...

after, it's ok , mongo.so is there smile

i will try to use it soon.. smile

Offline

#9 16-11-2012 15:53:30

lipaonline
Membre
Registered: 14-11-2012
Posts: 39

Re: MongoDB PHP - php_mongo - extension=mongo.so

Hi mrladeia,

RockMongo works for you ?

i put this on config.php:
$MONGO["servers"][$i]["mongo_name"] = "mongodb1.alwaysdata.com";//mongo server name
$MONGO["servers"][$i]["mongo_host"] = "46.105.78.233";//mongo host
$MONGO["servers"][$i]["mongo_port"] = "27017";//mongo port

and got this errors sad

Deprecated: Function Mongo::setSlaveOkay() is deprecated in
/home/***/rockmongo/app/models/MServer.php on line 240
Execute failed:db assertion failure
function (){ return db.getCollectionNames(); }

Offline

#10 24-01-2019 15:01:37

seamus10
Membre
Registered: 24-01-2019
Posts: 1

Re: MongoDB PHP - php_mongo - extension=mongo.so

mrladeia wrote:

To make things right, you must install php_mongo module. Here for installation documents on PHP.net.

http://mrladeia.alwaysdata.net/rockmongo/

php_mongo module is active?

I earlier had this issue while installing. Checked with other threads too, but could not able to find a proper solution in my case.
FluxBB bbcode test

Offline

#11 24-01-2019 15:18:43

@Héloïse
Staff
Registered: 03-03-2016
Posts: 393

Re: MongoDB PHP - php_mongo - extension=mongo.so

Hello,

This discussion isn't up to date. You can contact us by ticket for this kind of issue.

To add a PECL extension to your account, you can use the following command in SSH:

ad_install_pecl <extension_name>

Offline

Board footer

Powered by FluxBB