mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2025-02-09 20:58:31 +00:00
Fix Apache running on PHP 5.3 instead of 5.5
This commit is contained in:
parent
6352c630ce
commit
2135f26ea0
30
.travis.yml
30
.travis.yml
@ -9,16 +9,23 @@ matrix:
|
|||||||
- php: 7.0
|
- php: 7.0
|
||||||
before_script:
|
before_script:
|
||||||
- sudo apt-get update -qq
|
- sudo apt-get update -qq
|
||||||
# Install Apache
|
- sudo apt-get install -y --force-yes apache2 libapache2-mod-fastcgi php5-curl php5-mysql php5-intl php5-gd > /dev/null
|
||||||
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-intl php5-gd > /dev/null
|
- sudo mkdir $(pwd)/.run
|
||||||
- sudo /etc/init.d/apache2 stop
|
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||||
- sudo sed -i -e "s,APACHE_RUN_USER=www-data,APACHE_RUN_USER=$USER,g" /etc/apache2/envvars
|
- sudo sed -e "s,listen = 127.0.0.1:9000,listen = /tmp/php5-fpm.sock,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||||
- sudo sed -i -e "s,APACHE_RUN_GROUP=www-data,APACHE_RUN_GROUP=$USER,g" /etc/apache2/envvars
|
- sudo sed -e "s,;listen.owner = nobody,listen.owner = $USER,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||||
- sudo chown -R $USER /var/lock/apache2
|
- sudo sed -e "s,;listen.group = nobody,listen.group = $USER,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||||
- sudo chown -R $USER:$USER /var/www
|
- sudo sed -e "s,;listen.mode = 0660,listen.mode = 0666,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||||
- ln -s $TRAVIS_BUILD_DIR/tests/ /var/www/tests
|
- sudo sed -e "s,user = nobody,;user = $USER,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||||
- sudo sed -i -e "s,AllowOverride[ ]None,AllowOverride All,g" /etc/apache2/sites-available/default
|
- sudo sed -e "s,group = nobody,;group = $USER,g" --in-place ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||||
- sudo /etc/init.d/apache2 start
|
- cat ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||||
|
- sudo a2enmod rewrite actions fastcgi alias
|
||||||
|
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||||
|
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
||||||
|
- sudo cp -f tests/travis-ci-apache.conf /etc/apache2/sites-available/default
|
||||||
|
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
- sudo service apache2 restart
|
||||||
# Xvfb
|
# Xvfb
|
||||||
- "export DISPLAY=:99.0"
|
- "export DISPLAY=:99.0"
|
||||||
- "sh -e /etc/init.d/xvfb start"
|
- "sh -e /etc/init.d/xvfb start"
|
||||||
@ -27,8 +34,9 @@ before_script:
|
|||||||
- sudo apt-get install fluxbox -y --force-yes
|
- sudo apt-get install fluxbox -y --force-yes
|
||||||
- fluxbox &
|
- fluxbox &
|
||||||
- sleep 3 # give fluxbox some time to start
|
- sleep 3 # give fluxbox some time to start
|
||||||
|
# Composer
|
||||||
- composer install
|
- composer install
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- mv tests/acceptance.suite.dist.yml tests/acceptance.suite.yml
|
- mv tests/acceptance.suite.dist.yml tests/acceptance.suite.yml
|
||||||
- vendor/bin/robo run:tests
|
- vendor/bin/robo run:tests true
|
||||||
|
18
RoboFile.php
18
RoboFile.php
@ -35,18 +35,17 @@ class RoboFile extends \Robo\Tasks
|
|||||||
/**
|
/**
|
||||||
* Executes all the Selenium System Tests in a suite on your machine
|
* Executes all the Selenium System Tests in a suite on your machine
|
||||||
*
|
*
|
||||||
* @param string $seleniumPath Optional path to selenium-standalone-server-x.jar
|
* @param bool $use_htaccess Renames and enable embedded Joomla .htaccess file
|
||||||
* @param string $suite Optional, the name of the tests suite
|
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function runTests($seleniumPath = null, $suite = 'acceptance')
|
public function runTests($use_htaccess = false)
|
||||||
{
|
{
|
||||||
$this->configuration = $this->getConfiguration();
|
$this->configuration = $this->getConfiguration();
|
||||||
|
|
||||||
$this->setExecExtension();
|
$this->setExecExtension();
|
||||||
|
|
||||||
$this->createTestingSite();
|
$this->createTestingSite($use_htaccess);
|
||||||
|
|
||||||
$this->getComposer();
|
$this->getComposer();
|
||||||
|
|
||||||
@ -161,8 +160,10 @@ class RoboFile extends \Robo\Tasks
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a testing Joomla site for running the tests (use it before run:test)
|
* Creates a testing Joomla site for running the tests (use it before run:test)
|
||||||
|
*
|
||||||
|
* @param bool $use_htaccess (1/0) Rename and enable embedded Joomla .htaccess file
|
||||||
*/
|
*/
|
||||||
public function createTestingSite()
|
public function createTestingSite($use_htaccess = false)
|
||||||
{
|
{
|
||||||
// Caching cloned installations locally
|
// Caching cloned installations locally
|
||||||
if (!is_dir('tests/cache') || (time() - filemtime('tests/cache') > 60 * 60 * 24))
|
if (!is_dir('tests/cache') || (time() - filemtime('tests/cache') > 60 * 60 * 24))
|
||||||
@ -180,6 +181,13 @@ class RoboFile extends \Robo\Tasks
|
|||||||
$this->_copyDir('tests/cache', 'tests/joomla-cms3');
|
$this->_copyDir('tests/cache', 'tests/joomla-cms3');
|
||||||
|
|
||||||
$this->say('Joomla CMS site created at tests/joomla-cms3');
|
$this->say('Joomla CMS site created at tests/joomla-cms3');
|
||||||
|
|
||||||
|
// Optionally uses Joomla default htaccess file
|
||||||
|
if ($use_htaccess == true)
|
||||||
|
{
|
||||||
|
$this->_copy('tests/joomla-cms3/htaccess.txt', 'tests/joomla-cms3/.htaccess');
|
||||||
|
$this->_exec('sed -e "s,# RewriteBase /,RewriteBase /tests/joomla-cms3/,g" --in-place tests/joomla-cms3/.htaccess');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
26
tests/travis-ci-apache.conf
Normal file
26
tests/travis-ci-apache.conf
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
DocumentRoot %TRAVIS_BUILD_DIR%
|
||||||
|
|
||||||
|
<Directory />
|
||||||
|
Options FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory "%TRAVIS_BUILD_DIR%">
|
||||||
|
Options FollowSymLinks MultiViews ExecCGI
|
||||||
|
AllowOverride All
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# Wire up Apache to use Travis CI's php-fpm.
|
||||||
|
<IfModule mod_fastcgi.c>
|
||||||
|
AddHandler php5-fcgi .php
|
||||||
|
Action php5-fcgi /php5-fcgi
|
||||||
|
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
||||||
|
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /tmp/php5-fpm.sock -pass-header Authorization
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
</VirtualHost>
|
Loading…
x
Reference in New Issue
Block a user