Deploying Wikis to Sun Java System Web Server 7.0, Part 2: MediaWiki

   
By Sriram Natarajan and Marina Sum, November 21, 2006  

Part 1 of this series describes how to set up and configure JSPWiki and then deploy it to Sun Java System Web Server 7.0 (henceforth, Web Server 7.0), Sun's latest Web Server release, now in technology preview. Part 2 shows you how to deploy a PHP technology-based Wiki site, such as MediaWiki, on Web Server.

MediaWiki is free software—a wiki package that was originally written for Wikipedia. Presently, MediaWiki is the wiki of choice of several other projects of the nonprofit Wikimedia Foundation and other collaborative authoring sites.

Note: Type each of the command lines in this article on one line even though, because of screen width constraints, some of them wrap to the next line.

Contents
 
Understanding the Prerequisites
Installing Web Server 7.0
Installing MySQL
Configuring MySQL for MediaWiki
Installing PHP
Configuring PHP With Web Server 7.0
Verifying PHP Configurations for FastCGI
Transposing PHP Configurations to the Repository
Installing MediaWiki
Configuring MediaWiki With Web Server 7.0
Securing Your MediaWiki Site
Appendix: Troubleshooting Tips
References
 
Understanding the Prerequisites

To host MediaWiki, first install the following components:

  • A Web server, such as Web Server 7.0 — For hosting MediaWiki and serve requests from the browser.
  • MySQL or PostgreSQL — For storing the Web pages created by your Wiki users. Both are popular open-source relational databases (RDBMS).
  • PHP — For rendering dynamic Web content. PHP is a widely used, general-purpose scripting language that can run on any Web server. MediaWiki requires PHP version 5.x or a later version.
Installing Web Server 7.0

Download the latest Technology Preview release of Web Server 7.0. For details, see its Installation and Migration Guide and this blog.

Installing MySQL

MediaWiki stores user-created wikis in a database, such as MySQL or PostgreSQL, both of which are bundled with the Solaris 10 Operating System (OS) and Linux. For simplicity, this article describes how to install MySQL on those two platforms.

If you did not install MySQL as part of the default installation of the Solaris OS or Linux, simply download the tar ball version of the MySQL server's community edition, available for free on the MySQL site.

Procedure

To install MySQL on Solaris 10 OS and Linux:

  1. Become root (superuser) and create a user and group named mysql. Type:

    # groupadd mysql
    # useradd -g mysql mysql
  2. Download the appropriate tar ball (non-RPM and non-Solaris package).

    Note: For simplicity, this article recommends downloading the tar ball. Feel free to download the package and configure MySQL on your machine as you prefer.
  3. Unpack the tar ball. Type, for example:

    # gunzip -c mysql-standard-5.0.27- platform .tar.gz | tar xvfp -
  4. Move the directory to /usr/local, say, /usr/local/mysql, or to the location in which you would like to install the MySQL server. Type:

    # mv mysql-standard-5.0.27- platform /usr/local/mysql
  5. Make the MySQL installation accessible only by the user mysql. Type:

    # chown -R mysql:mysql /usr/local/mysql
    # chmod -R 755 /usr/local/mysql
  6. Read the README and INSTALL-BINARY documents that accompany the distribution.
  7. Run the configure script to configure your MySQL server settings:

    # cd /usr/local/mysql
    # ./configure
  8. Set the root password for MySQL server. Type:

    # ./bin/mysqladmin -u root password password
Verification and Test

Afterwards, verify that the installation is successful:

  1. Type:

    # ./bin/mysql -u root -p
  2. Type the root password for mysql when prompted.

    The prompt changes to the mysql prompt.

To run a test query from the mysql prompt:

  1. Type:

    show databases;

    MySQL displays a grid similar to Figure 1.

    Figure 1: MySQL Display of Database
     
  2. Type:

    quit
Configuring MySQL for MediaWiki

Note this strong recommendation: While hosting MediaWiki, store your users' wikis in a separate database. If you have root access to MySQL, the recent releases of MediaWiki, such as version 1.8.x, can automatically create such a database and you need not do so manually. Otherwise, ask your database administrator to do the following:

# mysql -u root - pMySQL-root-password
# create database wikidb;
# grant create, select, insert, update, delete, lock tables on wikidb.* to wiki@localhost identified byMySQL-root-password
# flush privileges;

You can then store your users' wikis in the wikidb database.

Installing PHP

Recall that MediaWiki internally uses PHP scripts along with databases like MySQL. To deploy MediaWiki, you must first install PHP and a database, both configured for Web Server 7.0. As with any other open-source software, you have several options for installing and configuring PHP with Web Server 7.0.

You can configure PHP either as an NSAPI or as a FastCGI plug-in. For details on the differences between those two plug-ins and their pros and cons, read the article Using PHP on Sun Java System Web Server .

For simplicity, this article describes the steps for configuring PHP as a FastCGI plug-in with Web Server 7.0.

Procedure

You can compile and install PHP from the source, that is, download PHP from php.net and compile PHP yourself. However, you might want to first install the GNU utilities from the Solaris 10 installation CD or DVD.

Note: If you're already using a different distribution of PHP, verify that its binaries are MediaWiki-capable. See the next subsection.

To compile PHP on the Solaris and Linux platforms:

  1. For Solaris OS: Install the GNU utilities from the Solaris 10 installation CD or DVD by running the installer there. An advanced way is to manually install the SVR4 packages: SUNWaconf, SUNWbinutils, SUNWgcc, SUNWgcmn, SUNWgm4, SUNWgmake, SUNWgtar, SUNWflexlex, SUNWflexruntime, SUNWbison, and SUNWgcc, all available on the CD or DVD and on the Freeware for Solaris site.

    Solaris 10 OS installations bundle the libxml2 package by default. If you did not install that package, do so either from the Solaris 10 installation CD or DVD or download libxml2 from Freeware for Solaris.

    For Linux: Install the GNU utilities, such as autoconf, autoconfigure, binutils, gcc, gmake, flex, and bison, from your Linux distribution CD or DVD.

    If your distribution does not bundle libxml2, download and install the libxml2 and libxml2-devel packages from either your distribution or from the XML C parser and toolkit of Gnome site.
  2. Download the latest PHP source from the PHP download site and unpack the downloaded tar ball.
  3. Configure and compile. Type:

    # bunzip2 -c php-5.1.6.tar.bz2 | tar xvfp -
    # cd php-5.1.6
  4. Update the PATH environment variable to reflect the new location so that the downloaded GNU utilities are in your path.

    • If you are running sh or bash, set PATH this way:
      export PATH=/bin::/usr/bin:/usr/sfw/bin:/usr/local/bin:/usr/ccs/bin:$PATH
    • If you are running csh or tcsh, set PATH this way:
      setenv PATH /bin:/usr/bin:/usr/sfw/bin:/usr/local/bin:/usr/ccs/bin:$PATH
  5. Configure PHP with MySQl and FastCGI support. Type:

    # ./configure --enable-fastcgi --with-mysql= MySQL-install-dir

    By default, that command also installs the compiled PHP binaries under /usr/local/php/bin. To install in another directory, add the --prefix= PHPinstall-dir option, where PHP-install-dir is your preferred installation location.

    If you installed MySQL under /usr/local/mysql, add the option --with-mysql=/usr/local/mysql to the configure command.

    If the configure script cannot find the location of the libxml2 binaries, manually specify that location by adding the option --with-libxml-dir, for example, --with-libxml-dir=/usr/local or the location in which you installed libxml2.
  6. Compile. Type:

    # gmake
    # gmake install

For more details on the installation procedure:

Verification of Whether PHP Binaries Are MediaWiki-Capable

To verify whether your distribution's PHP binaries are MediaWiki-capable:

  1. Create a simple script named phpinfo.php with the following content.

    <?php phpinfo(); ?>
    
     
  2. Run the script with your PHP binary and check whether the output includes support for MySQL and FastCGI.

    If you plan to configure PHP as an NSAPI plug-in with Web Server 7.0, you don't need FastCGI. This article only describes how to enable PHP and MediaWiki to work together with Web Server 7.0 as a FastCGI plug-in.

If your distribution's PHP binaries do not support MySQL or other databases, compile PHP from the source.

Configuring PHP With Web Server 7.0

To execute PHP scripts, configure the Web Server 7.0 instance on which to deploy MediaWiki. As a reference, read the article Using PHP on Sun Java System Web Server .

Configurations of Web Server for FastCGI

By default, during installation, Web Server 7.0 creates a configuration-cum-instance with the same host name as your machine name.

You can do either of the following:

  • Create a configuration named, say, php, with the Web Server 7.0 Administration Server and then deploy PHP support on that configuration. For the procedure, see Chapter 2 in the Sun Java System Web Server 7.0 Administrator's Guide .
  • Add PHP support to the default configuration by revising three configuration files in the https- CONFIG /config directory, where CONFIG is the name of the configuration of your current Web Server 7.0 server instance.

    To determine the name of the current configuration, type:

    % Web-Server-install-dir /bin/wadm --user=admin list-configs

Read on for the specifics of the second option. In the steps in the following subsections, be sure to replace CONFIG with the appropriate configuration name, such as php.

magnus.conf File

At startup, Web Server 7.0 reads the magnus.conf file to determine which plug-ins to load. Revise this file so that Web Server 7.0 can load the FastCGI plug-in when it starts. Follow these steps:

  1. Go to the PHP configuration's CONFIG directory. Type:

    % cd Web-Server-install-dir /https- CONFIG /config
  2. Initialize FastCGI for the Solaris and Linux platforms by adding this line to the bottom of magnus.conf:

    Init fn=load-modules shlib="libfastcgi.so"
    
     
    That line instructs Web Server 7.0 to load the shared object libfastcgi.so.

    Note: The FastCGI library is bundled with Web Server 7.0, which can automatically determine the location for the library and load it without your specifying the library's full path.
obj.conf or Virtual-Server-Specific obj.conf File

Depending on the configuration, the Web Server 7.0 Administration Server creates either a default obj.conf file or a virtual-server-specific object file in the Web-Server-install-dir /https- CONFIG /config directory. obj.conf configures FastCGI servers to be accessed (or executed) only for certain directories, file types, URI patterns, other elements of the HTTP request (User-Agent version, date), or any combination of those components.

With Web Server 7.0, the Administration Sever can create the obj.conf file in either of these two ways:

  • With the default file name obj.conf
  • As virtual-server-specific by prefixing the file name with the name of virtual server's name, that is, VS -obj.conf, for example, CONFIG -obj.conf

While starting up or executing dynamic reconfiguration, Web Server reads this object file. To find out which file is in use by the server process, type:

% Web-Server-install-dir /bin/wadm get-virtual-server-prop --user=admin --config= CONFIG --vs= VS object-file

The output shows the file name, either obj.conf or VS -obj.conf, depending on your configuration.

Now specify in the appropriate file how Web Server 7.0 handles PHP scripts. Based on the output, edit the file by adding the bold lines in the following code segment.

<Object name="Default">
...
# Add the following lines after other NameTrans directives.
#
# Make /wiki the MediaWiki URI.
# To access MediaWiki under a different URI or from a different installation location,
# specify that value.
#
                      NameTrans fn="pfx2dir" from="/wiki" dir="/usr/local/mediawiki"

# To make Web Server execute index.php as default page for a directory, edit the
# PathCheck directive.
# PathCheck fn="find-index" index-names="index.html,home.html,index.jsp"
                      PathCheck fn="find-index" index-names="index.html,home.html,index.jsp,index.php"

# Add the following lines after other Service directives.
# This can be a single line or a line continued according to the syntax below.
# The following example mentions the commonly required LD_LIBRARY_PATH location
# for the Solaris and Linux platforms. Add or edit the values, depending on where your
# libraries and binaries are installed.
                      Service type="magnus-internal/php"     fn="responder-fastcgi"     bind-path="localhost:3101"     app-path="/usr/local/php/bin/php"     app-env="PHP_FCGI_MAX_REQUEST=200"     app-env="LD_LIBRARY_PATH=/usr/local/php/lib/php:/usr/local/mysql/lib/mysql:/usr/ local/lib:/usr/sfw/lib:/usr/sfw/lib/mysql"     app-env="PHPRC=/usr/local/php/lib/php"
...
</Object>
                  
 

Here are the explanations for the changes:

  • bind-path="localhost:3101" — This line makes PHP run at port 3101 on your machine. Feel free to specify another port number. Ensure that the port of your choice is not in use by another program on your machine.
  • app-path="/usr/local/php/bin/php" — This line tells Web Server where to look for the PHP binary. This example assumes that FastCGI-compliant PHP resides under /usr/local/php/bin/php. If PHP resides in a different location, specify that location accordingly.
  • app-env="LD_LIBRARY_PATH=/usr/local/php/lib/php:/usr/local/mysql/lib/mysql:
    /usr/local/lib:/usr/sfw/lib:/usr/sfw/lib/mysql"
    — This line tells FastCGI that PHP needs the dependent libraries as specified and directs FastCGI to look for them in those locations. If you have other dependencies, also specify their locations here.
  • app-env="PHPRC=/path/to/php/config/dir" — This line shows PHP FastCGI where to look for the php.ini file. That file contains all the directives for customizing the behavior of PHP in your machine.

    Note: The PHPRC environment variable must point to the directory for the php.ini file, not to the file itself.

For details on the directives and on the procedure for configuring FastCGI in Web Server 7, see Appendix C in the Sun Java System Web Server 7.0 Administrator's Guide .

mime.types File

At startup, Web Server 7.0 reads the mime.types file to determine how to handle various file types, for example, those with a .php extension. Specifically, this file assigns certain file extensions to the type magnus-internal/php, which tells Web Server 7.0 whether to serve a file or run it as a CGI.

Add this line to the bottom of the mime.types file:

type=magnus-internal/php exts=php,php3,php4,php5
 

That line instructs Web Server 7.0 to consider the file extensions php, php3, php4, and php5 as a type owned by FastCGI. Subsequently, rather than serving the matching file, Web Server 7.0 runs it through the plug-in.

Verifying PHP Configurations for FastCGI

Now verify if Web Server 7.0 can configure PHP scripts:

  1. Start the Web Server 7.0 instance that you just configured to execute PHP scripts.
  2. Create a file named phpinfo.php with the following line. Save the file in your document root directory.

    <?php phpinfo(); ?>
    
     
    For example, you installed Web Server 7.0 in the /sun/webserver7 directory. Your /sun/webserver7/https- hostname server instance—where hostname is the name of the machine on which the instance is running—can now execute PHP scripts. The default document root location for that instance is /sun/webserver7/https- hostname /docs.
  3. Access the Web page at http:// hostname : portnumber /phpinfo.php, where portnumber is the number of the port on which the server instance is running.

Security Note: For security, because the sample file phpinfo.php is full of user information, once you have verified that your configurations support PHP scripts, consider deleting that file.

Transposing PHP Configurations to the Repository

Finally, transpose the manual edits for the magnus.conf, obj.conf, and mime.types files to the Web Server 7.0 Administration Server's configuration repository. Perform that task on the command line or from the Administration Console.

Start the Administration Server and then type:

% Web-Server-install-dir dir/bin/wadm pull-config --user=admin --config= CONFIG hostname

where CONFIG is the name of the configuration that contains the above file changes.

Installing MediaWiki

Installing MediaWiki is a simple process. Just unpack and place the downloaded tar ball in a location of your choice, as follows:

  1. Download the latest MediaWiki binaries.
  2. Unpack the binaries to /usr/local and rename the folder to delete the version information. For example, on the UNIX and Linux platforms, type:

    % gunzip -c mediawiki-1.8.2.tar.gz | tar xvfp -
    % mv mediawiki-1.8.2 /usr/local/mediawiki


    You have now installed MediaWiki at /usr/local/mediawiki, a location that this article refers to as MediaWiki-install-dir.
Configuring MediaWiki With Web Server 7.0

By now, you have configured Web Server 7.0 to execute PHP scripts and run MediaWiki when a user accesses the /wiki URI in a browser. This section describes the configurations for executing MediaWiki within Web Server 7.0.

Binary Location

You must inform the Web Server 7.0 Server instance of the location of the MediaWiki binaries. Do that in either of these two ways:

  1. Start the Administration Console. Type the command Web-Server-install-dir /admin-server/bin/startserv and then go to https://localhost:8989.
  2. Click Edit Virtual Server, Content Handling, and then Document Directories.

    The php - Content Handling - Document Directories page is displayed. If you have multiple configurations, select the recently configured config image that contains PHP support.
  3. Click New to add a new document root directory.

    The Add Document Directory dialog box is displayed.
  4. Fill in the two text fields, URI Prefix and Directory Path. Click OK.

    This article defines /wiki as the URI to access MediaWiki and /usr/local/mediawiki as the directory path. To access MediaWiki from a different URI or if you installed MediaWiki in a different location, specify the appropriate values here.
  5. Click the Deployment Pending link at the top-right corner to deploy the change to the current Web Server 7.0 instance.
  6. Start Web Server 7.0 by typing Web-Server-install-dir /https- CONFIG /bin/startserv.
  7. Open the MediaWiki application at http:// hostname : portnumber /wiki.

    If the PHP configuration is successful, the MediaWiki welcome screen is displayed. See Figure 2.

    Figure 2: MediaWiki Welcome Screen
     
    Web Server 7.0 can now execute PHP scripts.
Wiki Setup

Next, set up the wiki:

  1. Either click the "set up the wiki" link on the welcome screen or go to http:// hostname : portnumber /wiki/config/index.php.

    The MediaWiki installation page is displayed. See Figure 3.

    Note: If you encounter an error such as the one shown in Figure 6, see the appendix for a troubleshooting tip.

    Figure 3: MediaWiki Installation Page
     
  2. Under Site config, define the site name as wiki.

    To specify a different name, ensure that it matches the URI you configured under step 3 in " Binary Location."
  3. Under Database config, fill in the values so that MediaWiki can access the database while saving the wikis created by your users.

    If you are running as root, MediaWiki creates a MySQL database for this purpose.

    It is recommended that you manually configure MySQL with the appropriate privileges and type in the values with the appropriate database name, user name, and password. Figure 4 is an example.

    Figure 4: Database Configurations for MediaWiki (Click image for larger view.)
     
  4. Click Install MediaWiki.

    The MediaWiki Installation page is redisplayed with the updated values. See Figure 5.

    Figure 5: MediaWiki Installation Page With Updated Setup Values (Click image for larger view.)
     
  5. Move the LocalSettings.php file in the config directory to its parent directory.

As a precaution, remove the write permission to the config directory and click "this link" at the bottom of the MediaWiki Installation page.

Securing Your MediaWiki Site

You can protect your MediaWiki site from vandalism in many ways. A couple of them are as follows:

  • Always ensure that only authenticated and authorized users are accessing the site. MediaWiki offers authentication based on user names and passwords. For enterprises, you can even integrate the security options in Web Server 7.0. For details, see " Controlling Access to Server" in the Sun Java System Web Server 7.0 Administration Guide.
  • Secure your PHP-based MediaWiki site with the appropriate php.ini file. Most PHP distributions include two sample php.ini files in your installation directory, as follows:

    • php.ini-dist — Contains suggested settings for deployment as reference. Familiarize yourself with those settings and their implications before deploying them to production.
    • php.ini-recommended — Contains recommended settings from PHP developers.

Accompanying those files is detailed documentation. Familiarize yourself with the settings and choose what best fits your needs with emphasis on security. If you are using the Web Server 7.0 FastCGI plug-in, you can specify the location of your php.ini file with the app-env environment variable, like this:

app-env="PHPRC= php.ini-file-location "

Note: Specify the directory name, not the file name, for php.ini-file-location. For details, see " obj.conf or Virtual-Server-Specific obj.conf File ."

Appendix: Troubleshooting Tips

If you run into problems after configuring PHP as a FastCGI plug-in with Web Server 7.0 and MediaWiki with PHP and MySQL support on top of Web Server 7.0, these tips might help solve the problems.

  • While compiling PHP for the Solaris or Linux platform, you see this error message:

    configure: error: libxml2 version 2.6.11 or greater required.

    Probable cause: The PHP build scripts cannot find the location of the libxml2 binaries on your machine.

    Tip: Install the libxml2 package for your platform and then reconfigure PHP by adding the option --with-libxml-dir= libxml2-install-dir, where libxml2-install-dir is where you installed libxml2.
  • After starting the MySQL server and while verifying whether or not the server is running on your machine, you learn that it is not.

    Probable cause: The server configuration file my.cnf or the permissions for the MySQL data directory contain errors.

    Tip: Browse the server error log file at /var/mysql/ hostname.err, where hostname is the name of the machine for the MySQL server. That file describes the causes for the failure of the MySQL server
  • After performing the steps in " Configuring PHP With Web Server 7.0," you start Web Server 7.0 and see these error messages:

    config: CONF2257: Error parsing file obj.conf, line 51, column 12: Expected "="

    config: CORE3235: File server.xml lines 68-72: Error processing <object-file> element: Error processing file obj.conf

    failure: server initialization failed

    Probable cause: Either you made a typo or you did not specify the closing tag for php -fcgi objects within <Object ...>.

    Tip: Note the line number displayed in the server console or the error logs and then edit the obj.conf file, as appropriate, to correct the error. Refer to " obj.conf or Virtual-Server-Specific obj.conf File ."
  • Your PHP configurations for Web Server 7.0 provide the following error message:

    Method Not Allowed

    An error has occurred.

    HTTP2205: The request method is not applicable to the requested resource


    Probable causes:

    • Web Server 7.0 does not understand how to process and execute the Web-page file with the extension in question. Your Web Server 7.0 is loading an obj.conf file that contains no PHP configurations.

      Tip: Verify whether this is the case by determining the object file in use. Type:
      Web-Server-install-dir /bin/wadm get-virtual-server-prop --user=admin --config= CONFIG --vs= VS object-file
    • You have not completely configured FastCGI within the Web Server 7.0 instance.

      Tip: Double-check against the details in " Configurations of Web Server for FastCGI."
  • When you access a PHP file, for example, phpinfo.php, you encounter one of these two error messages:

    ERROR 500: Server Error

    ERROR 500: No Permission


    Probable causes:

    • The PHP configuration is in error.

      Tip: Browse the server error logs for clues.
    • The location of the PHP binary as an argument to the app-path variable ise incorrect.

      Tip: Verify the following:

      • The path to the PHP binary as an argument to app-path is valid.
      • The PHP binary in question can handle FastCGI, that is, whether the PHP binary can bind to a particular port. Type, for example:

        /usr/local/php/bin/php -b localhost:3104

        If the output reports no errors, press Control-C to exit. In case of errors, your PHP is not FastCGI-compliant.

      Also, run a program such as ldd on the PHP binary. Be sure to add as anargument the location of all your dependent libraries to LD_LIBRARY_PATH under app-env.

      For details, see " obj.conf or Virtual-Server-Specific obj.conf File ."
    • The PHP binary might not support FastCGI.

      Tip: Verify by running the phpinfo.php script with PHP to check if the PHP compilation is in order.
    • The port number 3101, which acts as the argument to bind-path (see " obj.conf or Virtual-Server-Specific obj.conf File "), is in use by another process.

      Tip: Verify whether that's the case by running the command netstat -an | grep 3101. If so, the PHP FastCGI plug-in cannot bind to that port number. Specify another port number as the argument for bind-path=localhost: portnumber.

      If you compiled PHP with options such as --enable-cli, --enable-cgi, and --enable-fastcgi, a separate program, such as php-cgi, then resides under PHP-installation-dir. In this case, use php-cgi as an argument to app-env in the (see obj.conf file.)
  • When you access the phpinfo.php file, the following error message is displayed:

    ERROR 500: Server Process Creation Failure

    Probable cause: FastCGI cannot create the PHP application for processing the Web page in question.

    Tip: Run a system command such as ldd on PHP and ensure that the appropriate dependent libraries are in place as arguments for the app-env variable for configuring the object file.
  • The Web Server 7.0 error logs show the following error and the browser displays

    ERROR 500: Server Error:

    for host 127.0.0.1 trying to GET /phpinfo.php, func_exec reports: HTTP2302: Function responder-fastcgi aborted the request without setting the status code


    Probable cause: You did not compile PHP with support for FastCGI.

    Tip: Recompile.
  • You have configured PHP within your server instance but when you access PHP scripts within that instance, this error message is displayed:

    No input file specified

    Probable cause: PHP CGI cannot process the Web page that the browser requested, likely because of the following:

    • You have not properly configured the mime.types file with the PHP extensions.
    • You have not specified either the NameTrans or the Service directive in the server configuration's object file to describe how to process files with a PHP extension.

    Tip: See " obj.conf or Virtual-Server- Specific obj.conf File ."
  • You access the MediaWiki URI and the browser displays the page shown in Figure 6.

    Figure 6: MediaWiki Startup Error
     
    Probable causes:

    • You have deleted the LocalSettings.php file in MediaWiki-install-dir /config before MediaWiki completes the configuration.

      Tip: Either reinstall MediaWiki or restore the original LocalSettings.php file into the config directory and then reconfigure MediaWiki.
    • MediaWiki cannot access the database.

      Tip: Verify if you compiled PHP with the --disable-path-info-check option. If so, recompile without that option.
    • The MySQL database is not running.

      Tip: Ensure that the MySQL database is running.
  • When you access MediaWiki, the browser displays this error message:

    Error 2048 Not safe to rely on system's timezone settings

    Probable cause: The php.ini file does not exist or is incomplete.

    Tips: Add the following code to your php.ini file:

    [Date]
    date.timezone="
    time-zone " ;
     
    Replace time-zone with the appropriate value, such as PST or GMT, depending on your location.

    If the php.ini file does not exist, look at the php.ini-recommended file in PHP-source-dir from which you compiled the PHP binaries and then create a php.ini file with the two-line code above. Place the file in the PHP-install-dir /lib/php directory, in which the PHP runtime looks for the php.ini file.

    While configuring the obj.conf file within Web Server 7, to configure PHP to read php.ini from another directory, set up the PHPRC environment variable to point to that directory.
References
Rate and Review
Tell us what you think of the content of this page.
Excellent   Good   Fair   Poor  
Comments:
Your email address (no reply is possible without an address):
Sun Privacy Policy

Note: We are not able to respond to all submitted comments.
Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
JavaOne Banner
Java 8 banner (182)