savannah-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-cvs] [380] Update after trying on Trisquel 8.0.


From: ineiev
Subject: [Savannah-cvs] [380] Update after trying on Trisquel 8.0.
Date: Tue, 21 May 2019 04:39:05 -0400 (EDT)

Revision: 380
          
http://svn.savannah.gnu.org/viewvc/?view=rev&root=administration&revision=380
Author:   ineiev
Date:     2019-05-21 04:39:05 -0400 (Tue, 21 May 2019)
Log Message:
-----------
Update after trying on Trisquel 8.0.

Modified Paths:
--------------
    trunk/sviki/RunningSavaneLocally.mdwn

Modified: trunk/sviki/RunningSavaneLocally.mdwn
===================================================================
--- trunk/sviki/RunningSavaneLocally.mdwn       2019-05-20 07:22:58 UTC (rev 
379)
+++ trunk/sviki/RunningSavaneLocally.mdwn       2019-05-21 08:39:05 UTC (rev 
380)
@@ -23,20 +23,21 @@
 Either use our demo server, or create a local MySQL server (instructions
 for both, below).
 
-    # Install required packages
+    # Install required packages.
+    # Use php-mysql for PHP 7.0.
     sudo apt-get install -y git php5-cli php5-mysql mysql-client \
                             imagemagick autoconf automake gettext make
 
-    # Get Savane code
+    # Get Savane code.
     git clone git://git.sv.gnu.org/administration/savane.git
     cd savane
 
-    # Run required initialization
+    # Run required initialization.
     ./bootstrap
     ./configure
     make
 
-    # Start local server
+    # Start local server.
     ./run-local-dev.sh
 
 Once the PHP server is started, you'll see this message:
@@ -94,12 +95,10 @@
 
 ## Supported PHP versions
 
-Savannah currently requires **php version 5.4, 5.5 or 5.6**.
+Savannah currently requires **php version 5.4, 5.5, 5.6 or 7.0**.
 Earlier versions will not work locally (the script requires `php
--S`). Newer versions (**php 7.0**) fail to run some of savane's old
-code (fixes and patches are *very* welcomed).
+-S`).
 
-
 ## Other environments/distributions
 
 As long as you have PHP 5.4/5.5/5.6 with MySQL, savane should mostly
@@ -113,11 +112,115 @@
                             ImageMagick php-cli php-mysqlnd \
                             community-mysql perl-ExtUtils-MakeMaker
 
-However Fedora25 moved to PHP-7.0, and so the code won't "just work".
-(If you want to help adjusting savannah's PHP code to PHP-7.0, this
-will be a good way to start).
+However Fedora25 moved to PHP-7.0, and so the code didn't "just work".
 
+With MySQL 5.7 and later, be sure to exclude ONLY_FULL_GROUP_BY
+from sql_mode e.g. in my.cnf.
 
+On Trisquel 8, it isn't fully functional: pages like /bugs/?12345 work,
+pages like /users/agn don't.  Use Apache with a configuration
+like this:
+
+~~~~~
+Listen 127.0.0.51:80 http
+
+<VirtualHost 127.0.0.51:80>
+  ServerAdmin address@hidden
+  ServerName 127.0.0.1
+
+  DocumentRoot /var/www/savane/frontend/php
+
+  SetEnv SAVANE_CONF /var/www/etc/savane
+
+  <Directory "/var/www/savane/frontend/php/">
+    # PHP conf
+    php_admin_flag register_globals off
+    php_admin_flag magic_quotes_gpc off
+    php_admin_flag file_uploads on
+
+    php_admin_flag allow_url_fopen off
+    # See 
https://lists.gnu.org/mailman/private/savannah-hackers-private/2016-September/003325.html
+    # regarding 'disable_functions'.
+    php_admin_value disable_functions exec,passthru,popen,shell_exec,system
+
+    DirectoryIndex index.php index.html
+  </Directory>
+
+  <Files ~ "^(users|us|u|projects|pr|p|file)$">
+    SetHandler application/x-httpd-php
+  </Files>
+  ErrorDocument 404 /404.php
+
+  # Restrict access into include/
+  <Directory "/var/www/savane/frontend/php/include/">
+    Order Allow,Deny
+    Deny from all
+  </Directory>
+
+
+  <Location "/register">
+    php_admin_value post_max_size 52428800
+    php_admin_value upload_max_filesize 52428800
+  </Location>
+
+
+  # Uploads for new project registrations and bug-report attachments.
+  # This directory must be writable by 'www-data' user.
+  # NOTE: Ensure this directory matches the '$sys_upload_dir' value
+  #       in the custom savanne configuration file
+  #       ($SAVANE_CONF/.savane.conf.php).
+  Alias /submissions_uploads /var/www/var/www/submissions_uploads/
+  <Directory "/var/www/var/www/submissions_uploads/">
+    Options Indexes
+    AllowOverride None
+
+    # Disable script engines
+    # Method 1:
+    #ForceType application/octet-stream
+
+    # Method 2:
+    <IfModule mod_php5.c>
+      # Tested with Apache2 + mod-php5
+      php_admin_flag engine off
+    </IfModule>
+    <IfModule mod_php7.0.c>
+      # Tested with Apache2 + mod-php7
+      php_admin_flag engine off
+    </IfModule>
+
+    <IfModule sapi_apache2.c>
+      # Not working with Apache1 + mod-php5
+      php_admin_flag engine off
+    </IfModule>
+    <IfModule mod_perl.c>
+      # Disable mod_perl
+    </IfModule>
+    # Disable mod_python...
+
+    # Method 3:
+    <FilesMatch ".">
+      SetHandler default-handler
+    </FilesMatch>
+  </Directory>
+  # PHP logs for development site.
+  php_admin_flag log_errors on
+  php_admin_flag display_errors off
+
+  # Set error_reporting = all errors except:
+  #   8192      E_DEPRECATED
+  #   16384     E_USER_DEPRECATED
+  # To include decperation warnings, set the value to E_ALL (32767).
+  # see http://php.net/manual/en/errorfunc.constants.php .
+  php_admin_value error_reporting 8191
+
+  # NOTE: If no errors are generated at all, this file
+  # will not be created (which could be confusing at first...).
+  # Enable deprecation warnings (above) and the file will surely be creatred :)
+  php_admin_value error_log /var/www/var/logs/i18n.php-error.log
+
+</VirtualHost>
+~~~~~
+
 ## Running local MySQL demo database
 
 If you prefer to run a local MySQL server, the following guidelines
@@ -159,4 +262,4 @@
   In your local savannah instance the files are in
   `./savane/etc/site-specific-content`.
 * [[FrontEndSetup]] - how the same PHP code is configured on
-  savannah's servers.
\ No newline at end of file
+  savannah's servers.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]