memcached server and php-memcached
-
@rmdes Can you check if memcached is running at all (just to make sure you selected the correct branch when building). You can do this with
supervisorctl status
.root@dfa78176-bd47-44ed-9d07-3e66265886b7:/app/data# supervisorctl status apache2 RUNNING pid 22, uptime 0:00:15 cron RUNNING pid 21, uptime 0:00:15 memcached RUNNING pid 20, uptime 0:00:15 root@dfa78176-bd47-44ed-9d07-3e66265886b7:/app/data# echo "stats settings" | nc localhost 11211 STAT maxbytes 67108864 STAT maxconns 1024 STAT tcpport 11211 STAT udpport 0 STAT inter 127.0.0.1 STAT verbosity 0 ....
-
@girish I think I did selected the correct branch, because when I do git branch I have this
And I did the build and the install from this branch.
I probably did something wrong tho since memcached is not even running and the test put in place by the devs goes like this :
Fatal error: Uncaught Error: Class 'Memcached' not found in /app/data/public/index.php:24 Stack trace: #0 {main} thrown in /app/data/public/index.php on line 24if (!$connection = pg_connect ("host=".getenv("CLOUDRON_POSTGRESQL_HOST")." dbname=". getenv("CLOUDRON_POSTGRESQL_DATABASE") ." user=" . getenv("CLOUDRON_POSTGRESQL_USERNAME")." password=" .getenv("CLOUDRON_POSTGRESQL_PASSWORD") ."")) { $error = error_get_last(); echo "Connection to the PostgreSQL database failed. Error was: ". $error['message']. "\n"; } else { echo "Connected to the PostgreSQL database.\n"; } print_r(get_loaded_extensions()); $memcached = new Memcached(); $memcached->addServer('172.18.0.158', 11211); phpinfo(); exit; ?>
-
I got this from the devs of the custom web app :
So far: postgresql and memcached servers available - OK;
Missing: php-memcached extension (so I can't make use of the memcached server capabilities within a php script) - not OKPlease also don't forget about nginx x-accel, can you add an entry to the nginx conf file for that?
Not sure how to proceed
-
by inspecting php.ini in the container, I went to the extension section and added
extension=memcacheAug 31 14:29:58 PHP Warning: PHP Startup: Unable to load dynamic library 'memcache' (tried: /usr/lib/php/20180731/memcache (/usr/lib/php/20180731/memcache: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/memcache.so (/usr/lib/php/20180731/memcache.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
So does this mean the memcache server is not properly installed ?
-
I think the image you are using is wrong. php-memcached is also installed in the same patch as memcached itself - https://git.cloudron.io/cloudron/php7.3-postgres-app/-/commit/12c40aba6a3f05ad245290882fef9743bafed7c5#6651ddff6eb82c840ced7c1dddee15c6e1913dd4_8_7
Can you tell me the command you used to build and update the image? Also, what is the CLI version ? It should be 4.5.2.
$ cloudron --version 4.5.2