From 6854cb3f4d8219cf1829e32122eb2502a916eae9 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 1 Feb 2020 09:05:48 +0100 Subject: initial checkin --- setup/composerit2.php | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 setup/composerit2.php (limited to 'setup/composerit2.php') diff --git a/setup/composerit2.php b/setup/composerit2.php new file mode 100644 index 0000000..09aade9 --- /dev/null +++ b/setup/composerit2.php @@ -0,0 +1,78 @@ + + + + + + Flyspray Install - Third Party Packages needed - Step 3 + + + + PHP safe_mode is enabled. We currently don\'t know how to run the "php composer.phar install" from php web frontend under this circumstances. +

But lets test if we can workaround it with Perl:

+ Test using Perl: composerit2.pl'; + } else { + echo '

Step 3: Trying to install dependencies

'; + # $argv=('install'); + # chdir('..'); + # echo '
';
+			# require 'composer.phar';
+			# echo '
'; + + # without chdir('..'); + $phpexe='php'; + # TODO: autodetect the matching commandline php on the host matching the php version of the webserver + # Any idea? Using $_SERVER['PHP_PEAR_SYSCONF_DIR'] or $_SERVER['PHPRC'] for detecting can help a bit, but weak hints.. + # This is just a temp hack for installing flyspray on xampp on Windows + if (getenv('OS') == 'Windows_NT' && isset($_SERVER['PHPRC']) && strstr($_SERVER['PHPRC'], 'xampp')) { + $phpexe=$_SERVER['PHPRC'].'\php.exe'; + } + $cmd2 = $phpexe.' composer.phar --working-dir=.. install'; + + # with chdir('..'); + #$cmd2 = 'php composer.phar install'; + + echo $cmd2.'

'; + shell_exec($cmd2); + echo 'Done'; + + echo '

Step 4: Checking and cleaning:

'; + if (is_readable('../vendor/autoload.php')) { + echo 'Composer installation ok
'; + } else { + echo 'Composer installation failed
'; + } + if (is_file('composer.phar')) { + unlink('composer.phar'); + } + echo 'Cleanup made

'; + echo 'Go back'; + } + ?> + + -- cgit v1.2.3-70-g09d2