New installation on linux

I’m installing OJS 3.1.1-2 in an Ubuntu 16.04, the apache version is 2.4.18; after copying and extracting the file ojs-3.1.1-2.tar.gz in a folder named ‘ojs’ in directory /var/www/html, I’m trying to access the path to OJS and I get a page with the following content:

<?php

/**
 * @mainpage OJS API Reference
 *
 * Welcome to the OJS API Reference. This resource contains documentation
 * generated automatically from the OJS source code.
 *
 * The design of Open %Journal Systems 2.x is heavily structured for
 * maintainability, flexibility and robustness. Those familiar with Sun's
 * Enterprise Java Beans technology or the Model-View-Controller (MVC) pattern
 * will note similarities.
 *
 * As in a MVC structure, data storage and representation, user interface
 * presentation, and control are separated into different layers. The major
 * categories, roughly ordered from "front-end" to "back-end," follow:
 * - Smarty templates, which are responsible for assembling HTML pages to
 *   display to users;
 * - Page classes, which receive requests from users' web browsers, delegate
 *   any required processing to various other classes, and call up the
 *   appropriate Smarty template to generate a response;
 * - Controllers, which implement reusable pieces of content e.g. for AJAX
 *   subrequests.
 * - Action classes, which are used by the Page classes to perform non-trivial
 *   processing of user requests;
 * - Model classes, which implement PHP objects representing the system's
 *   various entities, such as Users, Articles, and Journals;
 * - Data Access Objects (DAOs), which generally provide (amongst others)
 *   update, create, and delete functions for their associated Model classes,
 *   are responsible for all database interaction;
 * - Support classes, which provide core functionalities, miscellaneous common;
 *
 * Additionally, many of the concerns shared by multiple PKP applications are
 * implemented in the shared "pkp-lib" library, shipped in the lib/pkp
 * subdirectory. The same conventions listed above apply to lib/pkp as well.
 *
 * As the system makes use of inheritance and has consistent class naming
 * conventions, it is generally easy to tell what category a particular class
 * falls into.
 *
 * For example, a Data Access Object class always inherits from the DAO class,
 * has a Class name of the form [Something]%DAO, and has a filename of the form
 * [Something]%DAO.inc.php.
 *
 * To learn more about developing OJS, there are several additional resources
 * that may be useful:
 * - The docs/README document
 * - The PKP support forum at http://forum.pkp.sfu.ca
 * - Documentation available at http://pkp.sfu.ca/ojs_documentation
 *
 * @file ojs/index.php
 *
 * Copyright (c) 2014-2018 Simon Fraser University
 * Copyright (c) 2003-2018 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * @ingroup index
 *
 * Bootstrap code for OJS site. Loads required files and then calls the
 * dispatcher to delegate to the appropriate request handler.
 */

// Initialize global environment
define('INDEX_FILE_LOCATION', __FILE__);
$application = require('./lib/pkp/includes/bootstrap.inc.php');

// Serve the request
$application->execute();

?>

I expected to see the installation page. Any ideas of what I’m doing wrong?

Directory structure looks like this:
Captura

Disclosure: I’m a Linux newbie :slight_smile:

Hi @bbarrios

It seems like your server (apache) is not interpreting the PHP documents. Did you install the PHP module?

Best,
Bozana

Hello @bozana

Command which php is returning this:
/usr/bin/php

Also verified through aptitude:
Captura

But command dpkg -s php7 | grep Status returns:
dpkg-query: package ‘php7’ is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

I checked some more, and I was missing some modules:
sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

I installed them and now I’m able to see that php is interpreting files with the .php extension:
Captura

Now I’m trying to open in the browser the path to OJS and I get nothing at all.

Found the solution. I was missing this package:
sudo apt-get install php7.0-xml

Now I’m able to see the OJS Installation page.

@bozana thank you for your guiding

1 Like

Hello all,

Are there any other required libraries we need to know about and install? Is there a way to check the server for all required libraries?

As I’m aware, OJS 3 can run on default php extensions, so basic php download package should be enough. Additionally you can download mbstring, but, as I remember, it isn’t mandatory.

Thank you @Vitaliy!!

Hello, @bbarrios
Could you instruct me how to fix it? I’m having the same problem with index.php. My server is Ubuntu Linux on the Ec2 instance of the Amazon Web Service. I believe that in my case it is mysql because in the requirements of ojs-3.1.2 it is recommended version 4.1, but in ubuntu the version of mysql is 5.7 and I can not change it.

Hi, are you getting any errors on the logs (apache and other components)?

The fourth step is the procedure I learned to install wordpress. It replaces the root user’s permissions for the ubuntu user.

It’s wrong? I do not know if it works with ojs.

Hello!
I do not know what the mistake is. When I try to navigate the install panel for the first time, the contents of the index.php file appear. I followed the procedure of @sgarcia by changing some permissions with chmod 777 and finally the file index.php stopped being displayed. But the page is all white. There is no message, no word, no letter, no number.

Hi @Alison_Henrique_Mach,

Note that 777 permissions are never safe to use – but they can be helpful for testing. There’s a FAQ entry in this forum on file permissions if you’d like to know how they should be set.

A blank page usually means a PHP error occurred. You can find out more by looking in your PHP error log. There’s also a FAQ entry on how to find that.

Regards,
Alec Smecher
Public Knowledge Project Team