I am NOT a technical person, so im trying to download a backup manager extension for my app on the droplet but it requires:
the exec() function enabled in your PHP install since it will call a few command line commands to create the backups. Additionally, this only works on a linux environment where the “tar” and “mysqldump” commands are available (99% of linux servers have them)
is there detailed steps on how i can do this in putty or winscp? i have a lamp on ubunutu 20.04 using php version 7.4.3
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello, @adamSar
If you’ve already configured the LAMP stack (Linux, Apache, MySQL, PHP) setup using our tutorial:
then PHP is already configured as you mentioned the version is 7.4.3
You can create a PHP info file and check if the exec function is enabled/disabled. You can create a file named phpinfo.php (the name doesn’t really matter) and put the following content in the file:
The file must be present inside your public_html folder so you can then access the file via your browser and check the PHP information. Once the file is added go to your browser and access the file using your domain name or IP address, e.g yourdomain.com/phpinfo.php or IPaddress/phpinfo.php
You can search for
disable_functions
and ifexec
is listed it means it is disabled. To enable it just remove the exec from the line and then you need to restart Apache and you will be good to go.If
exec
is not listed in thedisable_functions
line it means that it is enabled.Hope that this helps! Regards, Alex
Hi @adamSar,
If you already have PHP installed on your droplet, you can SSH to it, create a new file, for example
test_exec.php
like soThen inside of it, add the following
Save the file and execute it like so
If it returns an output of
exec is enabled
, you’ll know you have exec enabled.Now, if you don’t have PHP installed.
Ubuntu
Install PHP 7.3 for Apache
Install PHP 7.3 for Nginx
Install PHP 7.3 Extensions
You can use the following command to install the most needed PHP extensions