From 8db828236e79d3933936ed1d54328d6a2ade419f Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Tue, 2 Jan 2018 18:11:23 +0100 Subject: [PATCH] request #10978: End PHP 5.3 support There is still a lot of Apache related configurations that do not concern PHP directly. They will be cleaned in a dedicated contribution. Change-Id: Ia8a491692475b1f3b68da8b0039f7ce0741c2c7d --- Makefile | 24 +- docker-compose-php56.yml | 5 - docker-compose.yml | 2 +- src/common/autoload_libs.php | 3 - src/common/include/compat/hash_equals.php | 78 - .../StandardPasswordHandler.class.php | 9 +- src/composer.json | 2 +- src/composer.lock | 27 +- src/etc/httpd.conf.rhel6.dist | 29 +- src/etc/nginx18/README.mkd | 2 - src/etc/nginx18/tuleap-apache.proxy | 17 - src/etc/nginx18/tuleap.conf.dist | 4 - src/etc/php.conf.dist | 54 - src/utils/php-launcher.sh | 1 - src/www/admin/apc.conf.php | 28 - src/www/admin/apc.php | 1337 ----------------- src/www/include/pre.php | 6 +- tests/Jenkinsfile | 25 +- tests/rest/bin/setup.sh | 17 +- tests/rest/etc/rest-tests.httpd22.conf | 27 - tests/soap/bin/setup.sh | 30 +- tests/soap/bin/test_suite.sh | 4 +- tests/soap/etc/soap-tests.conf | 16 +- tools/distlp/backend-web/nginx/tuleap.conf | 4 - tools/rpm/Makefile | 3 - tools/rpm/tuleap.rhel6.spec | 26 +- tools/rpm/tuleap.rhel7.spec | 18 +- tools/setup.sh | 6 +- 28 files changed, 83 insertions(+), 1721 deletions(-) delete mode 100644 docker-compose-php56.yml delete mode 100644 src/common/include/compat/hash_equals.php delete mode 100644 src/etc/nginx18/tuleap-apache.proxy delete mode 100644 src/etc/php.conf.dist delete mode 100644 src/www/admin/apc.conf.php delete mode 100644 src/www/admin/apc.php delete mode 100644 tests/rest/etc/rest-tests.httpd22.conf diff --git a/Makefile b/Makefile index afb0da7e122..45c99b29f42 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ AUTOLOAD_EXCLUDES=^tests|^template .DEFAULT_GOAL := help help: - @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + @grep -E '^[a-zA-Z0-9_-\ ]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' @echo "(Other less used targets are available, open Makefile for details)" # @@ -126,7 +126,7 @@ post-checkout: composer generate-mo dev-clear-cache dev-forgeupgrade ## Clear ca npm install npm run build git clean -fd plugins/*/www/themes/FlamingParrot - @$(DOCKER) exec tuleap-web service httpd restart + @$(DOCKER) exec tuleap-web service rh-php56-php-fpm restart generate-po: ## Generate translatable strings @tools/utils/generate-po.php `pwd` @@ -134,12 +134,6 @@ generate-po: ## Generate translatable strings generate-mo: ## Compile tranlated strings into binary format @tools/utils/generate-mo.sh `pwd` -tests_php53: - $(DOCKER) run --rm=true -v $(CURDIR):/tuleap enalean/tuleap-test-ut-c6-php53 - -tests_phpunit: - $(DOCKER) run -ti --rm=true -v $(CURDIR):/tuleap enalean/tuleap-test-phpunit-c6-php53 - tests_rest: ## Run all REST tests $(DOCKER) run -ti --rm -v $(CURDIR):/usr/share/tuleap --mount type=tmpfs,destination=/tmp enalean/tuleap-test-rest:c6-php56-httpd24-mysql56 @@ -191,20 +185,10 @@ dev-forgeupgrade: ## Run forgeupgrade in Docker Compose environment dev-clear-cache: ## Clear caches in Docker Compose environment @$(DOCKER) exec tuleap-web /usr/share/tuleap/src/utils/tuleap --clear-caches -start: ## Start Tuleap Web + LDAP + DB in Docker Compose environment - @echo "Start Tuleap Web + LDAP + DB" - @./tools/docker/migrate_to_volume.sh - @$(DOCKER_COMPOSE) up -d web - @echo -n "Your instance will be soon available: http://" - @grep VIRTUAL_HOST .env | cut -d= -f2 - @echo "You might want to type 'make show-passwords' to see site default passwords" - @echo -n "tuleap-web ip address: " - @$(DOCKER) inspect -f '{{.NetworkSettings.Networks.tuleap_default.IPAddress}}' tuleap-web - -start-php56: ## Start Tuleap web with php56 & nginx +start-php56 start: ## Start Tuleap web with php56 & nginx @echo "Start Tuleap in PHP 5.6" @./tools/docker/migrate_to_volume.sh - @$(DOCKER_COMPOSE) -f docker-compose-php56.yml up -d web + @$(DOCKER_COMPOSE) -f docker-compose.yml up -d web @echo -n "tuleap-web ip address: " @$(DOCKER) inspect -f '{{.NetworkSettings.Networks.tuleap_default.IPAddress}}' tuleap-web diff --git a/docker-compose-php56.yml b/docker-compose-php56.yml deleted file mode 100644 index 6d0a59a9f36..00000000000 --- a/docker-compose-php56.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: "2" - -services: - web: - image: enalean/tuleap-aio-dev:c6-php56-nginx diff --git a/docker-compose.yml b/docker-compose.yml index dca48101303..dc90ce7a62b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "2" services: web: container_name: tuleap-web - image: enalean/tuleap-aio-dev:nodb + image: enalean/tuleap-aio-dev:c6-php56-nginx volumes: - .:/usr/share/tuleap - ../tuleap-plugins:/usr/share/tuleap-plugins diff --git a/src/common/autoload_libs.php b/src/common/autoload_libs.php index a4cf29ee537..3b3a5e90998 100644 --- a/src/common/autoload_libs.php +++ b/src/common/autoload_libs.php @@ -43,7 +43,4 @@ function get_markdown_path() { ); $loader->register(); -// Load PHP compatibility libraries -require_once('common/include/compat/hash_equals.php'); - require_once('vendor/autoload.php'); \ No newline at end of file diff --git a/src/common/include/compat/hash_equals.php b/src/common/include/compat/hash_equals.php deleted file mode 100644 index eecf30fbb97..00000000000 --- a/src/common/include/compat/hash_equals.php +++ /dev/null @@ -1,78 +0,0 @@ - - Options Includes FollowSymLinks MultiViews - AllowOverride All - AcceptPathInfo On - Order allow,deny - Allow from all - SetEnvIfNoCase Request_URI /file/download\.php no-gzip dont-vary - - -# Don't allow access to API for anyone. -# Currently, the risk is low, so we only filter on UserAgent string (which can be easily forged) -# For better security, you can filter on the server IP address -SetEnvIf User-Agent ^Codendi let_me_in - - # API scrips do not end with ".php" - ForceType application/x-httpd-php - Order Deny,Allow - Deny from all - Allow from env=let_me_in - - -# -# On the production server the local.inc file is in /etc/tuleap/conf/local.inc -# because it contains sensitive data -# -SetEnv TULEAP_LOCAL_INC "" +DocumentRoot "/usr/share/tuleap/src/www" \ No newline at end of file diff --git a/src/etc/nginx18/README.mkd b/src/etc/nginx18/README.mkd index 968f2418e74..3ce9b368446 100644 --- a/src/etc/nginx18/README.mkd +++ b/src/etc/nginx18/README.mkd @@ -38,8 +38,6 @@ Then run The configuration is meant to be redeployable at anytime. -Note: if you ever need to go back to apache mode, you can by editing `/etc/opt/rh/rh-nginx18/nginx/conf.d/tuleap.conf` -and swaping the includes to "promote" `conf.d/tuleap-apache.proxy` Organisation ============ diff --git a/src/etc/nginx18/tuleap-apache.proxy b/src/etc/nginx18/tuleap-apache.proxy deleted file mode 100644 index 0d8b916446e..00000000000 --- a/src/etc/nginx18/tuleap-apache.proxy +++ /dev/null @@ -1,17 +0,0 @@ -# The 4 proxy_set_header are mandatory -location / { - proxy_pass http://tuleap; - proxy_set_header X-Real-IP $remote_addr; - # Allow to know what is the original IP address (esp. for logging purpose as well as session management) - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # Allow to know what is the original protocol (so Tuleap knows if things were in HTTPS) - proxy_set_header X-Forwarded-Proto $scheme; - # What is the name of the platform to the end users - proxy_set_header Host $host; - # Write Destination header for Subversion COPY and MOVE operations - set $fixed_destination $http_destination; - if ( $http_destination ~* ^https(.*)$ ) { - set $fixed_destination http$1; - } - proxy_set_header Destination $fixed_destination; -} diff --git a/src/etc/nginx18/tuleap.conf.dist b/src/etc/nginx18/tuleap.conf.dist index 198d4366dd9..785085dd407 100644 --- a/src/etc/nginx18/tuleap.conf.dist +++ b/src/etc/nginx18/tuleap.conf.dist @@ -21,10 +21,6 @@ server { client_max_body_size 256M; include conf.d/tuleap.d/*.conf; - - # Available here in case of emergency, uncomment the - # line below (and comment the line above) - #include conf.d/tuleap-apache.proxy; } server { diff --git a/src/etc/php.conf.dist b/src/etc/php.conf.dist deleted file mode 100644 index 0503164c35a..00000000000 --- a/src/etc/php.conf.dist +++ /dev/null @@ -1,54 +0,0 @@ -# -# PHP is an HTML-embedded scripting language which attempts to make it -# easy for developers to write dynamically generated webpages. -# - - - LoadModule php5_module modules/libphp5.so - - -# -# Cause the PHP interpreter handle files with a .php extension. -# Codendi: also handles php3 legacy scripts -# - - SetOutputFilter PHP - SetInputFilter PHP - LimitRequestBody 0 - - -# -# Add index.php to the list of files that will be served as directory -# indexes. -# -#DirectoryIndex index.php -AddType application/x-httpd-php .php - - -# PHP variables -php_flag register_globals on -php_flag magic_quotes_gpc off -php_flag short_open_tag on -# Needed by trackers and phpWiki -php_flag register_long_arrays on -php_value include_path "/usr/share/pear/:/usr/share/php:/usr/share/codendi/src/www/include:/usr/share/codendi/src:." -php_value memory_limit 196M -php_value post_max_size 128M -php_value upload_max_filesize 128M -php_admin_value upload_tmp_dir /var/tmp - -# For phpwiki -# php_flag allow_call_time_pass_reference on - -# -# With PHP5 session.save_path may not have a default value. This will raise a notice when -# browsing wiki pages. To fix it, just uncomment the following line. -# -php_value session.save_path "/var/tmp/codendi_cache" - - -# Debugging all=6143, all but notice=6135. See http://www.php.net/error_reporting -# Debugging 2047=all, 2039=all-notice -#php_flag display_errors on -php_value error_reporting "6135" - diff --git a/src/utils/php-launcher.sh b/src/utils/php-launcher.sh index 2c8f54b5c1f..fc0457914ad 100755 --- a/src/utils/php-launcher.sh +++ b/src/utils/php-launcher.sh @@ -28,7 +28,6 @@ set -e if [ -z "$PHP" ]; then PHP="/opt/rh/rh-php56/root/usr/bin/php" if [ ! -x "$PHP" ]; then - PHP="/usr/bin/php" if hash php 2> /dev/null; then PHP="php" fi diff --git a/src/www/admin/apc.conf.php b/src/www/admin/apc.conf.php deleted file mode 100644 index 61ce0110102..00000000000 --- a/src/www/admin/apc.conf.php +++ /dev/null @@ -1,28 +0,0 @@ -. - */ - -require 'pre.php'; - -HTTPRequest::instance()->checkUserIsSuperUser(); - -define('USE_AUTHENTICATION',0); diff --git a/src/www/admin/apc.php b/src/www/admin/apc.php deleted file mode 100644 index 77b6793558e..00000000000 --- a/src/www/admin/apc.php +++ /dev/null @@ -1,1337 +0,0 @@ - | - | Rasmus Lerdorf | - | Ilia Alshanetsky | - +----------------------------------------------------------------------+ - - All other licensing and usage conditions are those of the PHP Group. - - */ - -$VERSION='$Id: apc.php,v 3.68.2.2 2008/05/11 18:57:00 rasmus Exp $'; - -////////// READ OPTIONAL CONFIGURATION FILE //////////// -if (file_exists("apc.conf.php")) include("apc.conf.php"); -//////////////////////////////////////////////////////// - -////////// BEGIN OF DEFAULT CONFIG AREA /////////////////////////////////////////////////////////// - -defaults('USE_AUTHENTICATION',1); // Use (internal) authentication - best choice if - // no other authentication is available - // If set to 0: - // There will be no further authentication. You - // will have to handle this by yourself! - // If set to 1: - // You need to change ADMIN_PASSWORD to make - // this work! -defaults('ADMIN_USERNAME','apc'); // Admin Username -defaults('ADMIN_PASSWORD','password'); // Admin Password - CHANGE THIS TO ENABLE!!! - -// (beckerr) I'm using a clear text password here, because I've no good idea how to let -// users generate a md5 or crypt password in a easy way to fill it in above - -//defaults('DATE_FORMAT', "d.m.Y H:i:s"); // German -defaults('DATE_FORMAT', 'Y/m/d H:i:s'); // US - -defaults('GRAPH_SIZE',200); // Image size - -////////// END OF DEFAULT CONFIG AREA ///////////////////////////////////////////////////////////// - - -// "define if not defined" -function defaults($d,$v) { - if (!defined($d)) define($d,$v); // or just @define(...) -} - -// rewrite $PHP_SELF to block XSS attacks -// -$PHP_SELF= isset($_SERVER['PHP_SELF']) ? htmlentities(strip_tags($_SERVER['PHP_SELF'],''), ENT_QUOTES) : ''; -$time = time(); -$host = getenv('HOSTNAME'); -if($host) { $host = '('.$host.')'; } - -// operation constants -define('OB_HOST_STATS',1); -define('OB_SYS_CACHE',2); -define('OB_USER_CACHE',3); -define('OB_SYS_CACHE_DIR',4); -define('OB_VERSION_CHECK',9); - -// check validity of input variables -$vardom=array( - 'OB' => '/^\d+$/', // operational mode switch - 'CC' => '/^[01]$/', // clear cache requested - 'DU' => '/^.*$/', // Delete User Key - 'SH' => '/^[a-z0-9]+$/', // shared object description - - 'IMG' => '/^[123]$/', // image to generate - 'LO' => '/^1$/', // login requested - - 'COUNT' => '/^\d+$/', // number of line displayed in list - 'SCOPE' => '/^[AD]$/', // list view scope - 'SORT1' => '/^[AHSMCDTZ]$/', // first sort key - 'SORT2' => '/^[DA]$/', // second sort key - 'AGGR' => '/^\d+$/', // aggregation by dir level - 'SEARCH' => '~^[a-zA-Z0-1/_.-]*$~' // aggregation by dir level -); - -// default cache mode -$cache_mode='opcode'; - -// cache scope -$scope_list=array( - 'A' => 'cache_list', - 'D' => 'deleted_list' -); - -// handle POST and GET requests -if (empty($_REQUEST)) { - if (!empty($_GET) && !empty($_POST)) { - $_REQUEST = array_merge($_GET, $_POST); - } else if (!empty($_GET)) { - $_REQUEST = $_GET; - } else if (!empty($_POST)) { - $_REQUEST = $_POST; - } else { - $_REQUEST = array(); - } -} - -// check parameter syntax -foreach($vardom as $var => $dom) { - if (!isset($_REQUEST[$var])) { - $MYREQUEST[$var]=NULL; - } else if (!is_array($_REQUEST[$var]) && preg_match($dom.'D',$_REQUEST[$var])) { - $MYREQUEST[$var]=$_REQUEST[$var]; - } else { - $MYREQUEST[$var]=$_REQUEST[$var]=NULL; - } -} - -// check parameter sematics -if (empty($MYREQUEST['SCOPE'])) $MYREQUEST['SCOPE']="A"; -if (empty($MYREQUEST['SORT1'])) $MYREQUEST['SORT1']="H"; -if (empty($MYREQUEST['SORT2'])) $MYREQUEST['SORT2']="D"; -if (empty($MYREQUEST['OB'])) $MYREQUEST['OB']=OB_HOST_STATS; -if (!isset($MYREQUEST['COUNT'])) $MYREQUEST['COUNT']=20; -if (!isset($scope_list[$MYREQUEST['SCOPE']])) $MYREQUEST['SCOPE']='A'; - -$MY_SELF= - "$PHP_SELF". - "?SCOPE=".$MYREQUEST['SCOPE']. - "&SORT1=".$MYREQUEST['SORT1']. - "&SORT2=".$MYREQUEST['SORT2']. - "&COUNT=".$MYREQUEST['COUNT']; -$MY_SELF_WO_SORT= - "$PHP_SELF". - "?SCOPE=".$MYREQUEST['SCOPE']. - "&COUNT=".$MYREQUEST['COUNT']; - -// authentication needed? -// -if (!USE_AUTHENTICATION) { - $AUTHENTICATED=1; -} else { - $AUTHENTICATED=0; - if (ADMIN_PASSWORD!='password' && ($MYREQUEST['LO'] == 1 || isset($_SERVER['PHP_AUTH_USER']))) { - - if (!isset($_SERVER['PHP_AUTH_USER']) || - !isset($_SERVER['PHP_AUTH_PW']) || - $_SERVER['PHP_AUTH_USER'] != ADMIN_USERNAME || - $_SERVER['PHP_AUTH_PW'] != ADMIN_PASSWORD) { - Header("WWW-Authenticate: Basic realm=\"APC Login\""); - Header("HTTP/1.0 401 Unauthorized"); - - echo << -

Rejected!

- Wrong Username or Password!
 
  - Continue... - -EOB; - exit; - - } else { - $AUTHENTICATED=1; - } - } -} - -// select cache mode -if ($AUTHENTICATED && $MYREQUEST['OB'] == OB_USER_CACHE) { - $cache_mode='user'; -} -// clear cache -if ($AUTHENTICATED && isset($MYREQUEST['CC']) && $MYREQUEST['CC']) { - apc_clear_cache($cache_mode); -} - -if ($AUTHENTICATED && !empty($MYREQUEST['DU'])) { - apc_delete($MYREQUEST['DU']); -} - -if(!function_exists('apc_cache_info') || !($cache=@apc_cache_info($cache_mode))) { - echo "No cache info available. APC does not appear to be running."; - exit; -} - -$cache_user = apc_cache_info('user', 1); -$mem=apc_sma_info(); -if(!$cache['num_hits']) { $cache['num_hits']=1; $time++; } // Avoid division by 0 errors on a cache clear - -// don't cache this page -// -header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); // HTTP/1.0 - -function duration($ts) { - global $time; - $years = (int)((($time - $ts)/(7*86400))/52.177457); - $rem = (int)(($time-$ts)-($years * 52.177457 * 7 * 86400)); - $weeks = (int)(($rem)/(7*86400)); - $days = (int)(($rem)/86400) - $weeks*7; - $hours = (int)(($rem)/3600) - $days*24 - $weeks*7*24; - $mins = (int)(($rem)/60) - $hours*60 - $days*24*60 - $weeks*7*24*60; - $str = ''; - if($years==1) $str .= "$years year, "; - if($years>1) $str .= "$years years, "; - if($weeks==1) $str .= "$weeks week, "; - if($weeks>1) $str .= "$weeks weeks, "; - if($days==1) $str .= "$days day,"; - if($days>1) $str .= "$days days,"; - if($hours == 1) $str .= " $hours hour and"; - if($hours>1) $str .= " $hours hours and"; - if($mins == 1) $str .= " 1 minute"; - else $str .= " $mins minutes"; - return $str; -} - -// create graphics -// -function graphics_avail() { - return extension_loaded('gd'); -} -if (isset($MYREQUEST['IMG'])) -{ - if (!graphics_avail()) { - exit(0); - } - - function fill_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1,$color2,$text='',$placeindex=0) { - $r=$diameter/2; - $w=deg2rad((360+$start+($end-$start)/2)%360); - - - if (function_exists("imagefilledarc")) { - // exists only if GD 2.0.1 is avaliable - imagefilledarc($im, $centerX+1, $centerY+1, $diameter, $diameter, $start, $end, $color1, IMG_ARC_PIE); - imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color2, IMG_ARC_PIE); - imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color1, IMG_ARC_NOFILL|IMG_ARC_EDGED); - } else { - imagearc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color2); - imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($start)) * $r, $centerY + sin(deg2rad($start)) * $r, $color2); - imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($start+1)) * $r, $centerY + sin(deg2rad($start)) * $r, $color2); - imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($end-1)) * $r, $centerY + sin(deg2rad($end)) * $r, $color2); - imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($end)) * $r, $centerY + sin(deg2rad($end)) * $r, $color2); - imagefill($im,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2, $color2); - } - if ($text) { - if ($placeindex>0) { - imageline($im,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$diameter, $placeindex*12,$color1); - imagestring($im,4,$diameter, $placeindex*12,$text,$color1); - - } else { - imagestring($im,4,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$text,$color1); - } - } - } - - function text_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1,$text,$placeindex=0) { - $r=$diameter/2; - $w=deg2rad((360+$start+($end-$start)/2)%360); - - if ($placeindex>0) { - imageline($im,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$diameter, $placeindex*12,$color1); - imagestring($im,4,$diameter, $placeindex*12,$text,$color1); - - } else { - imagestring($im,4,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$text,$color1); - } - } - - function fill_box($im, $x, $y, $w, $h, $color1, $color2,$text='',$placeindex='') { - global $col_black; - $x1=$x+$w-1; - $y1=$y+$h-1; - - imagerectangle($im, $x, $y1, $x1+1, $y+1, $col_black); - if($y1>$y) imagefilledrectangle($im, $x, $y, $x1, $y1, $color2); - else imagefilledrectangle($im, $x, $y1, $x1, $y, $color2); - imagerectangle($im, $x, $y1, $x1, $y, $color1); - if ($text) { - if ($placeindex>0) { - - if ($placeindex<16) - { - $px=5; - $py=$placeindex*12+6; - imagefilledrectangle($im, $px+90, $py+3, $px+90-4, $py-3, $color2); - imageline($im,$x,$y+$h/2,$px+90,$py,$color2); - imagestring($im,2,$px,$py-6,$text,$color1); - - } else { - if ($placeindex<31) { - $px=$x+40*2; - $py=($placeindex-15)*12+6; - } else { - $px=$x+40*2+100*intval(($placeindex-15)/15); - $py=($placeindex%15)*12+6; - } - imagefilledrectangle($im, $px, $py+3, $px-4, $py-3, $color2); - imageline($im,$x+$w,$y+$h/2,$px,$py,$color2); - imagestring($im,2,$px+2,$py-6,$text,$color1); - } - } else { - imagestring($im,4,$x+5,$y1-16,$text,$color1); - } - } - } - - - $size = GRAPH_SIZE; // image size - if ($MYREQUEST['IMG']==3) - $image = imagecreate(2*$size+150, $size+10); - else - $image = imagecreate($size+50, $size+10); - - $col_white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF); - $col_red = imagecolorallocate($image, 0xD0, 0x60, 0x30); - $col_green = imagecolorallocate($image, 0x60, 0xF0, 0x60); - $col_black = imagecolorallocate($image, 0, 0, 0); - imagecolortransparent($image,$col_white); - - switch ($MYREQUEST['IMG']) { - - case 1: - $s=$mem['num_seg']*$mem['seg_size']; - $a=$mem['avail_mem']; - $x=$y=$size/2; - $fuzz = 0.000001; - - // This block of code creates the pie chart. It is a lot more complex than you - // would expect because we try to visualize any memory fragmentation as well. - $angle_from = 0; - $string_placement=array(); - for($i=0; $i<$mem['num_seg']; $i++) { - $ptr = 0; - $free = $mem['block_lists'][$i]; - foreach($free as $block) { - if($block['offset']!=$ptr) { // Used block - $angle_to = $angle_from+($block['offset']-$ptr)/$s; - if(($angle_to+$fuzz)>1) $angle_to = 1; - if( ($angle_to*360) - ($angle_from*360) >= 1) { - fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_red); - if (($angle_to-$angle_from)>0.05) { - array_push($string_placement, array($angle_from,$angle_to)); - } - } - $angle_from = $angle_to; - } - $angle_to = $angle_from+($block['size'])/$s; - if(($angle_to+$fuzz)>1) $angle_to = 1; - if( ($angle_to*360) - ($angle_from*360) >= 1) { - fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_green); - if (($angle_to-$angle_from)>0.05) { - array_push($string_placement, array($angle_from,$angle_to)); - } - } - $angle_from = $angle_to; - $ptr = $block['offset']+$block['size']; - } - if ($ptr < $mem['seg_size']) { // memory at the end - $angle_to = $angle_from + ($mem['seg_size'] - $ptr)/$s; - if(($angle_to+$fuzz)>1) $angle_to = 1; - fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_red); - if (($angle_to-$angle_from)>0.05) { - array_push($string_placement, array($angle_from,$angle_to)); - } - } - } - foreach ($string_placement as $angle) { - text_arc($image,$x,$y,$size,$angle[0]*360,$angle[1]*360,$col_black,bsize($s*($angle[1]-$angle[0]))); - } - break; - - case 2: - $s=$cache['num_hits']+$cache['num_misses']; - $a=$cache['num_hits']; - - fill_box($image, 30,$size,50,-$a*($size-21)/$s,$col_black,$col_green,sprintf("%.1f%%",$cache['num_hits']*100/$s)); - fill_box($image,130,$size,50,-max(4,($s-$a)*($size-21)/$s),$col_black,$col_red,sprintf("%.1f%%",$cache['num_misses']*100/$s)); - break; - - case 3: - $s=$mem['num_seg']*$mem['seg_size']; - $a=$mem['avail_mem']; - $x=130; - $y=1; - $j=1; - - // This block of code creates the bar chart. It is a lot more complex than you - // would expect because we try to visualize any memory fragmentation as well. - for($i=0; $i<$mem['num_seg']; $i++) { - $ptr = 0; - $free = $mem['block_lists'][$i]; - foreach($free as $block) { - if($block['offset']!=$ptr) { // Used block - $h=(GRAPH_SIZE-5)*($block['offset']-$ptr)/$s; - if ($h>0) { - $j++; - if($j<75) fill_box($image,$x,$y,50,$h,$col_black,$col_red,bsize($block['offset']-$ptr),$j); - else fill_box($image,$x,$y,50,$h,$col_black,$col_red); - } - $y+=$h; - } - $h=(GRAPH_SIZE-5)*($block['size'])/$s; - if ($h>0) { - $j++; - if($j<75) fill_box($image,$x,$y,50,$h,$col_black,$col_green,bsize($block['size']),$j); - else fill_box($image,$x,$y,50,$h,$col_black,$col_green); - } - $y+=$h; - $ptr = $block['offset']+$block['size']; - } - if ($ptr < $mem['seg_size']) { // memory at the end - $h = (GRAPH_SIZE-5) * ($mem['seg_size'] - $ptr) / $s; - if ($h > 0) { - fill_box($image,$x,$y,50,$h,$col_black,$col_red,bsize($mem['seg_size']-$ptr),$j++); - } - } - } - break; - case 4: - $s=$cache['num_hits']+$cache['num_misses']; - $a=$cache['num_hits']; - - fill_box($image, 30,$size,50,-$a*($size-21)/$s,$col_black,$col_green,sprintf("%.1f%%",$cache['num_hits']*100/$s)); - fill_box($image,130,$size,50,-max(4,($s-$a)*($size-21)/$s),$col_black,$col_red,sprintf("%.1f%%",$cache['num_misses']*100/$s)); - break; - - } - header("Content-type: image/png"); - imagepng($image); - exit; -} - -// pretty printer for byte values -// -function bsize($s) { - foreach (array('','K','M','G') as $i => $k) { - if ($s < 1024) break; - $s/=1024; - } - return sprintf("%5.1f %sBytes",$s,$k); -} - -// sortable table header in "scripts for this host" view -function sortheader($key,$name,$extra='') { - global $MYREQUEST, $MY_SELF_WO_SORT; - - if ($MYREQUEST['SORT1']==$key) { - $MYREQUEST['SORT2'] = $MYREQUEST['SORT2']=='A' ? 'D' : 'A'; - } - return "$name"; - -} - -// create menu entry -function menu_entry($ob,$title) { - global $MYREQUEST,$MY_SELF; - if ($MYREQUEST['OB']!=$ob) { - return "
  • $title
  • "; - } else if (empty($MYREQUEST['SH'])) { - return "
  • $title
  • "; - } else { - return "
  • $title
  • "; - } -} - -function put_login_link($s="Login") -{ - global $MY_SELF,$MYREQUEST,$AUTHENTICATED; - // needs ADMIN_PASSWORD to be changed! - // - if (!USE_AUTHENTICATION) { - return; - } else if (ADMIN_PASSWORD=='password') - { - print <<$s -EOB; - } else if ($AUTHENTICATED) { - print <<$s -EOB; - } -} - - -?> - - -APC INFO <?php echo $host ?> - - - -
    -

    - -
    Opcode Cache
    -

    - -
    -
    - -
  • Refresh Data
  • -EOB; -echo - menu_entry(1,'View Host Stats'), - menu_entry(2,'System Cache Entries'); -if ($AUTHENTICATED) { - echo menu_entry(4,'Per-Directory Entries'); -} -echo - menu_entry(3,'User Cache Entries'), - menu_entry(9,'Version Check'); - -if ($AUTHENTICATED) { - echo <<Clear $cache_mode Cache -EOB; -} -echo << -EOB; - - -// CONTENT -echo << -EOB; - -// MAIN SWITCH STATEMENT - -switch ($MYREQUEST['OB']) { - - - - - -// ----------------------------------------------- -// Host Stats -// ----------------------------------------------- -case OB_HOST_STATS: - $mem_size = $mem['num_seg']*$mem['seg_size']; - $mem_avail= $mem['avail_mem']; - $mem_used = $mem_size-$mem_avail; - $seg_size = bsize($mem['seg_size']); - $req_rate = sprintf("%.2f",($cache['num_hits']+$cache['num_misses'])/($time-$cache['start_time'])); - $hit_rate = sprintf("%.2f",($cache['num_hits'])/($time-$cache['start_time'])); - $miss_rate = sprintf("%.2f",($cache['num_misses'])/($time-$cache['start_time'])); - $insert_rate = sprintf("%.2f",($cache['num_inserts'])/($time-$cache['start_time'])); - $req_rate_user = sprintf("%.2f",($cache_user['num_hits']+$cache_user['num_misses'])/($time-$cache_user['start_time'])); - $hit_rate_user = sprintf("%.2f",($cache_user['num_hits'])/($time-$cache_user['start_time'])); - $miss_rate_user = sprintf("%.2f",($cache_user['num_misses'])/($time-$cache_user['start_time'])); - $insert_rate_user = sprintf("%.2f",($cache_user['num_inserts'])/($time-$cache_user['start_time'])); - $apcversion = phpversion('apc'); - $phpversion = phpversion(); - $number_files = $cache['num_entries']; - $size_files = bsize($cache['mem_size']); - $number_vars = $cache_user['num_entries']; - $size_vars = bsize($cache_user['mem_size']); - $i=0; - echo <<< EOB -

    General Cache Information

    - - - -EOB; - - if(!empty($_SERVER['SERVER_NAME'])) - echo "\n"; - if(!empty($_SERVER['SERVER_SOFTWARE'])) - echo "\n"; - - echo << -EOB; - echo ''; - echo ''; - echo ''; - echo <<
    APC Version$apcversion
    PHP Version$phpversion
    APC Host{$_SERVER['SERVER_NAME']} $host
    Server Software{$_SERVER['SERVER_SOFTWARE']}
    Shared Memory{$mem['num_seg']} Segment(s) with $seg_size -
    ({$cache['memory_type']} memory, {$cache['locking_type']} locking) -
    Start Time',date(DATE_FORMAT,$cache['start_time']),'
    Uptime',duration($cache['start_time']),'
    File Upload Support',$cache['file_upload_progress'],'
    -
    - -

    File Cache Information

    - - - - - - - - - -
    Cached Files$number_files ($size_files)
    Hits{$cache['num_hits']}
    Misses{$cache['num_misses']}
    Request Rate (hits, misses)$req_rate cache requests/second
    Hit Rate$hit_rate cache requests/second
    Miss Rate$miss_rate cache requests/second
    Insert Rate$insert_rate cache requests/second
    Cache full count{$cache['expunges']}
    -
    - -

    User Cache Information

    - - - - - - - - - - -
    Cached Variables$number_vars ($size_vars)
    Hits{$cache_user['num_hits']}
    Misses{$cache_user['num_misses']}
    Request Rate (hits, misses)$req_rate_user cache requests/second
    Hit Rate$hit_rate_user cache requests/second
    Miss Rate$miss_rate_user cache requests/second
    Insert Rate$insert_rate_user cache requests/second
    Cache full count{$cache_user['expunges']}
    -
    - -

    Runtime Settings

    -EOB; - - $j = 0; - foreach (ini_get_all('apc') as $k => $v) { - echo "\n"; - $j = 1 - $j; - } - - if($mem['num_seg']>1 || $mem['num_seg']==1 && count($mem['block_lists'][0])>1) - $mem_note = "Memory Usage
    (multiple slices indicate fragments)"; - else - $mem_note = "Memory Usage"; - - echo <<< EOB -
    ",$k,"",str_replace(',',',
    ',$v['local_value']),"
    -
    - -

    Host Status Diagrams

    - -EOB; - $size='width='.(GRAPH_SIZE+50).' height='.(GRAPH_SIZE+10); - echo << - - - -EOB; - - echo - graphics_avail() ? - ''. - "". - "\n" - : "", - '', - '\n", - '\n", - '', - '', - '\n", - '\n"; - echo <<< EOB - -
    $mem_noteHits & Misses
    \"\"\"\"
     Free: ',bsize($mem_avail).sprintf(" (%.1f%%)",$mem_avail*100/$mem_size)," Hits: ',$cache['num_hits'].sprintf(" (%.1f%%)",$cache['num_hits']*100/($cache['num_hits']+$cache['num_misses'])),"
     Used: ',bsize($mem_used ).sprintf(" (%.1f%%)",$mem_used *100/$mem_size)," Misses: ',$cache['num_misses'].sprintf(" (%.1f%%)",$cache['num_misses']*100/($cache['num_hits']+$cache['num_misses'])),"
    - -
    -

    Detailed Memory Usage and Fragmentation

    - - - - -EOB; - if(isset($mem['adist'])) { - foreach($mem['adist'] as $i=>$v) { - $cur = pow(2,$i); $nxt = pow(2,$i+1)-1; - if($i==0) $range = "1"; - else $range = "$cur - $nxt"; - echo "\n"; - } - } - echo <<

    -EOB; - - // Fragementation: (freeseg - 1) / total_seg - $nseg = $freeseg = $fragsize = $freetotal = 0; - for($i=0; $i<$mem['num_seg']; $i++) { - $ptr = 0; - foreach($mem['block_lists'][$i] as $block) { - if ($block['offset'] != $ptr) { - ++$nseg; - } - $ptr = $block['offset'] + $block['size']; - /* Only consider blocks <5M for the fragmentation % */ - if($block['size']<(5*1024*1024)) $fragsize+=$block['size']; - $freetotal+=$block['size']; - } - $freeseg += count($mem['block_lists'][$i]); - } - - if ($freeseg > 1) { - $frag = sprintf("%.2f%% (%s out of %s in %d fragments)", ($fragsize/$freetotal)*100,bsize($fragsize),bsize($freetotal),$freeseg); - } else { - $frag = "0%"; - } - - if (graphics_avail()) { - $size='width='.(2*GRAPH_SIZE+150).' height='.(GRAPH_SIZE+10); - echo << -EOB; - } - echo <<Fragmentation: $frag -
    $range$v
    -
    -EOB; - - break; - - -// ----------------------------------------------- -// User Cache Entries -// ----------------------------------------------- -case OB_USER_CACHE: - if (!$AUTHENTICATED) { - echo '
    You need to login to see the user values here!
     
    '; - put_login_link("Login now!"); - echo '
    '; - break; - } - $fieldname='info'; - $fieldheading='User Entry Label'; - $fieldkey='info'; - -// ----------------------------------------------- -// System Cache Entries -// ----------------------------------------------- -case OB_SYS_CACHE: - if (!isset($fieldname)) - { - $fieldname='filename'; - $fieldheading='Script Filename'; - if(ini_get("apc.stat")) $fieldkey='inode'; - else $fieldkey='filename'; - } - if (!empty($MYREQUEST['SH'])) - { - echo <<< EOB -
    - -EOB; - - $m=0; - foreach($scope_list as $j => $list) { - foreach($cache[$list] as $i => $entry) { - if (md5($entry[$fieldkey])!=$MYREQUEST['SH']) continue; - foreach($entry as $k => $value) { - if (!$AUTHENTICATED) { - // hide all path entries if not logged in - $value=preg_replace('/^.*(\\/|\\\\)/','<hidden>/',$value); - } - - if ($k == "num_hits") { - $value=sprintf("%s (%.2f%%)",$value,$value*100/$cache['num_hits']); - } - if ($k == 'deletion_time') { - if(!$entry['deletion_time']) $value = "None"; - } - echo - "", - "", - "", - ""; - $m=1-$m; - } - if($fieldkey=='info') { - echo "\n"; - } - break; - } - } - - echo <<
    AttributeValue
    ",ucwords(preg_replace("/_/"," ",$k)),"",(preg_match("/time/",$k) && $value!='None') ? date(DATE_FORMAT,$value) : $value,"
    Stored Value
    ";
    -					$output = var_export(apc_fetch($entry[$fieldkey]),true);
    -					echo htmlspecialchars($output);
    -					echo "
    -
    -EOB; - break; - } - - $cols=6; - echo <<
    Scope: - - ", - ", Sorting:', - '', - '', - '  Search: ', - ' ', - '
    '; - - if (isset($MYREQUEST['SEARCH'])) { - // Don't use preg_quote because we want the user to be able to specify a - // regular expression subpattern. - $MYREQUEST['SEARCH'] = '/'.str_replace('/', '\\/', $MYREQUEST['SEARCH']).'/i'; - if (preg_match($MYREQUEST['SEARCH'], 'test') === false) { - echo '
    Error: enter a valid regular expression as a search query.
    '; - break; - } - } - - echo - '
    ', - '', - '', - '', - '', - '', - '', - ''; - - if($fieldname=='info') { - $cols+=2; - echo ''; - } - echo ''; - - // builds list with alpha numeric sortable keys - // - $list = array(); - foreach($cache[$scope_list[$MYREQUEST['SCOPE']]] as $i => $entry) { - switch($MYREQUEST['SORT1']) { - case 'A': $k=sprintf('%015d-',$entry['access_time']); break; - case 'H': $k=sprintf('%015d-',$entry['num_hits']); break; - case 'Z': $k=sprintf('%015d-',$entry['mem_size']); break; - case 'M': $k=sprintf('%015d-',$entry['mtime']); break; - case 'C': $k=sprintf('%015d-',$entry['creation_time']); break; - case 'T': $k=sprintf('%015d-',$entry['ttl']); break; - case 'D': $k=sprintf('%015d-',$entry['deletion_time']); break; - case 'S': $k=''; break; - } - if (!$AUTHENTICATED) { - // hide all path entries if not logged in - $list[$k.$entry[$fieldname]]=preg_replace('/^.*(\\/|\\\\)/','<hidden>/',$entry); - } else { - $list[$k.$entry[$fieldname]]=$entry; - } - } - - if ($list) { - - // sort list - // - switch ($MYREQUEST['SORT2']) { - case "A": krsort($list); break; - case "D": ksort($list); break; - } - - // output list - $i=0; - foreach($list as $k => $entry) { - if(!$MYREQUEST['SEARCH'] || preg_match($MYREQUEST['SEARCH'], $entry[$fieldname]) != 0) { - echo - '', - "', - '', - '', - '', - '', - ''; - - if($fieldname=='info') { - if($entry['ttl']) - echo ''; - else - echo ''; - } - if ($entry['deletion_time']) { - - echo ''; - } else if ($MYREQUEST['OB'] == OB_USER_CACHE) { - - echo ''; - } else { - echo ''; - } - echo ''; - $i++; - if ($i == $MYREQUEST['COUNT']) - break; - } - } - - } else { - echo ''; - } - echo <<< EOB -
    ',sortheader('S',$fieldheading, "&OB=".$MYREQUEST['OB']),'',sortheader('H','Hits', "&OB=".$MYREQUEST['OB']),'',sortheader('Z','Size', "&OB=".$MYREQUEST['OB']),'',sortheader('A','Last accessed',"&OB=".$MYREQUEST['OB']),'',sortheader('M','Last modified',"&OB=".$MYREQUEST['OB']),'',sortheader('C','Created at', "&OB=".$MYREQUEST['OB']),'',sortheader('T','Timeout',"&OB=".$MYREQUEST['OB']),'',sortheader('D','Deleted at',"&OB=".$MYREQUEST['OB']),'
    ",$entry[$fieldname],'',$entry['num_hits'],'',$entry['mem_size'],'',date(DATE_FORMAT,$entry['access_time']),'',date(DATE_FORMAT,$entry['mtime']),'',date(DATE_FORMAT,$entry['creation_time']),''.$entry['ttl'].' secondsNone', date(DATE_FORMAT,$entry['deletion_time']), ''; - echo '[Delete Now]'; - echo '  
    No data
    -EOB; - - if ($list && $i < count($list)) { - echo "",count($list)-$i,' more available...'; - } - - echo <<< EOB -
    -EOB; - break; - - -// ----------------------------------------------- -// Per-Directory System Cache Entries -// ----------------------------------------------- -case OB_SYS_CACHE_DIR: - if (!$AUTHENTICATED) { - break; - } - - echo <<
    Scope: - - ", - ", Sorting:', - '', - '', - ", Group By Dir Level:', - ' ', - '
    ', - - '
    ', - '', - '', - '', - '', - '', - '', - '', - ''; - - // builds list with alpha numeric sortable keys - // - $tmp = $list = array(); - foreach($cache[$scope_list[$MYREQUEST['SCOPE']]] as $entry) { - $n = dirname($entry['filename']); - if ($MYREQUEST['AGGR'] > 0) { - $n = preg_replace("!^(/?(?:[^/\\\\]+[/\\\\]){".($MYREQUEST['AGGR']-1)."}[^/\\\\]*).*!", "$1", $n); - } - if (!isset($tmp[$n])) { - $tmp[$n] = array('hits'=>0,'size'=>0,'ents'=>0); - } - $tmp[$n]['hits'] += $entry['num_hits']; - $tmp[$n]['size'] += $entry['mem_size']; - ++$tmp[$n]['ents']; - } - - foreach ($tmp as $k => $v) { - switch($MYREQUEST['SORT1']) { - case 'A': $kn=sprintf('%015d-',$v['size'] / $v['ents']);break; - case 'T': $kn=sprintf('%015d-',$v['ents']); break; - case 'H': $kn=sprintf('%015d-',$v['hits']); break; - case 'Z': $kn=sprintf('%015d-',$v['size']); break; - case 'C': $kn=sprintf('%015d-',$v['hits'] / $v['ents']);break; - case 'S': $kn = $k; break; - } - $list[$kn.$k] = array($k, $v['ents'], $v['hits'], $v['size']); - } - - if ($list) { - - // sort list - // - switch ($MYREQUEST['SORT2']) { - case "A": krsort($list); break; - case "D": ksort($list); break; - } - - // output list - $i = 0; - foreach($list as $entry) { - echo - '', - "', - '', - '', - '', - '', - '', - ''; - - if (++$i == $MYREQUEST['COUNT']) break; - } - - } else { - echo ''; - } - echo <<< EOB -
    ',sortheader('S','Directory Name', "&OB=".$MYREQUEST['OB']),'',sortheader('T','Number of Files',"&OB=".$MYREQUEST['OB']),'',sortheader('H','Total Hits', "&OB=".$MYREQUEST['OB']),'',sortheader('Z','Total Size', "&OB=".$MYREQUEST['OB']),'',sortheader('C','Avg. Hits', "&OB=".$MYREQUEST['OB']),'',sortheader('A','Avg. Size', "&OB=".$MYREQUEST['OB']),'
    ",$entry[0],'',$entry[1],'',$entry[2],'',$entry[3],'',round($entry[2] / $entry[1]),'',round($entry[3] / $entry[1]),'
    No data
    -EOB; - - if ($list && $i < count($list)) { - echo "",count($list)-$i,' more available...'; - } - - echo <<< EOB -
    -EOB; - break; - -// ----------------------------------------------- -// Version check -// ----------------------------------------------- -case OB_VERSION_CHECK: - echo <<

    APC Version Information

    - - - - -EOB; - - $rss = @file_get_contents("http://pecl.php.net/feeds/pkg_apc.rss"); - if (!$rss) { - echo ''; - } else { - $apcversion = phpversion('apc'); - - preg_match('!APC ([0-9.]+)!', $rss, $match); - echo ''; - echo ''; - } - echo <<< EOB -
    Unable to fetch version information.
    '; - if (version_compare($apcversion, $match[1], '>=')) { - echo '
    You are running the latest version of APC ('.$apcversion.')
    '; - $i = 3; - } else { - echo '
    You are running an older version of APC ('.$apcversion.'), - newer version '.$match[1].' is available at - http://pecl.php.net/package/APC/'.$match[1].' -
    '; - $i = -1; - } - echo '

    Change Log:


    '; - - preg_match_all('!<(title|description)>([^<]+)!', $rss, $match); - next($match[2]); next($match[2]); - - while (list(,$v) = each($match[2])) { - list(,$ver) = explode(' ', $v, 2); - if ($i < 0 && version_compare($apcversion, $ver, '>=')) { - break; - } else if (!$i--) { - break; - } - echo "".htmlspecialchars($v)."
    "; - echo nl2br(htmlspecialchars(current($match[2])))."
    "; - next($match[2]); - } - echo '
    - -EOB; - break; - -} - -echo <<< EOB - -EOB; - -?> diff --git a/src/www/include/pre.php b/src/www/include/pre.php index a0b8507a3d2..6c4b21696c4 100644 --- a/src/www/include/pre.php +++ b/src/www/include/pre.php @@ -1,6 +1,6 @@ =')) { - die('Tuleap must be run on a PHP 5.3 (or greater) engine. PHP 7 is not yet supported.'); +if (version_compare(PHP_VERSION, '5.6', '<') && version_compare(PHP_VERSION, '7', '>=')) { + die('Tuleap must be run on a PHP 5.6 (or greater) engine. PHP 7 is not yet supported.'); } require_once('common/constants.php'); diff --git a/tests/Jenkinsfile b/tests/Jenkinsfile index bb59d0daccf..15d5e596421 100644 --- a/tests/Jenkinsfile +++ b/tests/Jenkinsfile @@ -74,27 +74,7 @@ pipeline { stage('Tests') { steps { - parallel 'UT SimpleTest PHP 5.3': { - sh """ - cid="\$(docker create -v \$WORKSPACE/sources:/tuleap:ro \$DOCKER_REGISTRY/enalean/tuleap-simpletest:c6-php53)" - docker start --attach "\$cid" || true - mkdir -p 'results/ut-simpletest-php-53' - docker cp "\$cid":/output/unit_tests_report.xml results/ut-simpletest-php-53/ - docker rm -fv "\$cid" - """ - junit 'results/ut-simpletest-php-53/unit_tests_report.xml' - }, - 'UT PHPUnit PHP 5.3': { - sh """ - cid="\$(docker create -v \$WORKSPACE/sources:/tuleap:ro \$DOCKER_REGISTRY/enalean/tuleap-test-phpunit-c6-php53 --ci)" - docker start --attach "\$cid" || true - mkdir -p 'results/ut-phpunit-php-53' - docker cp "\$cid":/output/phpunit_tests.xml results/ut-phpunit-php-53/ - docker rm -fv "\$cid" - """ - junit 'results/ut-phpunit-php-53/phpunit_tests.xml' - }, - 'UT SimpleTest PHP 5.6': { + parallel 'UT SimpleTest PHP 5.6': { sh """ cid="\$(docker create -v \$WORKSPACE/sources:/tuleap:ro \$DOCKER_REGISTRY/enalean/tuleap-simpletest:c6-php56)" docker start --attach "\$cid" || true @@ -121,13 +101,12 @@ pipeline { 'Karma Label plugin': { runKarmaTests('label', 'plugins/label/www/scripts') }, 'Karma PullRequest plugin': { runKarmaTests('pullrequest', 'plugins/pullrequest/www/js/angular') }, 'Karma CrossTracker plugin': { runKarmaTests('crosstracker', 'plugins/crosstracker/www/scripts') }, - 'REST CentOS 6 PHP 5.3 Apache 2.2 MySQL 5.1': { runRESTTests('c6-php53-httpd22-mysql51') }, 'REST CentOS 6 PHP 5.6 Apache 2.4 MySQL 5.6': { runRESTTests('c6-php56-httpd24-mysql56') }, 'SOAP': { sh """ mkdir -p working_copy/api-soap cp -R sources/* working_copy/api-soap/ - cid="\$(docker create -v \$WORKSPACE/working_copy/api-soap:/usr/share/tuleap \$DOCKER_REGISTRY/enalean/tuleap-test-soap:2)" + cid="\$(docker create -v \$WORKSPACE/working_copy/api-soap:/usr/share/tuleap \$DOCKER_REGISTRY/enalean/tuleap-test-soap:3)" docker start --attach "\$cid" || true mkdir -p 'results/api-soap' docker cp "\$cid":/output/soap_tests.xml results/api-soap/ || true diff --git a/tests/rest/bin/setup.sh b/tests/rest/bin/setup.sh index bb4acba62f3..99f3341b9d8 100755 --- a/tests/rest/bin/setup.sh +++ b/tests/rest/bin/setup.sh @@ -7,25 +7,22 @@ if [ -z "$MYSQL_DAEMON" ]; then fi if [ -z "$HTTPD_DAEMON" ]; then - HTTPD_DAEMON=httpd + HTTPD_DAEMON=httpd24-httpd fi setup_apache() { echo "Setup $HTTPD_DAEMON" case "$HTTPD_DAEMON" in - httpd24-httpd) - CONF_DIR=/opt/rh/httpd24/root/etc/httpd - TAG=httpd24 - setup_apache_service_for_httpd24 - ;; nginx) type=nginx CONF_DIR=/etc/nginx/ TAG=nginx ;; *) - CONF_DIR=/etc/httpd - TAG=httpd22 + CONF_DIR=/opt/rh/httpd24/root/etc/httpd + TAG=httpd24 + setup_apache_service_for_httpd24 + ;; esac if [ "$type" == "nginx" ]; then cp /usr/share/tuleap/tests/rest/etc/rest-tests.$TAG.conf $CONF_DIR/nginx.conf @@ -156,7 +153,7 @@ seed_data() { load_project /usr/share/tuleap/tests/rest/_fixtures/10-permissions-on-artifacts echo "Load initial data" - php -d include_path=/usr/share/tuleap/src/www/include:/usr/share/tuleap/src /usr/share/tuleap/tests/rest/bin/init_data.php + /opt/rh/rh-php56/root/usr/bin/php -d include_path=/usr/share/tuleap/src/www/include:/usr/share/tuleap/src /usr/share/tuleap/tests/rest/bin/init_data.php seed_plugin_data } @@ -170,7 +167,7 @@ seed_plugin_data() { done echo "Load plugins initial data" - php -d include_path=/usr/share/tuleap/src/www/include:/usr/share/tuleap/src /usr/share/tuleap/tests/rest/bin/init_data_plugins.php + /opt/rh/rh-php56/root/usr/bin/php -d include_path=/usr/share/tuleap/src/www/include:/usr/share/tuleap/src /usr/share/tuleap/tests/rest/bin/init_data_plugins.php } setup_tuleap diff --git a/tests/rest/etc/rest-tests.httpd22.conf b/tests/rest/etc/rest-tests.httpd22.conf deleted file mode 100644 index 88352f8380f..00000000000 --- a/tests/rest/etc/rest-tests.httpd22.conf +++ /dev/null @@ -1,27 +0,0 @@ - - ServerName localhost - - DocumentRoot /usr/share/tuleap/src/www - DirectoryIndex index.php - - php_value include_path "/usr/share/pear/:/usr/share/php:/usr/share/tuleap/src/www/include:/usr/share/tuleap/src:." - php_value memory_limit 196M - php_flag short_open_tag on - - - Options Includes FollowSymLinks MultiViews - AllowOverride All - AcceptPathInfo On - Order allow,deny - Allow from all - - - # 2- plugins web/php pages - AliasMatch ^/plugins/([^/]*)/(.*) /usr/share/tuleap/plugins/$1/www/$2 - - Options MultiViews FollowSymlinks - AllowOverride All - Order allow,deny - Allow from all - - diff --git a/tests/soap/bin/setup.sh b/tests/soap/bin/setup.sh index 3ce5cdc2afd..02f38e12e40 100755 --- a/tests/soap/bin/setup.sh +++ b/tests/soap/bin/setup.sh @@ -6,19 +6,12 @@ if [ -z "$MYSQL_DAEMON" ]; then MYSQL_DAEMON=mysqld fi -if [ -z "$HTTPD_DAEMON" ]; then - HTTPD_DAEMON=httpd -fi - setup_apache() { - echo "Setup $HTTPD_DAEMON" - - sed -i -e "s/User apache/User codendiadm/" \ - -e "s/Group apache/Group codendiadm/" /etc/httpd/conf/httpd.conf - - cp /usr/share/tuleap/tests/soap/etc/soap-tests.conf /etc/httpd/conf.d/soap-tests.conf - - service $HTTPD_DAEMON restart + echo "Setup httpd24-httpd" + sed -i -e "s/User apache/User codendiadm/" \ + -e "s/Group apache/Group codendiadm/" /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf + cp /usr/share/tuleap/tests/soap/etc/soap-tests.conf /opt/rh/httpd24/root/etc/httpd/conf.d/soap-tests.conf + service httpd24-httpd restart } setup_tuleap() { @@ -81,6 +74,16 @@ setup_database() { mysql -e "FLUSH PRIVILEGES;" } +setup_fpm() { + echo "Setup FPM rh-php56-php-fpm" + sed -i -e "s/user = apache/user = codendiadm/" \ + -e "s/group = apache/group = codendiadm/" \ + /etc/opt/rh/rh-php56/php-fpm.d/www.conf + cat /usr/share/tuleap/src/etc/fpm.conf.dist >> /etc/opt/rh/rh-php56/php-fpm.d/www.conf + chown -R codendiadm:codendiadm /var/opt/rh/rh-php56/lib/php/session /var/opt/rh/rh-php56/lib/php/wsdlcache + service rh-php56-php-fpm restart +} + load_project() { base_dir=$1 @@ -96,12 +99,13 @@ seed_data() { load_project /usr/share/tuleap/tests/soap/_fixtures/01-project echo "Load initial data" - php -d include_path=/usr/share/tuleap/src/www/include:/usr/share/tuleap/src /usr/share/tuleap/tests/soap/bin/init_data.php + /opt/rh/rh-php56/root/usr/bin/php -d include_path=/usr/share/tuleap/src/www/include:/usr/share/tuleap/src /usr/share/tuleap/tests/soap/bin/init_data.php } setup_tuleap +setup_fpm setup_apache setup_database seed_data diff --git a/tests/soap/bin/test_suite.sh b/tests/soap/bin/test_suite.sh index 6656d52398d..504c2172a28 100755 --- a/tests/soap/bin/test_suite.sh +++ b/tests/soap/bin/test_suite.sh @@ -7,11 +7,11 @@ setup_composer() { } generate_testsuite() { - php /usr/share/tuleap/tests/soap/bin/generate-testsuite.php /tmp /output + /opt/rh/rh-php56/root/usr/bin/php /usr/share/tuleap/tests/soap/bin/generate-testsuite.php /tmp /output } run_testsuite() { - /usr/share/tuleap/tests/soap/vendor/bin/phpunit --configuration /tmp/suite.xml + /opt/rh/rh-php56/root/usr/bin/php /usr/share/tuleap/tests/soap/vendor/bin/phpunit --configuration /tmp/suite.xml } setup_composer diff --git a/tests/soap/etc/soap-tests.conf b/tests/soap/etc/soap-tests.conf index 123483cc163..f6ac37dcccc 100644 --- a/tests/soap/etc/soap-tests.conf +++ b/tests/soap/etc/soap-tests.conf @@ -4,24 +4,24 @@ DocumentRoot /usr/share/tuleap/src/www DirectoryIndex index.php - Include conf.d/php.conf - php_value include_path "/usr/share/pear/:/usr/share/php:/usr/share/tuleap/src/www/include:/usr/share/tuleap/src:." - php_value memory_limit 196M - + + SetHandler "proxy:fcgi://127.0.0.1:9000" + Options Includes FollowSymLinks MultiViews AllowOverride All AcceptPathInfo On - Order allow,deny - Allow from all + Require all granted # 2- plugins web/php pages AliasMatch ^/plugins/([^/]*)/(.*) /usr/share/tuleap/plugins/$1/www/$2 + + SetHandler "proxy:fcgi://127.0.0.1:9000" + Options MultiViews FollowSymlinks AllowOverride All - Order allow,deny - Allow from all + Require all granted diff --git a/tools/distlp/backend-web/nginx/tuleap.conf b/tools/distlp/backend-web/nginx/tuleap.conf index f7102fe3021..b8b09526cb0 100644 --- a/tools/distlp/backend-web/nginx/tuleap.conf +++ b/tools/distlp/backend-web/nginx/tuleap.conf @@ -9,8 +9,4 @@ server { client_max_body_size 50M; include conf.d/tuleap.d/*.conf; - - # Available here in case of emergency, uncomment the - # line below (and comment the line above) - #include conf.d/tuleap-apache.proxy; } diff --git a/tools/rpm/Makefile b/tools/rpm/Makefile index 70f7e9fcdca..d7edd1d888b 100644 --- a/tools/rpm/Makefile +++ b/tools/rpm/Makefile @@ -1,5 +1,4 @@ RPM_TMP=$(HOME)/rpmbuild -PHP_BASE=php BASE_DIR=$(shell cd ../..; pwd) SHELL=/bin/bash @@ -59,7 +58,6 @@ RPMBUILD = rpmbuild --define "%_topdir $(RPM_TMP)" \ --define "%_tmppath %{_topdir}/TMP" \ --define "%_buildroot %{_tmppath}/%{name}-root" \ --define "%_sysconfdir /etc" \ - --define "%php_base $(PHP_BASE)" ifeq ($(strip $(OS)),rhel6) DIST= @@ -70,7 +68,6 @@ else ifeq ($(strip $(OS)),rhel7) SPEC_FILE=tuleap.rhel7.spec DIST=.el7 -PHP_BASE=rh-php56-php SRPMS=$(RPM_TMP)/SRPMS/$(PKG_NAME)-$(version)-$(RELEASE)$(DIST).src.rpm RPMBUILD += --define "%dist $(DIST)" else diff --git a/tools/rpm/tuleap.rhel6.spec b/tools/rpm/tuleap.rhel6.spec index a1cf56098b9..9a882239ade 100644 --- a/tools/rpm/tuleap.rhel6.spec +++ b/tools/rpm/tuleap.rhel6.spec @@ -44,8 +44,6 @@ AutoReqProv: no Requires: vixie-cron >= 4.1-9, tmpwatch # Php and web related stuff -Requires: %{php_base}, %{php_base}-mysql, %{php_base}-xml, %{php_base}-mbstring, %{php_base}-gd, %{php_base}-soap, %{php_base}-pear, gd, %{php_base}-intl -Requires: %{php_base}-process Requires: rh-php56-php-mysqlnd, rh-php56-php-pdo, rh-php56-php-xml, rh-php56-php-mbstring, rh-php56-php-gd, Requires: rh-php56-php-soap, rh-php56-php-pear, rh-php56-php-intl, rh-php56-php-process, rh-php56-php-cli Requires: rh-php56-php-bcmath, rh-php56-php-fpm, rh-php56-php-opcache, rh-php56-php-pecl-jsonc @@ -53,12 +51,10 @@ Requires: dejavu-lgc-sans-fonts, dejavu-lgc-sans-mono-fonts, dejavu-lgc-serif-fo Requires: jpgraph-%{PKG_NAME} Requires: ckeditor >= 4.3.2 -Requires: %{php_base}-password-compat -Requires: %{php_base}-pecl-apc Requires: curl Requires: php-ZendFramework2-Loader, php-ZendFramework2-Mail -Requires: %{php_base}-markdown +Requires: php-markdown Requires: tuleap-core-subversion # PHPWiki @@ -86,7 +82,7 @@ Requires(post): policycoreutils-python # Bind utils Requires: bind-utils -Obsoletes: %{php_base}-restler, php-amqplib-amqplib +Obsoletes: php-restler, php-amqplib-amqplib %description Tuleap is a web based application that address all the aspects of product development. @@ -160,7 +156,7 @@ Summary: ForumML plugin for Tuleap Group: Development/Tools Version: @@PLUGIN_FORUMML_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} -Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, %{php_base}-pear-Mail-mimeDecode %{php_base}-pear-Mail-Mime %{php_base}-pear-Mail-Mbox %{php_base}-pear-Mail +Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, php-pear-Mail-mimeDecode php-pear-Mail-Mime php-pear-Mail-Mbox php-pear-Mail Requires: tuleap-core-mailman Provides: tuleap-plugin-forumml = %{version} %description plugin-forumml @@ -184,7 +180,7 @@ Group: Development/Tools Version: @@PLUGIN_GIT_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} AutoReqProv: no -Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, git > 1.7.4, %{php_base}-Smarty, %{php_base}-markdown, gitolite = 2.3.1, gitphp-tuleap >= 0.2.5-15 +Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, git > 1.7.4, php-Smarty, php-markdown, gitolite = 2.3.1, gitphp-tuleap >= 0.2.5-15 Requires: geshi, php-guzzle-Guzzle, sudo Provides: tuleap-plugin-git = %{version} Conflicts: tuleap-plugin-git-gitolite3 @@ -199,7 +195,7 @@ Group: Development/Tools Version: @@PLUGIN_GIT_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} AutoReqProv: no -Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, rh-git29-git, %{php_base}-Smarty, %{php_base}-markdown, gitolite3, gitphp-tuleap >= 0.2.5-15 +Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, rh-git29-git, php-Smarty, php-markdown, gitolite3, gitphp-tuleap >= 0.2.5-15 Requires: geshi, php-guzzle-Guzzle, sudo Provides: tuleap-plugin-git = %{version} Conflicts: tuleap-plugin-git @@ -222,7 +218,7 @@ Summary: Tuleap plugin to manage LDAP integration Group: Development/Tools Version: @@PLUGIN_LDAP_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} -Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, %{php_base}-ldap, perl-LDAP, python-ldap, rh-php56-php-ldap +Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, perl-LDAP, python-ldap, rh-php56-php-ldap Provides: tuleap-plugin-ldap = %{version} %description plugin-ldap LDAP Plugin for Tuleap. Provides LDAP information, LDAP @@ -273,7 +269,7 @@ Group: Development/Tools Version: @@PLUGIN_WEBDAV_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist} -Requires: %{php_base}-sabredav = 1.4.4 +Requires: php-sabredav = 1.4.4 %description plugin-webdav Plugin to access to file releases & docman though WebDAV @@ -283,7 +279,7 @@ Summary: Tracker v5 for Tuleap Group: Development/Tools Version: @@PLUGIN_TRACKER_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} -Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, libxslt, %{php_base}-imap, rh-php56-php-imap +Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, libxslt, rh-php56-php-imap %description plugin-tracker New tracker generation for Tuleap. @@ -333,7 +329,7 @@ Group: Development/Tools Version: @@PLUGIN_FULLTEXTSEARCH_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist} -Requires: %{php_base}-elasticsearch +Requires: php-elasticsearch %description plugin-fulltextsearch Allows documents of the docman to be searched in a full-text manner. @@ -371,7 +367,7 @@ Group: Development/Tools Version: @@PLUGIN_OPENIDCONNECTCLIENT_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist} -Requires: %{php_base}-openid-connect-client +Requires: php-openid-connect-client %description plugin-openidconnectclient Connect to Tuleap using an OpenID Connect provider @@ -381,7 +377,7 @@ Group: Development/Tools Version: @@PLUGIN_PROFTPD_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist} -Requires: %{php_base}-pear-HTTP-Download >= 1.1.4-3 +Requires: php-pear-HTTP-Download >= 1.1.4-3 %description plugin-proftpd Control and interfact with Proftpd as FTP server diff --git a/tools/rpm/tuleap.rhel7.spec b/tools/rpm/tuleap.rhel7.spec index 75d5b2f7544..c1052ac7b0d 100644 --- a/tools/rpm/tuleap.rhel7.spec +++ b/tools/rpm/tuleap.rhel7.spec @@ -35,7 +35,7 @@ Packager: Manuel VACELET AutoReqProv: no # Php and web related stuff -Requires: %{php_base}, %{php_base}-mysql, %{php_base}-xml, %{php_base}-mbstring, %{php_base}-gd, %{php_base}-soap, %{php_base}-pear, %{php_base}-intl, %{php_base}-process, %{php_base}-opcache, %{php_base}-fpm +Requires: rh-php56-php, rh-php56-php-mysql, rh-php56-php-xml, rh-php56-php-mbstring, rh-php56-php-gd, rh-php56-php-soap, rh-php56-php-pear, rh-php56-php-intl, rh-php56-php-process, rh-php56-php-opcache, rh-php56-php-fpm Requires: highlight @@ -110,7 +110,7 @@ Summary: ForumML plugin for Tuleap Group: Development/Tools Version: @@PLUGIN_FORUMML_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} -#Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, %{php_base}-pear-Mail-mimeDecode %{php_base}-pear-Mail-Mime %{php_base}-pear-Mail-Mbox %{php_base}-pear-Mail +#Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, php-pear-Mail-mimeDecode php-pear-Mail-Mime php-pear-Mail-Mbox php-pear-Mail #Requires: tuleap-core-mailman %description plugin-forumml ForumML brings to Tuleap a very nice mail archive viewer and the possibility @@ -132,7 +132,7 @@ Group: Development/Tools Version: @@PLUGIN_GIT_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} AutoReqProv: no -#Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, git19-git, %{php_base}-Smarty, %{php_base}-markdown, gitolite3, gitphp-tuleap >= 0.2.5-15 +#Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, git19-git, php-Smarty, php-markdown, gitolite3, gitphp-tuleap >= 0.2.5-15 #Requires: geshi, php-guzzle-Guzzle, sudo %description plugin-git Integration of git distributed software configuration management tool together @@ -153,7 +153,7 @@ Summary: Tuleap plugin to manage LDAP integration Group: Development/Tools Version: @@PLUGIN_LDAP_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} -Requires: %{php_base}-ldap, perl-LDAP, python-ldap +Requires: rh-php56-php-ldap, perl-LDAP, python-ldap %description plugin-ldap LDAP Plugin for Tuleap. Provides LDAP information, LDAP authentication, user and group management. @@ -191,7 +191,7 @@ Group: Development/Tools Version: @@PLUGIN_WEBDAV_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist} -#Requires: %{php_base}-sabredav = 1.4.4 +#Requires: php-sabredav = 1.4.4 %description plugin-webdav Plugin to access to file releases & docman though WebDAV @@ -201,7 +201,7 @@ Summary: Tracker v5 for Tuleap Group: Development/Tools Version: @@PLUGIN_TRACKER_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} -Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, libxslt, %{php_base}-imap +Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist}, libxslt, rh-php56-php-imap %description plugin-tracker New tracker generation for Tuleap. @@ -251,7 +251,7 @@ Group: Development/Tools Version: @@PLUGIN_FULLTEXTSEARCH_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist} -#Requires: %{php_base}-elasticsearch +#Requires: php-elasticsearch %description plugin-fulltextsearch Allows documents of the docman to be searched in a full-text manner. @@ -280,7 +280,7 @@ Group: Development/Tools Version: @@PLUGIN_OPENIDCONNECTCLIENT_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist} -#Requires: %{php_base}-openid-connect-client +#Requires: php-openid-connect-client %description plugin-openidconnectclient Connect to Tuleap using an OpenID Connect provider @@ -290,7 +290,7 @@ Group: Development/Tools Version: @@PLUGIN_PROFTPD_VERSION@@ Release: @@VERSION@@_@@RELEASE@@%{?dist} Requires: %{name} = @@VERSION@@-@@RELEASE@@%{?dist} -#Requires: %{php_base}-pear-HTTP-Download >= 1.1.4-3 +#Requires: php-pear-HTTP-Download >= 1.1.4-3 %description plugin-proftpd Control and interfact with Proftpd as FTP server diff --git a/tools/setup.sh b/tools/setup.sh index 450bf2a026d..12004bbfde1 100755 --- a/tools/setup.sh +++ b/tools/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) Enalean, Tuleap 2011-2016 +# Copyright (c) Enalean, Tuleap 2011-2018 # Copyright (c) STMicroelectronics, Codex 2009,2010 # Copyright (c) Xerox Corporation, Codendi 2001-2009. # @@ -55,7 +55,7 @@ MV='/bin/mv' MYSQL='/usr/bin/mysql' MYSQLSHOW='/usr/bin/mysqlshow' PERL='/usr/bin/perl' -PHP='/usr/bin/php' +PHP='/opt/rh/rh-php56/root/usr/bin/php' RM='/bin/rm' RPM='/bin/rpm' SERVICE='/sbin/service' @@ -592,7 +592,7 @@ setup_apache() { local httpdconfd="/etc/httpd/conf.d" local logrtd="/etc/logrotate.d" local filesconf=('httpd.conf' 'ssl.conf') - local filesconfd=('php.conf' 'subversion.conf' 'tuleap-vhost.conf' 'tuleap-svnroot.conf') + local filesconfd=('subversion.conf' 'tuleap-vhost.conf' 'tuleap-svnroot.conf') echo "Renaming existing Apache configuration files..." cd ${httpdconfd}