Run the following command to check all available versions of PHP:
# plesk bin php_handler --list
Then, choose the binary (including path) from the column php-cli , for example:
Note: Use the full path to launch binary in the command-line interface.
Here is simple example oh how to install symfony4 using composer:
/opt/plesk/php/7.1/bin/php /usr/local/bin/composer.phar create-project symfony/skeleton my_project
PDO::execto issue one-off non-prepared statements that don’t return result sets.
PDO::queryto issue one-off non-prepared statements that return result sets.
Both of these are useful if the statements are only executed one time and/or if they are constructed dynamically in a way that is not supported by prepared statements. Usually requires additional tooling to properly construct statements (and avoid things like SQL injection vulnerabilities). That coupled to the fact their flexibility is seldom needed means that it’s often preferred to:
PDOStatement::executeto prepare statements and execute them, regardless of whether they return results or not. Useful if executed multiple times and/or in a hot path. Also doesn’t require additional tooling to handle statement construction. Almost always recommended whenever possible.
As of MySQL 5.7.7, this is what the documentation recommends for Red Hat Enterprise Linux 7, Oracle Linux 7, CentOS 7, SUSE Linux Enterprise Server 12, Fedora 24 and 25:
On Ubuntu 16.04 the service is called mysql, not mysqld, so this is what I did:
sudo mkdir /etc/systemd/system/mysql.service.d
sudo vi /etc/systemd/system/mysql.service.d/override.conf
Added this in the new file override.conf:
Then restarted the service:
sudo systemctl daemon-reload
sudo systemctl restart mysql
and test it with
cat /proc/$(pgrep mysql)/limits | grep files
pkill -f index.php