OJS3 - Success update from 2741 to 3.0 but PDF cant be view

Assalamualaikum
May peace be upon you all brother and sister

I got some problem after success updating OJs 2741 to 3.0
the journal list seems to be alright like this SS
and also the detail view
but after i click the pdf button i only got blank page

this is my config.inc

no error on php_error.log

i wish anyone can help me out :slight_smile: ty

Hello everyone,

I made the OJS update version 2.4.8 to version 3.0 and I’m experiencing the same problem @radikalbebas, I am unable to view the pdfs of articles.
Looking at the Apache logs identified some errors that may help identify the problem reported by @radikalbebas.
I’m using Debian 7, PHP 5.4 and PostgreSQL 9.4 database.
below is the error log:

Thank you,
Diego

1 Like

ty for adding @diegojmacedo ,
i got another clue ,

the PDF button link is “http://localhost/jurnal/index.php/waktu/article/view/128/40

but after the blank page appear the url given was
http://localhost/jurnal/index.php/waktu/article/download/128/40

maybe the PKP developer or team can help me out @asmecher :slight_smile:

Hi all,

FYI, I’m also working on debugging this issue over at this thread:

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

thumbs up :slight_smile: hope this will be solve soons, ganbatte ne @asmecher senpai

Hi,

I’m currently trying a test upgrade from 2.4.8.0 to 3.0.0.0 and I seem to be getting the same problem as @radikalbebas. Everything appears to be fine until I try to open a .pdf file at which point I get a blank, white page with no error on screen or in the Apache logs.

For a while I was getting an error in the Apache error_log:

PHP Warning: mkdir(): Permission denied in /var/www/html/ojs/lib/pkp/classes/file/FileManager.inc.php on line 304

I found this was because usageStats was trying to create a directory in the root of the file system rather than under the location set for files_dir in the config.inc.php file as it had in the previous version.

I have wondered whether for some reason the files_dir is not being picked as a base directory causing the usageStats to be put in the wrong place and the pdf files to fail to display as well. The System Information in the front ends admin screens is displaying the path set in the config file correctly though.

The files in files_dir location are owned by Apache, directories have permissions of 755 and files 644.

I’m still trying to find what is happening here and there is always the chance I have missed something obvious but as a few other people appear to have similar issues I thought I would add my experiences to the topic.

Any advice on what the problem might be would be great.

Many Thanks

Dan

As is always the way the day after you post to a forum for help you spot what you’ve done wrong! :frowning:

I had a files_dir of /home/ojs/files and whilst the permissions on the files directory were correct i.e. owned by apache, directories have 755 permissions and files 644 the OJS directory below was not owned by apache. I’ve changed the ownership and (after realising the pdf viewer plugin seems to have been disabled in the update and enabling it again) my pdf files now display correctly.

Sorry for wasting your time

Dan

Hi @djtowns,

No problem, thanks for following up! Posting on a public forum has a known curative effect.

Regards,
Alec Smecher
Public Knowledge Project Team

Have this issue resolved?
I’m having problem with mine… Thanks

Hello there … I have just finished my upgrade from 2.4.8.1 to 3.01 (the latest stable version) and I’m facing a similar problem… This is on an Ubuntu Server (Lucid)

apache’s error log reports:

PHP Warning: mkdir(): Permission denied in /var/www/html/ojs/lib/pkp/classes/file/FileManager.inc.php on line 304

following some tips from and really old bug report I edited FileManager.inc.php like this:

        >     /**     if (mkdir($dirPath))
                            return $this->setMode($dirPath, DIRECTORY_MODE_MASK);
                    return false;*/
                    if (mkdir($dirPath))
                            return FileManager::setMode($dirPath, DIRECTORY_MODE_MASK);
                            else {echo "COULD NOT MAKE $dirPath";exit();}

So, when I try to open any PDF I get a page stating

COULD NOT MAKE /usageStats

I don’t know why OJS is trying to create a directory on the root filesystem. I have double checked config.inc.php and the files_dir variable is set correctly (I didn’t change it and it was working before)

Also, I doublechecked permissions under “files” directory … tight now www-data is the owner of the directory, the files and all the directories under it (permissions are set to 775 for all)

If someone has a clue or tip it would be highly appreciated!

Best regards

Hi @hilongo

Hmmmm… Here is the place in the code, where the usage stats plugin tries to make a new directory: pkp-lib/PKPUsageStatsPlugin.inc.php at ojs-stable-3_0_1 · pkp/pkp-lib · GitHub. I.e. it uses this method: pkp-lib/PKPUsageStatsPlugin.inc.php at ojs-stable-3_0_1 · pkp/pkp-lib · GitHub, which reads the files_dir in the config.inc.php (s. pkp-lib/PrivateFileManager.inc.php at ojs-stable-3_0_1 · pkp/pkp-lib · GitHub). Thus, the usage stats plugin should actually get the right path. Would it be possible for you to debug those few other places in the code, to see if they return correct value i.e. files folder path? Or to double check the variable in the used config.inc.php and the access permissions…

Best,
Bozana

I have the same problem. The usageStats is created on root directory. The apache user has not writable right in root directory.

However I have a problem yet, Pdf files are not viewed and it is not possible to dowload. There is no error record in apache and ojs usage logs

Hi @AndreMedeiros,

Please don’t double-post; it clutters the forum. Someone will respond to your other post.

Regards,
Alec Smecher
Public Knowledge Project Team