https://gist.github.com/srmds/2507aa3bcdb464085413c650fe42e31d
$ sudo apt-get update && sudo apt-get -y install wkhtmltopdf
https://gist.github.com/srmds/2507aa3bcdb464085413c650fe42e31d
$ sudo apt-get update && sudo apt-get -y install wkhtmltopdf
sudo dpkg -l | grep php | tee packages.txt sudo add-apt-repository ppa:ondrej/php # Press enter when prompted. sudo apt update sudo apt install php8.2 php8.2-cli php8.2-{bz2,curl,mbstring,intl} sudo apt install php8.2-fpm # OR # sudo apt install libapache2-mod-php8.2 sudo a2enconf php8.2-fpm # When upgrading from older PHP version: sudo a2disconf php8.1-fpm ## Remove old packages sudo apt purge php8.1*
So, the good old Webmin, is changing and re-ordaining, for good I hope. Here is some help.
Modules download can be found here:
https://download.webmin.com/download/modules/
Themes here:
https://www.webmin.com/cgi-bin/search_third.cgi?themes=1
Authentic theme here:
First issue after installing all of that was symfony-cli could not find Plesk’s PHP, this fixed it.
sudo ln -s /opt/plesk/php/8.0/bin/php /usr/local/bin/php
Next issue was “KnpMenuBundle” in 6.1 it needs to be used as a service, see here. Also if you want custom template the path needs to be set this way; if your template is in “templates/Menu/knp_menu.html.twig”
#config/packages/knp_menu.yaml knp_menu: # use 'twig: false' to disable the Twig extension and the TwigRenderer twig: template: Menu/knp_menu.html.twig # if true, enables the helper for PHP templates templating: false # the renderer to use, list is also available by default default_renderer: twig
Another issue was, how to use raw SQL in symfony 6, very simple thanks to auto-wiring.
https://symfonycasts.com/screencast/doctrine-queries/raw-sql-queries
Few samples of raw SQL for MySQL:
# get connection $conn = $managerRegistry->getConnection(); # sample 1 $sql = "SELECT * FROM somethingWHERE id = :user_id"; $resultSet = $conn->executeQuery($sql, ['user_id' => 123]); $results = $resultSet->fetchAllAssociative(); # sample 2 $sql = "SELECT * FROM something"; $result = $conn->fetchAllAssociative($sql);
Just 4 bundles to make this work
/opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require nyholm/psr7 /opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require kriswallsmith/buzz /opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require cspoo/swiftmailer-mailgun-bundle /opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require mailgun/mailgun-php
Also add to your AppKernel:
new cspoo\Swiftmailer\MailgunBundle\cspooSwiftmailerMailgunBundle(),
Configure your application with the credentials you find on the domain overview on the Mailgun.com dashboard.
// app/config/config.yml: cspoo_swiftmailer_mailgun: key: "key-xxxxxxxxxx" domain: "mydomain.com" endpoint: "https://api.eu.mailgun.net" # Optional. Use this config for EU region. Defaults to "https://api.mailgun.net" http_client: "httplug.client" # Optional. Defaults to null and uses discovery to find client. # Swiftmailer Configuration swiftmailer: transport: "mailgun" spool: { type: memory } # This will start sending emails on kernel.terminate event
Note that the swiftmailer configuration is the same as the standard one – you just change the mailer_transport parameter.