Execute php with Plesk php exec, using Imagick
Execute php with Plesk php exec, using Imagick
Category:Plesk
Pub.date:2019-08-03
CentOS Plesk php7.3
When executing php from php exec, the php version being executed was the system default.
The first description
exec('php ' . getcwd() . '/example.php');
In example.php, use Imagick.
It worked in the local environment (XAMPP), but not in the web server Plesk environment.
Check the php execution version
exec('php -v', $ret);
print $ret;
The php execution version was the default value for the system. Ver.5.x
Specify php ver.7.3
exec('/opt/plesk/php/7.3/bin/php -v', $ret);
print $ret;
Check the desired version.
Conclusion
exec('/opt/plesk/php/7.3/bin/php ' . getcwd() . '/example.php');
CONTENTS
JavaScript
Unreal Engine
CakePHP4
CakePHP4
Flutter
Flutter
Other
JavaScript
JavaScript
CakePHP4
Web Server
Photoshop
Unreal Engine
CakePHP4
Web Browser
Web Server
iOS
Android
Web Browser
CakePHP4
Plesk
Illustrator
Plesk
Web Server
Web Server
CakePHP3
Web Browser
CakePHP3
JavaScript
JavaScript
CakePHP3
CakePHP3