Does upgrading from ubuntu 14.04 to 16.04 affect multi-server memcached?
I have a Laravel 5.1 application which utilizes memcached to manage sessions across multiple servers, specifically two web servers and a database server.
After upgrading the OS on each server from ubuntu 14.04 to 16.04 and installing the latest version of mariadb (10.1.*), our laravel application now returns the following error:
[RuntimeException]
No Memcached servers added.
My config files have not changed and neither have the ip addresses of any of the servers. Debugging laravel's MemcachedConnector.phpshows the server details being passed to the Memcached class but the output of Memcached::getVersion() returns false.
I am at a loss as to why this has suddenly stopped working, any assitance would be appreciated.
Make sure that your 16.04 installation has a "memcached" package:
dpkg -s memcached
If you see a message "dpkg-query: package 'memcached' is not installed and no information is available", install it by
sudo apt-get install memcached
Related
I'm trying to create a connection from my PHP application to Memcache, however I keep getting the error 'Could not establish Memcached connection'.
Here's my package version information
Laravel Version: 5.0.32
PHP Version:5.4.39-0+deb7u2
Database Driver & Version:mysql Ver 14.14 Distrib 5.5.31
Server&Version :Debian:7.1.
-memcached:1.4.13-0.2
-php5-memcached:2.0.1-6
I have ensured that memcached is running, as executing service memcached status yields "memcached is running".
I have two servers where my project is deployed:
ubuntu, with memcached:2.1.0 installed
debian, with memcached:2.0.1 installed
Is there a version conflict?
Fixed by myself.
My solution as follow:
1.delete memcache file and apc file in config dir
2.restart php5-fpm and memcached service.
Although issue is fixed, but I'm still not figure out why it was triggered.
This issue only occurs on the server with Debian os installed rather than the other server which with ubuntu os installed.
Hope help somebody~
i solved the problem with
sudo apt-get install memcached
sudo service memcached status
sudo service memcached start
You need to first install memcached :
sudo apt install memcached
Then you need to start it :
sudo service memcached start
After that it will connect. I resolve it by above step in my case.
I'm running 64-bit CentOS 7 with cPanel/WHM/EasyApache 4, and am trying to get memcache and memcached (PHP) installed.
I installed memcache via yum without a hitch, but when trying to "yum install php-pecl-memcached", this is the error I get:
Transaction check error:
file /usr/bin/php from install of php-cli-5.4.16-42.el7.x86_64
conflicts with file from package ea-php-cli-0.1.0-2.4.1.cpanel.x86_64
This is happening on a live site, so I want to confirm that I can uninstall php-cli via EasyApache without affecting my front end. (I also tried installing memcached via EasyApache, but it complains about not being able to find libmemcached, which is not available through that interface.)
I recently switched to a new Ubuntu 16.04 web server (on GCE) from an Ubuntu 14.04 server. I moved across a few Ruby on Rails projects that run on nginx and postgres with few problems. I now have two legacy CakePHP 1.3 apps to move over to the new server, but I am running in to PHP and MYSQL problems.
The old server was Ubuntu 14.04 running PHP 5.5 and MySQL 5.5.
Ubuntu 16 runs PHP 7, but since I read that CakePHP 1.3 won't work on PHP7, I have downgraded to PHP 5.6.
But, I am still getting this error "PHP message: PHP Fatal error: Call to undefined function mysql_query()"
Is this because I am running mysql-5.7? Or is it still a problem with my PHP 5.6 installation?
I can get phpinfo to run. Here is a screenshot of the top of the result.
Somewhere along the way of downgrading PHP from PHP 7 to PHP 5.6 I missed a few php5.6 packages. I did the following:
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
sudo service nginx restart
Now the old cakephp1.3 site is working fine on Ubuntu 16.
Also, note that since I am running CakePHP through nginx instead of the standard Apache setup, I needed to customize my nginx configuration specifically for CakePHP.
I am trying to install nodejs and mongodb on nginx webserver in ubuntu operating system but i am not getting it. I installed nginx server but couldnt getting how to install nodejs and mongodb on nginx web server. I also installed php mysql and phpmyadmin with nginx server in the ubuntu and all those are running fine. Now i want to install nodejs and mongodb over there but i am not getting it. Is it possible to host php websites and nodejs application using the same nginx web server.?????
Yes it's possible to install MEAN stack and LEMP stack in Ubuntu.
I am assuming that your are using Ubuntu 14.0 LTS.
Kindly follow the below tutorial links to setup nodejs with nginx as a reverse proxy method.
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-14-04
Installing Mongodb.
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
Other task, adding users and config ip in mongodb Google it.
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