First: I tried 1#
I using Phpspreadsheet and LaravelExcel to make a import.
I creating a new instance of Memcache (not MemcacheD) like the docs in PhpSpreadSheet says (here) and start a new import. In local works fine after I make install all modules for php. But in server (RH7 linux) laravel refuse to indentify the Memcache library.
If I start the Tinker and initialize a new variable using new \Memcache();
laravel found, but in runtime application don't.
Composer packages:
"require": {
"php": ">=7.0.0",
"ext-json": "*",
"adldap2/adldap2-laravel": "^3.0",
"barryvdh/laravel-debugbar": "^2.3",
"cache/memcache-adapter": "^1.0",
"cache/memcached-adapter": "^1.0",
"cache/simple-cache-bridge": "^1.0",
"cocur/slugify": "^3.1",
"doctrine/dbal": "^2.5",
"geekcom/validator-docs": "^1.0",
"laravel/dusk": "^1.0",
"laravel/framework": ">=5.5",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.3.0",
"maatwebsite/excel": ">=3.1.13",
"nwidart/laravel-modules": "^1.19",
"watson/validating": "^3.0",
"yajra/laravel-datatables-oracle": "~8.0",
"zizaco/entrust": "5.2.x-dev"
},
Some usefully info:
Php Modules installed:
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
intl
json
ldap
libxml
mbstring
memcache
memcached
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xdebug
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
Code:
$client = new \Memcache();
$client->connect('localhost', 11211);
$pool = new \Cache\Adapter\Memcache\MemcacheCachePool($client);
$simpleCache = new \Cache\Bridge\SimpleCache\SimpleCacheBridge($pool);
SpreadsheetSettings::setCache($simpleCache);
....