PHPSocialNetwork / phpfastcache

A high-performance backend cache system. It is intended for use in speeding up dynamic web applications by alleviating database load. Well implemented, it can drops the database load to almost nothing, yielding faster page load times for users, better resource utilization. It is simple yet powerful.
https://www.phpfastcache.com
MIT License
2.38k stars 451 forks source link

can't connect couchdb on external server #742

Closed sir-reynolds closed 4 years ago

sir-reynolds commented 4 years ago

Configuration (optional)

My question

require_once 'vendor/autoload.php';
use Phpfastcache\Drivers\Couchdb\Config;
use Phpfastcache\Helper\Psr16Adapter;

$_PhpFastCache = new Psr16Adapter(
                                    'couchdb', 
                                    new Config  (
                                                    [
                                                        'host' => '1.2.3.4', //couchdb ip address
                                                        'port' => 9786,
                                                        'path' => '/',
                                                        'ssl' => false,
                                                        'timeout' => 10,
                                                    ]
                                                )
                                );

PHP Fatal error: Uncaught Phpfastcache\Exceptions\PhpfastcacheDriverCheckException: Couchdb is not installed or is misconfigured, cannot continue. \n Also, please verify the suggested dependencies in composer because as of the V6, 3rd party libraries are no longer required. in /var/www/html/DMDMDMDMD/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/DriverBaseTrait.php:70\nStack trace:\n#0 /var/www/html/DMDMDMDMD/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/CacheManager.php(131): Phpfastcache\Drivers\Couchdb\Driver->construct(Object(Phpfastcache\Drivers\Couchdb\Config), '856e5b5d013e0c5...')\n#1 /var/www/html/DMDMDMDMD/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/Psr16Adapter.php(52): Phpfastcache\CacheManager::getInstance('Couchdb', Object(Phpfastcache\Drivers\Couchdb\Config))\n#2 /var/www/html/DMDMDMDMD/_vendor_config.php(37): Phpfastcache\Helper\Psr16Adapter->construct('couchdb', Object(Phpfastcache\Drivers\Couchdb\Config))\n#3 /var/www/html/DMDMDMDMD/index.php(10): require_once('/var/www/html/w...') in /var/www/html/DMDMDMDMD/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/CacheManager.php on line 174

Geolim4 commented 4 years ago

Hello,

Did you installed the composer dependency ? It is specified in "suggested" deps, not requirements :)

Cheers, Georges

sir-reynolds commented 4 years ago

can you give me details info whats dependency i must installed? i try install https://github.com/doctrine/couchdb-client but failed, composer logs it's conflict with phpfastcache 7.1.1.

please give me info about dependency.

Geolim4 commented 4 years ago

Please take a look at our composer.json:

https://github.com/PHPSocialNetwork/phpfastcache/blob/master/composer.json

sir-reynolds commented 4 years ago

thank you @Geolim4

can i install it like this

composer require "PHPSocialNetwork/couchdb": "@dev"

Geolim4 commented 4 years ago

Exactly.

Geolim4 commented 4 years ago

Hello @sir-reynolds,

I’m closing this issue for now because of (inactivity / outdated code / …).

You can always reopen it though! :) Please (update the issue / add comment / clarify …).

Regards, Georges.L

sir-reynolds commented 4 years ago

sorry @Geolim4 i'm try composer require "PHPSocialNetwork/couchdb": "@dev" but this show error :

image

Geolim4 commented 4 years ago

Decrease your project stability or use dev-master

sir-reynolds commented 4 years ago

hi @Geolim4 i'm try again with more example but still failed

image

i already decrease project stability but same still failed.

i try PHPSocialNetwork/couchdb and phpfastcache/couchdb but same Could not find package.

maybe i must use "doctrine/couchdb": "@dev" ?