Memcache.exe failed to install service or service already installed - php

I installed xampp on my local computer. The data in the project is stored in memory, but the memcached function did not work on my local machine.
$memcache=memcache_connect('127.0.0.1', 11211);
Error code:
Fatal error: Call to undefined function memcache_connect() in
I called the error, but the solutions didn't work for me.
Suggested solutions include the addition of new services
I am getting this error when adding new service
"failed to install service or service already installed"
**Windows 7
**Xampp
**Apache/2.4.34 (Win32) OpenSSL/1.0.2o PHP/5.6.38

Related

PHP GearmanClient not working on Ubuntu 16.04 LTS

I have this simple code:
<?php
$client = new \GearmanClient();
$client->addServer();
This gives following error:
PHP Fatal error: Uncaught GearmanException: Failed to set exception option in /var/www/demo-admin/public-html/admin-generico/vendor/generico/components/tests/utils/test-gearman.php:4
Stack trace:
#0 /var/www/demo-admin/public-html/admin-generico/vendor/generico/components/tests/utils/test-gearman.php(4): GearmanClient->addServer()
#1 {main}
thrown in /var/www/demo-admin/public-html/admin-generico/vendor/generico/components/tests/utils/test-gearman.php on line 4
Gearman server is definitely running as confirmed by ps:
ps -A | grep gearman
25698 ? 00:00:00 gearmand
I installed php-gearman from ppa:ondrej/pkg-gearman
Gearman version is 1.1.17
The addServer() method requires a host parameter, even if the gearman server is running locally:
$client->addServer('127.0.0.1');
Even though the documentation says the default is the local server, I've found that it sometimes has to be specified to make that error go away.
The comment by #Kris Peeling gave an idea. I uninstalled everything gearman and installed again. Voila! Problem gone. I didn't have to use the localhost IP.
I referred this: https://www.patreon.com/posts/gearman-now-in-14627464

How to setup a mongodb with php XAMPP?

I am a beginner to mongoDB, I want to learn mongoDB. So I read few tutorials and tried to configure mongoDB in my local machine, for that I have downloaded mondoDB's php_mongo.dll file and placed that on my local machine into the path "php/ext/php_mongo.dll" and after that I added this code "extension = php_mongo.dll" to php.ini file, after that I am trying run my XAMPP server but immediately it is showing the below error :
C:xampp\php\ext\php_mongo.dll is either not designed to run on Windows
or it contains an error. Try installing the program again using the
original installation media or contact your system administrator or
the software vendor for support.
after that somehow Apache server has been started And when I try to run the application on browser by URL http://localhost/mongoapp/index.php then it is throwing the following error:
Fatal error: Uncaught Error: Class 'MongoClient' not found in C:\xampp\htdocs\mongoapp\index.php:3 Stack trace: #0 {main} thrown in C:\xampp\htdocs\mongoapp\index.php on line 3
File: index.php
// connect to mongodb
$m = new MongoClient();
echo "Connection to database successfully";
// select a database
$db = $m->mydb;
echo "Database mydb selected";
My php version is "PHP Version 7.0.8". hope someone helps, Thanks in advance.
Check your phpinfo if mongodb is loaded.
Download mongodb from "https://www.mongodb.com/download-center?jmp=nav#community" and install.
Check your architecture in phpinfo match with mongodb.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

Symfony PHP 5.5 : ErrorException: Notice: Memcache::connect(): failed

I am getting error while configuring Memcache with Symfony. Can anyone suggest on this. I have installed Memcache on wamp server using PHP 5.5
ErrorException: Notice: Memcache::connect(): Server localhost (tcp 11211, udp 0) failed with: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
(10060)
Your memcached server is not running. You need to start it.
If you're running Ubuntu, it's as simple as sudo service memcached start. For other operating systems, you may want to consult the manual. If you are having problems getting memcached set up, go to Server Fault and ask for help there.

Call to undefined function db2_connect() error is occured

My db2 database is on windows machine
my php application on Linux machines on xamp
when i start my app then error is occured
error is :- Call to undefined function db2_connect()
DB2 is an extension and must be installed separately before its functions are made available.
http://php.net/manual/en/ibm-db2.installation.php
You need to enable the ibm db2 extension:
http://php.net/manual/en/ibm-db2.installation.php

Class 'COM' not found

I am trying to use COM object in my script and running the script on linux server and got below error.
Fatal error: Class 'COM' not found
Any help?
You can serve a COM object to a Windows client, connect to one running on a Windows host etc, - but you can't run it under Linux.
On a Windws host running PHP >= v5 you need to enable it in php.ini:
[PHP_COM_DOTNET]
extension=php_com_dotnet.dll

Categories