DREAM

From Informatics

Jump to: navigation, search

The DREAM web site is not an active project, but must be maintained live for archive purpose. This site is basically a wiki site using MediaWiki intermingled to in-house developed php web site.

Contents

file location

The production site is at

/ifs/www/vhosts/wiki.c2b2.columbia.edu/html/dream

We should ssh to web1 and web2 to maintain.

The development/test site is at

/ifs/www/vhosts-dev/wiki.c2b2.columbia.edu/html/dream

We should ssh to webdev2 to maintain. (Note we need to change from vhosts to vhosts-dev for debugging and testing.)

log file location /var/log/uwsgi/wiki.c2b2.columbia.edu-php548c.log

The sudo user account to support this site is wikiuser.

After the latest change, the hard-coded file location should only be in host_dir.php and other files should include that file to get the correct variable $host_dir. In other words, when we switch between production and development, that file should be the only one to be modified. That said, there might be some places still using hard-coded file location (unnoticed).

URL

http://wiki.c2b2.columbia.edu/dream/index.php/The_DREAM_Project

user credentials

To test the pages that require log in, get user credentials from http://wiki.c2b2.columbia.edu/informatics/index.php/Ethan/DREAM/Passwords

latest development activity

12/17/2013

  • issue: many error messages shows up when you log in as the administrator, like the following
Strict Standards: Non-static method ... should not be called statically
  • solution: in skins/Dream.php, change error_reporting(E_ALL) to error_reporting(E_ALL&~E_STRICT)
  • note: this must have been caused by error reporting level setting changed between the different versions of php. Unfortunately, the settings are all over the places in this site (plus out-of-date version of MediaWiki), so hard to fix.

june 2013

Because php version we are using must be upgraded from 5.1.6 to 5.4.8, we made some changes to keep this site live.

Although there seem to be three 'versions' of the site: dream, dream08, and dream09, we only need to support dream. The other two can be ignored, but in case of naught file references from the necessary one, let's keep the files of dream08 and dream09 not removed.

Most of the changes are repeated modification as following (mostly in files named index.php under various subdirectories):

  1. add one at the beginning of the file (right after opening line <?php): require_once( '../../host_dir.php');
  2. replace the hard-coded diretory name with a variable defined in host_dir.php by this command %s/\'\/ifs\/www\/vhosts/$host_dir.\'/g

They are necessary not because of the php version difference, but to handle the hard-coded file path so that it can be tested under the development site. The purpose is to move the hard-coded file path from everywhere to one simple place host_dir.php. When we move the site to production, we need to manually modify this file host_dir.php, but only in one place.

Issues noticed when working with migration to the newer php version

  1. redirecting loop (or reported by the browser as redirected too many times):
  2. short URL like index.php/Page_title not recognized as (in the sense that title is recognized): index.php/?title=Page_title
  3. $wgRequest didn't get title
  4. browser report compression formet (or content encoding) not recognized
  5. error from MediaWiki about NAMESPACE
  6. hard-coded file location, e.g. like /ifs/www/vhosts/wiki.c2b2.columbia.edu/html/dream

Items 1, 2, 3 are in fact caused by the same problem: after the sys admin made certain (untold) change, all the problems are gone. Item 4 is indirect consequence of incorrect file location (item 6). Item 5 is the main issue that causes the site not working with newer php (5.4.8): the version of MediaWiki in use (1.5.6, which can be found in includes/DefaultSettings.php) is not compatible to the new php. I decided to use a simple solution found on the internet instead of upgrading MediaWiki. Item 6 is not the reason for the php version problem, but has to be fixed to test and diagnose.

More info for Issue #2 (Short URL/wiki/Page title not working)

Useful web sites I consulted

earlier work to fix problem caused by hard-coded file location

There are thee dream web sites: dream, dream08, dream09; two tabs from dream09 not working (team ranking and discussion); fixed by modifying the following files:

/ifs/www/vhosts/wiki.c2b2.columbia.edu/html/dream09/discuss/index.php
/ifs/www/vhosts/wiki.c2b2.columbia.edu/html/dream09/results/index.php
/ifs/www/vhosts/wiki.c2b2.columbia.edu/html/dream09/LocalSetting.php

I copied each of changed file from *.php to *.php.zj so we have a record and know what is changed. The change is mainly from incorrect hard-coded path /var/www/html/dream to /ifs/www/vhosts/wiki.c2b2.columbia.edu/html/dream09

Useful tip from Hugh: the log file for these php application is in

/var/log/uwsgi/*php516*/

I need to log in to web1 or web2 and use sudo to make those fixes.

sudo -u wikiuser vi filename

It turned out that we don't need to support dream09 or dream08 as long as dream is there.

files maintained

This section is left-over from very early time and basically can be ignored.

file affected page's URL
data/upload/config.php  ???
data/DREAM5/index.php  ???
data/DREAM5/data.php  ???
?database/config.php (incorrect) database configuration
Personal tools