These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Custom PHP settings while creating virtual server on the new forum.
Hello forum users,
I'm having a problem to automatically activate Memcached on virtual server creation. Global php.ini has settings: session.save_handler = memcached session.save_path = "127.0.0.1:11211"
Save handler is copied correctly to new servers php.ini file, but save_path will be chaged to "/home/USER/tmp".
Any solution to get this working automatically?
Also if you manually change these options to php.ini, editing these options in "PHP configuration -> Session options" is impossible, as there is no option for memcached and save_path won't accept ip-address/port number.
I know it's not a real solution, but it works..
Leave these default values in the .ini files in the folders
/etc/php/7.x/cgi/php.ini
,/etc/php/7.x/fpm/php.ini
, etc.:[Session]
session.save_handler = files
session.save_path = "/var/lib/php/sessions"
And create a
/etc/skel/public_html/.user.ini
file with these directives:;https://www.virtualmin.com/node/37748
session.save_handler = memcached
session.save_path = "127.0.0.1:11211"