MongoDB PHP driver can't installed Centos 6 cloud server - php

I have installed MongoDB service in my Centos 6 cloud server. Now i need to install in my server php-pecl-mongo-1.2.10-1.el6.remi.x86_64.rpm... but it gives "packages not found". Can anyone fix this problem? My php version is PHP 5.3.3.
I am using putty for configuring Centos 6 server. I have admin privilege to configure php.ini.

You could:
try RPM installing php-pecl-mongo without a specific version
point to a specific RPM url for installation, eg. using rpmfind.net => php-pecl-mongo
install using sudo pecl install mongo per the Unix installation instructions

Related

Configure openldap CentOS 6.5 PHP --with-ldap failing

I am using and trying to configure the below things:
CentOS 6.5
Apache 2.4
PHP 5.6 --with-ldap
Found an error ldap not found.
yum list installed | grep openldap
shows openldap installed:
openldap.x86_64 2.4.40-16.el6 #base
Please suggest
Why trying to build from sources, when binary packages exists ?
See PHP Configuration Tips, initially written for CentOS 7 but suitable for CentOS 6 using the httpd24 collection.
See section 2 about Running a recent PHP version.
The ldap extension is available in the repository.

Install mongo php driver centos 6.6

I have a cloud hosted VPS with Centos 6.6 + Direct Admin + PHP 5.6.6 installed by my hosting provider.
I need to have the MongoDB php driver installed to connect to an external mongoDB.
I tried the following installations:
http://www.liquidweb.com/kb/how-to-install-the-mongodb-php-driver-extension-on-centos-6/
http://andres.jaimes.net/876/setup-mongo-php-module-centos-6/
install-mongodb-php-driver-in-centos-6-3 at madcoda com
Also yum --enablerepo=remi,remi-php56 php-pecl-mongo does not do the trick
I have in /usr/lib64/php/modules/ the following modules:
bz2.so, calendar.so, ctype.so, curl.so, exif.so, fileinfo.so, ftp.so, gettext.so, iconv.so, json.so, mongo.so, phar.so, sockets.so, tokenizer.so, zip.so
And in /etx/php.d/ the .ini files that are created for each module.
Installing mongo php driver on an old vps with centos 5.x was not a problem also not on Centos 6.2 with php 5.5.
In these cases the mongo.so was located in the location /usr/local/php/lib/php/extensions/no-debug-non-zts-xxxxxx/ and had to add it manually to the php.ini
The hosting provider is not supporting any else than the default installation I got.
I really appreciate any help.
Stan
I found the solution in the comment of this answer https://serverfault.com/questions/589877/pecl-command-produces-long-list-of-errors
PEAR had to be reinstalled from the remi-php56 repo because of PHP 5.6 running on the server.
After that I could use pecl install mongo and copy the mongo.so to the /usr/local/php/lib/php/extensions/no-debug-non-zts-xxxxxx/ folder.
# php -m | grep -i mongo > mongo is running

Laravel Is php-mcrypt necessary for https and Auth?

Everything is in the title : can I use https and the Auth:: class whithout having installed php mcrypt ? (I'm on a redhat enterprise linux 6.1 on architecture s390x, it's just impossible to find pre-compiled packages).
If it's possible then I would just use Laravel whithout Mcrypt...
mcrypt is a requirement of Laravel, you simply cannot run a laravel app without having mcrypt installed.
The following link may help with installing mcrypt:
http://injustfiveminutes.com/2012/11/23/install-php-mcrypt-extension-on-rhel-6/
Excerpt:
The php-mcrypt extension is not available on Redhat Enterprise Linux 6
although some applications such as Magento or phpMyAdmin require it to
work properly. We can easily install it though from the Fedora Project
repositories.
1) Download the following RPM pacakges:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/php-mcrypt-5.3.3-1.el6.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm
2) Install them using YUM:
$ yum localinstall php-mcrypt-5.3.3-1.el6.x86_64.rpm
$ libmcrypt-2.5.8-9.el6.x86_64.rpm
3) Reload Apache server to load the extension up:
$ service httpd restart

Problems installing PHP 5.4.11 and MySQL 5.6.10 on CentOS 6.3

I'm attempting to install PHP 5.4.11 and MySQL 5.6.10 onto a CentOS 6.3 box.
I've successfully installed PHP 5.4.11 via the remi repository for yum. I've also successfully installed MySQL 5.6.10 using the community server rpm's on the MySQL downloads page.
They both work fine independently, but when attempting to install php-mysql from the remi repository, a dependency of mysql-libs is pulled in which is at version 5.5.30, and going ahead with the install produces an array of errors like the following:
file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.5.30-1.el6.remi.x86_64 conflicts with file from package MySQL-server-5.6.10-1.el6.x86_64
At this point, I'm out of my depth with regards to getting this working. Can anyone suggest what I need to do to get my PHP installation working with MySQL?
rpm --nodeps --force
just override

Install libssh2-php on PHP 5.4.9 (x64)

I have a problem with the update on php 5.4.9 (i install it with the ppa "ppa:ondrej/php5")
Now i have the problem that i can't install libssh2-php (which is required on my project)
I found some .deb files, but it's only for 32-bit systems.
So when i'm trying to install libssh2-php i have a collision with "libssh2-php:i386" and i have the following dependiesmessage:
ucf:i386 libc6:i386 (>= 2.4) libssh2-1:i386 (>= 1.0) and phpapi-20090626+lfs:i386
System: Ubuntu Server 12.04 LTS x64 | PHP 5.4.9
I also got a warning on running "php -v"
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/ssh2.so' - /usr/lib/php5/20100525/ssh2.so: cannot open shared object file: No such file or directory in Unknown on line 0
The problem is/was that the libssh2 is not aviable for PHP5.4.x AND a x64 system.
I have the same problem trying to use ondrej's ppa for ubuntu 10.04 LTS. It seams that he didn't include the sssh extension.
Apt-get tries to install the version from default package which runs into conflict (depends phpapi-20090626+lfs) with current installed version, isn't it?
Only my backup php cli script needs this extension to run. After trying to solve dependencies witout success, I switched to a shell_exec('ssh ...#...') solution as workaround.
I am only a developer with advanced admin knowledge, no apt-get or linux packaging admin professional. There maybe other solution to fix this via packaging management or maybe building the needed version from source?
EDIT:
There will be another nicer solution :-) you can use pecl to install / build the extension, here is what i have done:
$ sudo pecl install ssh2
Failed to download pecl/ssh2 within preferred state "stable", latest release is version 0.12, stability "beta", use "channel://pecl.php.net/ssh2-0.12" to install
install failed
$ sudo pecl install channel://pecl.php.net/ssh2-0.12
downloading ssh2-0.12.tgz ...
Starting to download ssh2-0.12.tgz (26,223 bytes)
[...]
Build process completed successfully
Installing '/usr/lib/php5/20100525+lfs/ssh2.so'
install ok: channel://pecl.php.net/ssh2-0.12
configuration option "php_ini" is not set to php.ini location
You should add "extension=ssh2.so" to php.ini
Afterwards I add extension=/usr/lib/php5/20100525+lfs/ssh2.so to php config.
Just do:
sudo aptitude purge php5-suhosin
It's described in detail here: bugs.debian.org

Categories