After migration blank screen

Hello, I had to move our OJS 2.4 to a new server. Now we get a blank screen. I have

  • created a database and a user to whom I gave all permissions and wrote the access data into config.inc.php;
  • Imported the database tables.
  • produced the writing permissions for the various files and directories listed in readme.
    phpinfo works: http://fzwp.de/phpinfo.php
    If I set “installed = Off”, I get the installation screen.
    I have only FTP access to the server.
    In phpMyAdmin it says at the top: “Server:localhost:3306”. Is the host then “localhost:3306” or just “localhost”? I have tried both.

What have I failed to do?
Thanks, Daniel

Hi @Aragon

Have you checked your php error log and webserver error log(i.e. /var/log/apache2/error.log) too?
Please, enable in your config.inc.php file show_stacktrace to on and attempt to load page again. It should display some message with hints about what is going on.

Regards,
Israel Cefrin
Public Knowledge Project Team

Thank you @israel.cefrin. As I have only FTP access, I could not read the error log, but now the provider sent it to me:

[05-Mar-2018 17:21:59 Europe/Berlin] PHP Warning: require(./lib/pkp/includes/bootstrap.inc.php): failed to open stream: No such file or directory in /home/iapli/ojs/index.php on line 60
[05-Mar-2018 17:21:59 Europe/Berlin] PHP Fatal error: require(): Failed opening required ‘./lib/pkp/includes/bootstrap.inc.php’ (include_path=’.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php’) in /home/iapli/ojs/index.php on line 60
[05-Mar-2018 17:24:47 Europe/Berlin] PHP Warning: require_once(./lib/pkp/lib/pqp/classes/PhpQuickProfiler.php): failed to open stream: No such file or directory in /home/iapli/ojs/lib/pkp/classes/core/PKPProfiler.inc.php on line 17
[05-Mar-2018 17:24:47 Europe/Berlin] PHP Fatal error: require_once(): Failed opening required ‘./lib/pkp/lib/pqp/classes/PhpQuickProfiler.php’ (include_path=’.:/home/iapli/ojs/classes:/home/iapli/ojs/pages:/home/iapli/ojs/lib/pkp:/home/iapli/ojs/lib/pkp/classes:/home/iapli/ojs/lib/pkp/pages:/home/iapli/ojs/lib/pkp/lib/adodb:/home/iapli/ojs/lib/pkp/lib/phputf8:/home/iapli/ojs/lib/pkp/lib/pqp/classes:/home/iapli/ojs/lib/pkp/lib/smarty:.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php’) in /home/iapli/ojs/lib/pkp/classes/core/PKPProfiler.inc.php on line 17
[05-Mar-2018 17:55:26 Europe/Berlin] Cannot read configuration file /home/iapli/ojs/config.inc.php

Can you see where the problem is?
Daniel

Hi @Aragon

Have you checked if ./lib/pkp/includes/bootstrap.inc.php exist?
Also check ./lib/pkp/lib/pqp/classes/PhpQuickProfiler.php file and, specially /home/iapli/ojs/config.inc.php must exist and chmoded with read and owner permissions.

Regards,
Israel Cefrin
Public Knowledge Project Team

Thank you @israel.cefrin,
All three files exist. bootstrap.inc.php is in
/home/ojs/lib/pkp/includes/bootstrap.inc.php
Zur Info: http://iap.li/phpinfo.php liegt in /home/public_html/lib/pkp/includes/bootstrap.inc.php
Then I changed the permissions of all files and directories to read and write (666). The result was that instead of a blank screen we got a Forbidden:

You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Then I set the permission for all folders and files to 777. The files_dir and all its content also has 777. Now we get an ‘Internal Server Error’:

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@fzwp.iap.li to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

As I only have access to the host via cPanel and FTP, I believe that I cannot change the owner. What shall I do? If I understand FAQ permissions correctly, 777 on all files and folders should eliminate all permission errors. Or can too many permission cause errors too?
Would it help to set ‘installed’ to ‘Off’ and go through the installation? This is really exhausting.

Hi @Aragon

have you checked your webserver error log? Chmod permission 777 is totally unsafe in production environment, use it only for tests.

You webserver log may shows you further info related to this 403 error code.

This is an error related to something that your server can’t handle, as I said, check your webserver error log.

Regards,
Israel Cefrin
Public Knowledge Project Team

@israel.cefrin, I know that 777 is unsafe, but I want to get OJS running again! Now I got the error_log.

SoftException in Application.cpp:261: File "/home/iapli/ojs/index.php" is writeable by group
then
SoftException in Application.cpp:651: Directory "/home/iapli/ojs" is writeable by group

Why does OJS not run if index.php or the directory is writeable by group or by others?!? Unfortunately, changing these permissions just has the effect that now there is no error but a blank screen, and no error messages. Does this mean that the cause of the problem is not permissions?

Hi @Aragon

Besides chmod permission is your folder owner correctly set? As I don’t know which linux distro you are running I just presume that could be a setting to check (and could be cluttering your install).
As you said it is a new server, maybe folder owner is not correctly set to user or apache group.

Regards,
Israel Cefrin
Public Knowledge Project Team

@israel.cefrin: Can I change the owner of the folders or files, if I have have access to the server only via FTP and cPanel? If I cannot, what can I do? What exactly should the name of the owner of the folders and of the files be?

Hi @Aragon

To change folder and files owner you should have access through a SSH terminal. With ftp only I am not sure if it is possible.

Regards,
Israel Cefrin
Public Knowledge Project Team

Hi @israel.cefrin: If we do not have ssh access in order to change the owner of files, can we not get our OJS running again? Are there no permission settings which make it run anyway?
Daniel

Hi @Aragon

You may ask to your hosting provider to double check that permissions and file owning are correctly.
And also ask them for error logs.

Best,
Regards,
Israel Cefrin
Public Knowledge Project Team

Thank you @israel.cefrin, I just don’t understand what the ‘correct’ file and folder owning would be. At FAQ Permissions it says:

The ownership of cache, public, and other web-writable directories should be your web user and the web-user’s primary group, for example apache:www-data. Permissions should probably be 750. The ownership of the other non-web-writable directories should be your user, with either the web user’s group, or with public execute permissions.

  1. Who is my ‘web user’?
  2. Why does the FAQ say that the permissions should ‘probably’ be 750? Is the author not certain, or are there circumstances under which they should be something else?
  3. Is ‘your user’ different from ‘your web user’?

I now want to install OJS 3 and don’t want to get into trouble again with ownerships and permissions. Thank you, Daniel

Hi, @Aragon,

  1. Your web user is the user under which you web server operates. This will vary per your server configuration. For example, if you are running your own server using typical package distributions, it might be “nobody” or “www” or “apache”. If you are hosted in a shared server managed by CPanel, it might be your username.
  2. The permissions will also vary depending on your host setup. Please see the link out to linux.com in the FAQ you referenced for the three parts of the numeric permissions (user, group, other). You choice will largely depend on who the “other” group is on your server. If “other” includes other shared server users, you want this to be far more restrictive than if “other” is just trusted users on a server you control.
  3. Whether your user is different from your web user depends on your configuration. In a dedicated server, they are almost certainly different. In a shared server, they might be the same. Ask your system administrator or hosting provider for clarification on your configuration.
1 Like

I am in the same boat here!: I have an old 2.x OJS I want to make a running backup of, have copied everything over to my personal development server (CentOS7/PHP7), set permissions for Apache, created DB/User, edited config.inc.php accordingly, I go to the OJS root on the Web and – no joy. Nothing. Totally blank screen.

I’ve made sure PHP is working (via a phpinfo page in the root directory of my OJS), have made sure error reporting is on in both php.ini and OJS/config.php.inc, etc. etc.

I am not seeing any errors all in my Apache error logs.

Totally blank screen.

Advice appreciated!

Mark Cyzyk
Johns Hopkins University
mcyzyk@jhu.edu

I am not suer that OJS 2.X will work properly on PHP 7. DO you have some php_error log available?

I found this PHP error:

[Fri Jan 18 14:59:13.104063 2019] [php7:error] [pid 15167] [client 10.161.51.171 :53535] PHP Fatal error: Cannot use ‘String’ as class name as it is reserved in /var/www/html/mcyzykOjs/lib/pkp/classes/core/String.inc.php on line 57

OJS 2.x and PHP7 don’t mix?

I think that @asmecher can help in this issue.

Hi @Mark_Cyzyk,

Current releases of OJS 2.x won’t run on PHP7 – I’m preparing to release OJS 2.4.8-4, which will. Meanwhile you can try the latest code in the ojs-stable-2_4_8 git branch, which supports PHP7.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks, Alex!

OJS 2.4.8-4
It’s looking like my route to a PHP7/OJS3.X setup is through this forthcoming OJS 2.4.8-4. Will keep an eye out for its release.

Mark